> How do i get CSS to only apply to part of a page?

How do i get CSS to only apply to part of a page?

Posted at: 2014-12-18 
For an existing section that is complete except for some styling feature, insert around the section







In the section, insert the additional style attributes.



Hi there,

In the css:

,somediv {color: red;}

#something { color: blue}

In the html in the body:

whatever



hea;lkdfj





Hope this helps,

Al

Write so the CSS applies only a specific div.

For example:

In your css file:

.somediv {

color: red;

}

and in the html you can do



whatever





So the css will only apply to the stuff inside the div.

You can do it more specifically and add a id to a certain element for example

so the CSS

#something {

color: red;

}

and the html

hea;lkdfj