SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict frankiehots's Avatar
    Join Date
    Jan 2002
    Location
    U.S.A. *Blue State*
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Float: right pushes down content on left

    I always run into this problem, so I figured it's time to learn what I am doing wrong. Many times when I float a div to the the right of some content, the content gets pushed down below the bottom of the div. In the latest case, it's a table whose width I am setting as a percentage. Here is the page I am working on:

    http://www.ehspublishing.com/cart/home.php?cat=255

    Here is the stylesheet:

    http://www.ehspublishing.com/css/screen.css

    The thinking is that since I am setting the width as a percentage it should squeeze in beside the div nicely. This problem happens in IE6, but not in Firefox.

    Excuse some of the bad excessive HTML on the page. Some of tha page's code is generated by a shopping cart and I haven't had time to clean it all up.

    Any thoughts on why the content gets pushed down?

  2. #2
    SitePoint Guru
    Join Date
    Jun 2004
    Location
    Finland
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds like a rounding error, try taking a few % off of the width.

  3. #3
    SitePoint Addict frankiehots's Avatar
    Join Date
    Jan 2002
    Location
    U.S.A. *Blue State*
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It does work when I lower the width of the table down to 70%, but I was hoping to use 90-100% of the width once the content gets down below the div on the right.


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
  •