I wonder - why "text 2" is not underlined?
<div style="text-decoration: underline;">
<div>text 1</div>
<div style="display: inline-block;">
<div>text 2</div>
</div>
<div style="display: inline;">
<div>text 3</div>
</div>
<div style="display: block;">
<div>text 4</div>
</div>
</div>
You can find the following sentences on the CSS specification:
Underlines, overlines, and line-throughs are applied only to text (including white space, letter spacing, and word spacing): margins, borders, and padding are skipped. User agents must not render these text decorations on content that is not text. For example, images and inline blocks must not be underlined.
http://www.w3.org/TR/CSS2/text.html#lining-striking-props
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With