user1907849 user1907849 - 7 months ago 11
HTML Question

Placing divs side by side

I am trying to place three divs side by side and
fourth div in the next row. I used

float:left
and
width:33%
.
What else property I need to apply to achieve this?

https://jsfiddle.net/wdvpubau/

Edit: One more thing regarding the same css styles,
I made property display:inline within css
.divinline
, but there is no difference in rendering. I had learnt that display:block will occupy the entire row. Is it being overridden?

Answer

Don't add . in class attribute of HTML, it is only needed in CSS.

Demo

Comments