Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
03-12-2005, 02:35 PM #1
- Join Date
- Mar 2005
- Thanked 0 Times in 0 Posts
Odd spacing caused by float:right and float:left together
I have converted an image gallery from tables to css. Each thumbnail is in a div with float: left, so they line up in a nice grid. There is also a single larger image at the top right of each page. Using float: right on the larger image places it correctly, but depending on the width of the browser window it causes strange spacing of the thumbnails.
Here is the page in css:
(if the first row of thumbnails looks normal, resize the browser window to see the problem)
Here is the style sheet:
And for comparison, here's the original layout in tables:
Is there a way to resolve this? If it weren't for the text I could adjust the height of the larger image so the first row of thumbnails would always break neatly. But with that text there, it's hard to predict where the break needs to be. I tried putting clear:right on the thumbnails, but that just pushes all of them down below the larger image.
Thanks so much for your help!