As we add some content n the div block the blocks come down in css positioning 3?why so?


Replace this line with your code.


because of how display: inline-block works under the hood, if you add text to all 4 divs everything should be good

I always found inline-block tricky to work with


and as if we add more text it go out of the box


yep, the boxes have fixed width and height, so the overflow will go outside the box.

you could use overflow, for example overflow-y:

div { overflow-y: scroll }

this will give you a scrollbar for overflow text


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.