SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2002
    Location
    Fort Lauderdale
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    absolute positioning - all browsers

    Does anyone have a method for positioning a layer so that it appears in the same spot on all browsers? Here is a little test I made:

    http://www.unpossible.cc/positioning.html
    (The code is very short so check the source)

    The top of the layer should align with the horizontal line. It is aligned for IE on Mac, but NS Mac and IE PC it is a few pixels above the line.

    I realize I could test for the browser/OS type and make coordinates for every browswer and OS combination, but I was hoping someone knows a better method.

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think if you took screenshots and compared them you'd find that it's the line that's moving, not the box
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Zealot
    Join Date
    Jul 2002
    Location
    Fort Lauderdale
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah the problem seems to be that the font size is not interpreted the same on each browser

    Well then the way to make it work would be to set fixed width and height on everything that appears above the menus. Thanks for your help.
    Last edited by Vasudevelopa; Feb 22, 2003 at 00:13.

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Originally posted by Vasudevelopa
    Yeah the problem seems to be that the font size is not interpreted the same on each browser

    Well then the way to make it work would be to set fixed width and height on everything that appears above the menus. Thanks for your help.
    If you set your font size in pixels they will render correctly across all browsers. However, if you do set the font in px, your IE users won't be able to enlarge the text if they need to. It's your call.

  5. #5
    SitePoint Zealot
    Join Date
    Jul 2002
    Location
    Fort Lauderdale
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The fonts are rendered in px and you are right they do render the same. So in order to figure out where the unwanted space is coming from I set margin and padding of everything to 0.
    http://www.unpossible.cc/positioning.html
    It looks like NS has a mandatory margin below the text.


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
  •