If block-level elements have each been given a width of 30px and they exist within a a container that is larger than 60px, will the two elements display side by side?

Question

If block-level elements have each been given a width of 30px and they exist within a a container that is larger than 60px, will the two elements display side by side?

Answer

No. Block level sibling elements will sit on top of each other and never side by side. When we set the width property of a block level element the dimensions of its content area will be modified accordingly. Any free space will be “eaten” up by margin thereby pushing any adjacent elements to a new line.