Float problem: Creating list of thumbnails with background color
On http://www.dhimoet.com/photography/videos/ I want the thumbnails to be inside the big gray box. Because display:float is applied to the correspondent div tags, the thumbnails separate themselves from the parent container.
The div structure is like this:
I also tried to use the display:inline instead of float:left and it did not work well. Screenshot is provided below.
some stuff with gray background
one thumbnail with left float
another thumbnail with left float
Please help me find the solution. Thanks!
Last edited by dhimoet; 11-24-2011 at 07:10 PM.
You could adjust the height setting of the "thumbnails-wrapper" <div>. "float" removes the element from the normal document flow, so the parent containing <div> won't automatically expand vertically to encompass them. Good luck!
Adjusting the height of the div would make it static, right? Is there a way to make the height automatically adjusted? The height of one row of thumbnails is different with the height of two or more rows of thumbnails.
Thank you for your input.
Hi there dhimoet,
instead of this...
...try this modification...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)