The selector here (div.img) selects all of the divs in the image class right? What I don’t understand is what is the second img for? I’ve done a little CSS before but I’ve never come across this syntax.
div.img img
{
display: inline;
margin: 3px;
border: 1px solid #ffffff;
}
The second image selects
<img>tags inside<div class="img">tags; the space tells the selector to look at all descendant elements of the<div>.So, if we have
The
<img>tag will have a white border, a 3px margin and be displayedinline.