CSS positioning Question

Discussion in 'HTML' started by theo, Feb 4, 2005.

  1. theo

    theo Guest

    I have a question about css layout. Someone earlier told me to get rid of
    absolute positioning, and so I've made a page with a container div, and then
    divs inside of that, with really no positioning at all. I need some
    direction here. For some reason, applying border attributes causes the page
    to add 20 pixels to the top of the header section, throws everything off.
    With ie being the problem, and not netscape/mozilla. With 6 or 7 boxes like
    this, what is the best choice for trouble-free positioning?
    HELP?

    here's the page:
    http://wholives.com/temp/css-new.html
    css is within
    theo
    theo, Feb 4, 2005
    #1
    1. Advertising

  2. theo

    Toby Inkster Guest

    Toby Inkster, Feb 4, 2005
    #2
    1. Advertising

  3. theo

    theo Guest

    theo, Feb 4, 2005
    #3
  4. theo

    theo Guest

    > It's just that I cannot find what's
    > causing the top 2 header divs to throw the whole page 20px down in IE 6.

    Any
    > clues?> thanks,> theo
    >

    I went into the code, and put visible margin around the top header divs, and
    now everything is straight. Problem is, is that I do not want margins on the
    top header divs. ???????

    theo
    theo, Feb 4, 2005
    #4
  5. theo

    rf Guest

    "theo" <> wrote
    > > It's just that I cannot find what's
    > > causing the top 2 header divs to throw the whole page 20px down in IE 6.

    > Any
    > > clues?> thanks,> theo
    > >

    > I went into the code, and put visible margin around the top header divs,

    and
    > now everything is straight. Problem is, is that I do not want margins on

    the
    > top header divs. ???????


    Standard bug in IE. Sometimes positioning is stuffed up unless you specify a
    margin (one of the many problems with the IE box model).

    The workaround is to specify a margin. If you don't want that margin to be
    visible then make it the same colour as the background.
    rf, Feb 4, 2005
    #5
  6. theo

    Els Guest

    rf wrote:

    > If you don't want
    > that margin to be visible then make it the same colour as
    > the background.


    I think the margin always is the colour of the background (of
    the element 'behind' it) -- how to specify the colour of a
    margin? ;-)

    --
    Els
    http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Els, Feb 4, 2005
    #6
  7. theo

    rf Guest

    "Els" <> wrote
    > rf wrote:
    >
    > > If you don't want
    > > that margin to be visible then make it the same colour as
    > > the background.

    >
    > I think the margin always is the colour of the background (of
    > the element 'behind' it) -- how to specify the colour of a
    > margin? ;-)


    Ah, oops. Thankyou Els for finding my intentional mistake :)

    Of course I meant border, not margin.

    Applying a border to the offending div (the same colour as the background)
    also fixes the IE bug.
    rf, Feb 4, 2005
    #7
  8. theo

    theo Guest

    > Applying a border to the offending div (the same colour as the background)
    > also fixes the IE bug.
    >


    I noticed this yesterday, that it seemed to be a bug. The other big
    problem I'm having is line-height in text. IE and Netscape have about 50px
    difference in location of text. Any work-arounds here?
    Thanks, so much.
    theo
    theo, Feb 4, 2005
    #8
    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. Matt Beckwith

    Absolute Positioning (CSS Question)

    Matt Beckwith, Jul 18, 2003, in forum: HTML
    Replies:
    4
    Views:
    1,829
  2. Pat Traynor
    Replies:
    3
    Views:
    662
    Sid Ismail
    Sep 24, 2003
  3. Leslie

    css positioning question

    Leslie, Oct 11, 2003, in forum: HTML
    Replies:
    23
    Views:
    890
    Fredo Vincentis
    Nov 10, 2003
  4. Leslie
    Replies:
    4
    Views:
    443
    Leslie
    Nov 2, 2003
  5. Spartanicus

    Basic CSS positioning Question??

    Spartanicus, Sep 5, 2004, in forum: HTML
    Replies:
    11
    Views:
    564
Loading...

Share This Page