layout relative to a fixed or absolute element

Discussion in 'HTML' started by Rob Stampfli, May 17, 2006.

  1. Rob Stampfli

    Rob Stampfli Guest

    Suppose one declares a header element "position:fixed" to force
    it to remain on the top of the screen even as one scrolls through
    the rest of the page. Is there a way to position the relative
    layout that follows to come directly after the fixed element so
    that none of the relative component is hidden behind the fixed
    element? By default, the relative markup seems to be laid out
    as if the fixed element doesn't exist. I realize I could simply
    add some initial white space to force the hidden part further
    down the page, but older browsers don't sqwawk "position:fixed"
    (or "position:absolute") and on them the white space appears
    after the header element, causing a sizeable gap between the
    header and the real body of the page on these browsers. Is
    there any way to establish a relationship between a fixed and
    relative element more elegantly?

    Example (with whitespace added to prevent hiding of data):

    <http://cboh.org/fixed-layout-problem.html>

    Look at this on a modern browser (say, Firefox), and on an
    ancient one (NS4 or IE4) to see what I mean.

    Rob
     
    Rob Stampfli, May 17, 2006
    #1
    1. Advertising

  2. Rob Stampfli

    Spartanicus Guest

    (Rob Stampfli) wrote:

    >Look at this on a modern browser (say, Firefox), and on an
    >ancient one (NS4 or IE4) to see what I mean.


    You're seriously deranged if you spend time on testing with those 2
    antiquated pieces of junk. For all practical purposes they should be
    considered as non CSS capable, they should be served plain HTML for
    example by using the @import hack.

    --
    Spartanicus
     
    Spartanicus, May 17, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wl
    Replies:
    1
    Views:
    4,428
  2. KatB
    Replies:
    8
    Views:
    4,194
  3. Replies:
    1
    Views:
    587
    John Timney \(MVP\)
    Jun 19, 2006
  4. James Byrne
    Replies:
    3
    Views:
    565
    James Byrne
    Sep 14, 2010
  5. Stephan Koser

    Absolute position of a relative element

    Stephan Koser, Jun 14, 2004, in forum: Javascript
    Replies:
    7
    Views:
    139
    Mike Foster
    Jun 18, 2004
Loading...

Share This Page