I have the below div element:
<div style="width: 40px; height: 40px; overflow: hidden; display: inline;">
Hello my friend, How are you?</div>
The width is always ignored! how could I have it as 40px?
Thanks,
Use display:inline-block;
. Size properties are ignored at most elements with display:inline
.
<div style="width: 40px; height: 40px; overflow: hidden; display: inline-block;">
Hello my friend, How are you?</div>
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