Started playing around with html yesterday and I now have a question.
Whats the reason why I can't have two block elements inside of each eachother?
91 Answer
yes a block element can contain another block element. The default display value for most elements is block or inline.
.parent-div{ display:block; background:#000; width:100px; height:100px; overflow: hidden; } .child-div{ display:block; width:50px; height:50px; background:#fff; margin-top:25px; margin-left:25px; }<div> <div> </div> </div>