SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool absolute positionning problem

    Hi there,

    Got a little problem with absolute positioning..

    http://www.progmatik.com/css/index.html

    the menu looks fine in IE, but isn't correct in Firefox. I guess something must be wrong..

    I got a Container div which contain a Header Div, MainDiv Div and a MainMenu Div.

    I set position: relative; to the Container div to position it so absolute position for inside Div would be from that outter div.

    Works as expected in IE.
    Works fine in both IE and firefox if it is not centered. Looks like firefox will take the 0,0 point as the upper left corner of the whole page instead of the Container div.

    Thanks for any advice.
    If you have any comments about the semantic of my page, you're more than welcome to share your thoughts.

    Thanks again!

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll have trouble getting Firefox and IE to be the same without a doctype.

  3. #3
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doctype added, still the same

  4. #4
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not an answer to your problem, but you seem to be using the wrong character set (or trying to use the wrong characters)...
    http://validator.w3.org/check?verbos...s%2Findex.html

  5. #5
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's an incorrect doctype (inadvisable to use XHTML 1.1 as well).

    But your problem is #container doesn't have a width, so in another words, your menu is placed relative to an element that is the full width of the window.

  6. #6
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Tyssen
    That's an incorrect doctype (inadvisable to use XHTML 1.1 as well).

    But your problem is #container doesn't have a width, so in another words, your menu is placed relative to an element that is the full width of the window.
    Great, that did it!
    But why didn't it show up equally in Firefox and IE ?

    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •