Tuesday 27 October 2015

CSS ID and Class


CSS ID and Class its a bsic things of CSS. You must need to know about CSS ID and Class if you want to be a good designer.

CSS ID 

Its a uniqe part of division, thats mean its using DIV part of you HTML or Web page.

You can take CSS ID using any singel word/ name/ letter. 

CSS ID its declare with hash(#) tag its(#) take before your ID name [Such as #id_div{} ]

#header_div{
background-color: green;
width: auto;
padding:5px;
height:70px;
}

CSS Class

Its a uniqe part of division, its like child of CSS ID thats mean its using DIV part of you HTML or Web page.

You can take CSS Class using any singel word/ name/ letter. 

CSS Class its declare with dottet(.) tag its(.) take before your Class name [Such as .class_div{} ]

.post_div{
background-color: #fff;
width: auto;
margin-top:10px;
padding:5px;
border: 2px solid pink;
}

Watch Tutorial Video:


Example File Download Link: Click Here

Example Page View:

No comments:

Post a Comment