Class and ID
In CSS, both Classes and ID's are used to define the sytle of certain elements inside the hypertext document. An ID is a unique identifier to an element. The main difference between Classes and unique Identifiers is that Classes can be used several time in the same hypertext document, whereas an ID can be used only once. Below is an example of how to use a Class and an ID Class Example:
.image {
border:5px solid #000;
margin-left:50px;
}
ID Example:
#logo {
border:5px solid #000;
margin-left:50px;
}
Comments (0) 14.09.2007. 07:40
Home