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.
精彩评论