SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: CSS weirdness

  1. #1
    SitePoint Zealot
    Join Date
    Jul 2003
    Location
    Boston
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow CSS weirdness

    http://www.mymobility.us/inside.htm

    Why in Internet Explorer 6 does "about sal" jump to the next line?

    Thanks for any ideas!
    -Lewis

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,803
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    I think IE likes a width on its floats.

    e.g.
    Code:
    #head div ul a:link, #head div ul a:visited {
     float: left;
     display:block;
     padding:5px 6px 2px;
     border-width:0;
     border-style:none;
     border-right:1px solid #06f;
     text-decoration: none;
     color: #999;
     width:60px;
     }
    Paul

  3. #3
    Ensure you finish what you sta bronze trophy John Colby's Avatar
    Join Date
    Aug 2003
    Location
    University of Central England, U.K.
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A floated box must have a width - according to the CSS spec - either explicitly or intrinsically from an included element like <img> or <object>

    CSS spec is:

    "A floated box must have an explicit width (assigned via the 'width' property, or its intrinsic width in the case of replaced elements). Any floated box becomes a block box that is shifted to the left or right until its outer edge touches the containing block edge or the outer edge of another float. The top of the floated box is aligned with the top of the current line box (or bottom of the preceding block box if no line box exists). If there isn't enough horizontal room on the current line for the float, it is shifted downward, line by line, until a line has room for it."

    from http://www.w3.org/TR/CSS2/visuren.html#floats
    Last edited by John Colby; Nov 9, 2003 at 16:10.
    John
    No electrons were harmed during the creation, transmission
    or reading of this posting. However, many were excited and
    some may have enjoyed the experience.

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,803
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    Thanks for explaining in detail John, I knew the specs said that floats must have a width that but I was being lazy

    Paul

  5. #5
    Ensure you finish what you sta bronze trophy John Colby's Avatar
    Join Date
    Aug 2003
    Location
    University of Central England, U.K.
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Paul O'B
    Thanks for explaining in detail John, I knew the specs said that floats must have a width that but I was being lazy

    Paul
    Only know about it explicitly because I was wrting a teaching lab session on it half an hour beforehand.
    John
    No electrons were harmed during the creation, transmission
    or reading of this posting. However, many were excited and
    some may have enjoyed the experience.

  6. #6
    SitePoint Zealot
    Join Date
    Jul 2003
    Location
    Boston
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, you hit the nail on the head. I overlooked that because http://www.adaptivepath.com/publications/ uses the same technique; however, for some reason he does not need to declare widths. Any ideas?
    -Lewis

  7. #7
    SitePoint Zealot
    Join Date
    Jul 2003
    Location
    Boston
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    white-space:nowrap;

    Code:
    white-space:nowrap;
    Does the trick. Right under my nose!
    -Lewis


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
  •