Hi there new to css and there is something I don t understand for example

div.img img
  {
  display:inline;
  margin:3px;
  border:1px solid #ffffff;
  }

what does the other img represent, what is this? I understand that the class called img is going to be applyed on the div tag in the html body but what is the other img?? is this like a recursion in programming something inside something?

What this selector means is that you are going to select an image element that is within a div element that has been assigned a class called "img". So for example, this is the image element that would be selected...

<body>
  <div class="img">
    <img src="#" alt="image" height="50" width="50" />
  </div>
</body>

o thanks, i dont know why w3c schools did not mention this kind of thing and by the way how is this syntax called?

i dont know why w3c schools did not mention this kind of thing

W3Schools is great for a beginners, simple overview. The site has some mistakes, but most importantly, that site should not be confused with the W3C.

and by the way how is this syntax called

Its just known as "Seletors". Selectors may range from simple element names to more complex representations. Take a look at this article on the W3C site that goes into Selectors in much more detail. This article covers CSS3.

http://www.w3.org/TR/css3-selectors/

commented: man, you re the best! +2
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.