Home Tutorial CSS CSS div (Div)

MSN Random Online

CSS div (Div) PDF Print E-mail
Written by Administrator   
Monday, 17 September 2007 02:57

CSS div

Defines the properties for a pre-defined content block in a document.

Browser/User Agent Support

IE Netscape Mozilla Opera Safari
2.0+ 2.0+ 1.0+ 4.0+ 1.0+



This example colors the background for all divs yellow and gives them a red font:

div {
background-color: yellow;
color: red;


Usually, you will assign a class or id to a div to style it, rather than styling all divs.


Top Members

No top members yet.