HTML and CSS Reference
In-Depth Information
The CSS applied to the image in the box above is as follows:
img {
float: left;
margin: 0 15px 5px 0;
border: solid 1px #bbb;
}
The only property required to make this e " ect work is the float property.
The other properties (margin and border) are there for aesthetic reasons.
The other elements inside the box (the <p> tags with text inside them) do
not need any styles applied to them.
As mentioned earlier, floated elements are taken out of flow in relation to
other block elements, and so other block elements remain in flow, acting as
if the floated element is not even there. This is demonstrated visually below:
Search WWH ::




Custom Search