XHTML/ CSS = Child Selector

Elements within another tag are the child of that tag. 

(i.e. <html> <body> <body> </html> In this example we see the body is inside the parent tag <html></html> )

If you want to style elements that are within one of the tags you can specify that child by adding the child selector css style tag. It looks like this:

<style>

div > p {
    background-color: yellow;
}


</style>

<div>

<p> fhijfhwfhd </p>

</div>

The above shows that by using the > sign you are indicating that the child of div is what I want to be style and that's it. 

https://www.youtube.com/watch?v=veKHw125UJs&index=23&list=PLC1322B5A0180C946

Comments

Popular posts from this blog

Pyhton 3.4 - Continue

Conversations Ongoing: Valuing Modernization in Early European History

Conversations Ongoing: A Bunch of Amateurs