SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Location
    California
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Extra line break when floating

    HTML Code:
    <div><input> <div style="float:right">Blah</div></div>
    Anyone know why theres an extra line break before the float and how to correct it? I wanted the Blah and the input to be on the same horizontal plane.

    I'm getting that itch to switch back to tables .. I mean it has its advantages too..like I get to finish my site with some hair left and getting some actual sleep!!

    Anyhow...yea if anyone knows why?...Please lend this CSS newbie a helping hand.

    Thanks

    (I'm on Firefox:Ubuntu btw incase its a browser/OS thing)

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd also like to take a look at the full HTML and CSS source code, if possible. Something just doesn't look right here, at least from where I'm at.

  3. #3
    SitePoint Enthusiast Northern Star's Avatar
    Join Date
    Aug 2006
    Location
    Cheshire, UK
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jaffizzle
    Anyone know why theres an extra line break before the float and how to correct it? I wanted the Blah and the input to be on the same horizontal plane.
    By 'Horizontal Plane' are you refering to the same effect you'd get using...

    Code:
    <td valign="middle">
    ??

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Location
    California
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies, but I got it working by putting a div around the <input> and floating it left.

    And that is the actual code, maybe its browser specific.

  5. #5
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I meant, "I'd like to see the complete Web page, if possible."

    I've seen some very weird things happen with browsers rendering HTML and CSS code.

    For example, I recently had a problem with a menu I was working on for a client's site. Internet Explorer would not let me click on the links. In fact, it wouldn't even acknowledge that the links were there (despite rendering teh text, background colors and everything else I was using). Every other browser handled it perfectly; the code was 100% valid, semantic, structured and well-formed (and warning-free as far as the CSS goes), but Internet Explorer refused to cooperate.

    Turned out it was a depth-sorting error that was easily fixed by adding position: relative; and z-index: 1; to the style rule for that particular menu.

  6. #6
    SitePoint Enthusiast Northern Star's Avatar
    Join Date
    Aug 2006
    Location
    Cheshire, UK
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We all love Microsoft


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
  •