We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10076
    • 1,024 Posts
    I need a quick solution for a page where I use twitter bootstrap, for setting it up.
    The logo needs to go outside the flow of te document, but should push the document down when resizing the browser window. Currently I have the logo on position "absolute" and the rest in a wrapper,
    The wrapper is not pushed down when I make the browserwindow smaller.

    The page is in the cloud at this URL [url]http://c0142.paas2.tx.modxcloud.com/[url]
      • 39932
      • 483 Posts
      Unfortunately, using "absolute" at the top level will limit your options when not pairing with other absolutes. Many devs use absolute to their detriment and thus run into problems like yours. This has to do with a misconception of CSS positioning and how it works on the "large scale".

      That said, do you really need it outside of the flow of the document or do you need it outside the flow of the body of the document? These are two different things and require different solutions entirely.

      P.S. Stating that you want it to push the document down implies the latter. This is why I am seeking clarification.
        Website: Extended Dialog Development Blog: on Extended Dialog
        Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
        Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

        Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
        • 22840
        • 1,572 Posts
        Positioning anything absolute will position it absolutely of the containing element ( if that is positioned ) there is no way to make an absolutely positioned element push anything down as it is positioned to left x and top x, even if you give it a height and width, that's the whole purpose of positioning something absolutely

        If you need a element to push something down consider floating it and clearing the float after it. [ed. note: paulp last edited this post 14 years, 1 month ago.]
          • 39932
          • 483 Posts
          @Paulp:

          This is mostly correct. By exchanging positioning, you can make absolutely positioned elements push relative ones, but it requires some trickery that is not advised in the least, and unpredictable unless one is extremely familiar with tricksiness (yes, it is a word, :p ). Additionally, you can make it inherit properties (depending on the browser) of the containing element, but this can have undesired effects.

          The short story is that you must position every element. The semi-long story is that you must keep a very diligent practice of flipping between absolute and relative. And... its dirty. So extremely dirty. [ed. note: fuzzicallogic last edited this post 14 years, 1 month ago.]
            Website: Extended Dialog Development Blog: on Extended Dialog
            Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
            Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

            Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
            • 40447
            • 165 Posts
            Use a wrapper positioned relative and inside the wrapper put the logo positioned absolute. You can stack wrappers vertically with an offset if positioned relative.