1 reply [Last post]
thme
thme's picture
Offline
newbie
Last seen: 4 years 36 weeks ago
Timezone: GMT+2
Joined: 2011-10-23
Posts: 1
Points: 2

how can i get my divs to stretch with my content. i have tried min-height (number of pixels)px; but it didnt seem to work how can i make this work guys.

http://game4vids.com/Browse_call_of_duty_modern_warefare_2.php

//mod edit: Moved to a more appropriate forum. Site checks is for completed site/page critiques. Fixed link. ~gt

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 3 hours 40 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9557
Points: 3614

Remove the height property

Remove the height property completely. The element will conform to its contents' height. That leads to other problems with the floats. See Inline=block galleries.

For a simple solution that works with what you've got, set the height to about 230px, and cut the top and bottom margins to about 6px. The inline-block method will make centering much simpler.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.