SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,053
    Mentioned
    66 Post(s)
    Tagged
    1 Thread(s)

    Firefox 3.5 issue on display inline-block

    I don't know if anyone else has come across this bug, but it's slightly annoying. I ran across it while building a unordered list <ul> and setting the list elements <li> to display inline block. This is for a pagination bar and so I want the elements flush to one another. I also want them shoved to the right so I set text-align: right on the <ul> element.

    When I did this I had a slight gap between each element. After fudging with it about a half hour I found that the carriage returns between the list elements was the source of the space, which is incorrect - the browser should not render carriage returns or any whitespace between tags.

    I was able to fix it of course, but it was annoying and I figured I'd post a report of it in case anyone else runs across it.

  2. #2
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Michael Morris View Post
    I don't know if anyone else has come across this bug, but it's slightly annoying. I ran across it while building a unordered list <ul> and setting the list elements <li> to display inline block. When I did this I had a slight gap between each element.
    Hi,
    It's not a bug, it is normal behavior for inline elements to produce whitespace nodes. If you will view your page in other browsers besides FF 3.5 you will find the same results.

    However, there is a new whitespace bug in IE8 that you should be aware of and it is very easy to fix it as shown in the link below.

    http://www.css-lab.com/misc-test/inline-block-ie8.html

    That example uses inline-block for the <li> and the slight gaps you see are the normal whitespace nodes.


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
  •