+ 2
Can we use css overflow property with inline-block element?
Yeah... I checked and it's working but... is it valid ?
3 Antworten
+ 1
No, CSS "overflow" property should work only with block (or display: block) elements with specified height.
[Source: https://www.w3schools.com/cssref/pr_pos_overflow.asp]
But... I do not know if there is "valid property using" term in CSS.
So you can use it unless you found that it is working not in all devices/browsers.
+ 1
Yes it's valid... even with inline (non-block) elements (but they are turned to block for any value other than 'visible'):
"Specifying a value other than visible (the default) creates a new block formatting context. This is necessary for technical reasons — if a float intersected with the scrolling element it would forcibly rewrap the content after each scroll step, leading to a slow scrolling experience."
source: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow
- 1
get hmm... 🙂