CSS: Div Class


Div Classes are an easy & powerful way to specify a CSS element on your website. View this quick example below:

Now lets say you want to have the content in the first div turn blue. You could easily add the folowing rule in CSS:

If you want the content of the second div to turn blue you can use the code below. This will make sure that only the content in the second div will turn blue.

and that is really all there is to it. You can create as many div classes as you’d like, and you can easily edit them in CSS using the structure outlined above.


Leave A Reply