SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    May 2007
    0 Post(s)
    0 Thread(s)

    CSS DIV Layout problem

    Hi all

    Not quite sure what is happening with my css but I have created a div that holds an image and text from a database. This is done by a php while loop.

    There is not a problem in Firefox but in IE the DIV's start coming out of line with one another and sometimes putting big gaps in the content area where there shouldn't be. I can't see what the problme is when all the php is doing is lopping the same DIV for each peice of data in the Database.

    Can anyone help?

    Here is the page


  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Hampshire UK
    183 Post(s)
    6 Thread(s)

    I couldn't see evidence of a problem on that page, Therefore I'm guessing that the problem is that some of your captions are running to 2 lines and making some of those floats higher than the others.

    If this is the case then when the floats wrap to another line they will snag on the tallest float and the layout will go all out of sync. You need to set a height that will accommodate your longest caption and apply that to all floats or else crop the captions to one line if possible.

    There is a very complicated example here that allows for any length of caption.

    If that's not the problem then a link to a page showing what you mean would be helpful

    BTW you need to clear the floats in firefox to make the background extend around them.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts