SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Mar 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Absolute Positioning in Firefox

    Hey gang,

    I'm attempting to a position a bunch of disjointed css span text rollovers using absolute positioning. They work perfectly in Safari. In Firefox, however, some of the spans show up in the proper position, while others are off by a pixel or two. Any ideas about what's causing this inconsistency? Are there special considerations for absolute positioning of <span> ?

    Cheers

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,296
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi Welcome to Sitepoint

    Without full code its hard to give an accurate answer but Firefox is usually pretty consistent. (IE6 is usually 1px out with absolute positioning when using right and bottom and the distance covered is an odd number of pixels.

    The first things to check would be:

    Have you zeroed padding and margins on related elements?
    Have you set a stacking context with position:relative on the parent?
    Have you set a consistent line-height.

    If its text that you are trying to position then text is always out between browsers just because they all handle it differently.

  3. #3
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Are there special considerations for absolute positioning of <span>
    Generally, no, but
    <legend><span>Some legend</span></legend>
    there are some places where Firefox will not place abso-po'd elements in the same place with respect to other browsers (the legend example will look the same in Safari, Chrome and Firefox... and lower in Opera and IE).

  4. #4
    SitePoint Member
    Join Date
    Mar 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool. Thanx guys!


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
  •