Can overflow: auto work on elements without any rules for width and height? If yes, then when can this happen?
When a word exceeds the bounds of an element, it will overflow past it and by default CSS won't break the word. In such cases overflow: auto will add a scrollbar to scroll to see the overflowing content.
In an element, how can we make the horizontally overflowing content automatically scrollable and the vertically overflowing content hidden?
To configure x and y overflows separately we can either use the overflow property with two parameters or the properties overflow-x and overflow-y. Refer to CSS Overflows for more info.
In the following div how can you break the overflowing word to fit into the container?
Can we expect the following element to be vertically scrollable by the CSS code shown below? If not, then give a reason.
If a custom height is not defined then the element will keep on extending in this dimension to fit the overflowing content. Content in it will simply never overflow and hence the CSS rule won't get into action.