Absolute positioning <span> in Firefox?

Discussion in 'CSS' started by GrooTheWanderer, Mar 29, 2011.

  1. #1
    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 their proper positions 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
     
    GrooTheWanderer, Mar 29, 2011 IP
  2. style0

    style0 Peon

    Messages:
    108
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    A link would be useful.
     
    style0, Mar 29, 2011 IP
  3. finna

    finna Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Make sure that is has both top and left positions or bottom and right are set.

    
    <html>
    <body>
     <div class="container">
      <span>floating element</span>
     </div>
    </body>
    </html>
    HTML:
    
    span {
     position:absolute;
     top:0px;
     left:0px;
    }
    Code (markup):

    And also place a position:relative to the parent element or body tag to make it consistent.

    
    body, div.container {
     position:relative;
    }
    Code (markup):
     
    finna, Mar 29, 2011 IP
  4. GrooTheWanderer

    GrooTheWanderer Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Cool. Thanx for the help!
     
    GrooTheWanderer, Mar 31, 2011 IP