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


#1


Replace this line with your code.


#2

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


#3

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


#4

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


#5

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