开发者

Floating DIV Containers

开发者 https://www.devze.com 2023-02-24 05:53 出处:网络
Am actually creating a News Container and within it news content with heading, images(if any), summary and eventually a read more link.

Am actually creating a News Container and within it news content with heading, images(if any), summary and eventually a read more link.

The news content is placed in a DIV with a fixed width but i dont want a fixed height however开发者_StackOverflow中文版.

The issue is that i want the containers to float on the left, which works but since the height are not the same am getting a white space between the 3rd and 4th one.

How can i fix this?


you no need to specify height.the height will be automatically adjusted based on the content size.

<div id="news-content"></div>

css

#news-content
{
width:100%;
float:left;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消