开发者

Display a div at a certain width and resize smaller when browser windows shrinks. Without Javascript

I like to display a div at width, say 900px initially and when the browser window shrinks below 900px, the div shrinks with it. I like to do th开发者_如何转开发is without using Javascript. I tried adding min-width:0px to the div but it didn't help.


So you want a max-width?

By default a div is width: auto and using a standard block box, so it will expand to fill the available horizontal space. max-width will constrain it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜