Reputation: 13263
Consider the following markup
<div id="container"><div id="child"></div></div>
I need the #child
not to change it's width when the #container
is being resized (for example, when resizing browser window). How can this be done using css without fixing the child's width?
Also, is it possible to allow decrease in child's width but forbid increase?
Upvotes: 0
Views: 4004
Reputation: 12916
You could make the child div's display: "inline" or "inline-block"
#child {
display: inline-block;
}
Upvotes: 1