Reputation: 13129
I've put it up in a fiddle: http://jsfiddle.net/6kq2r/
I'm trying to set a min-width on a child with a percentage value (and I've tried to set the parent's width with a % or a px and it doesn't make a difference).
<div style="width:60%;border:1px solid red;">
<div style="border-bottom:1px solid blue;min-width:60%;">
TEXT GOES HERE
</div>
</div>
Is it possible to do what I intend?
Upvotes: 4
Views: 14359
Reputation: 1526
It is possible to achieve that with a DIV if you set the display to inline (or inline-block perhaps). The difference is that SPANs have inline display by default and DIVs have block display by default.
Upvotes: 1