Computer Tips,tricks and Inspirational Writings In this Website Visit Again| THANKS

Watch youtube Exclusive Collection On- hqbioscope.blogspot.com | Hindi Mp4 DownLoad | English Mp4 Download

Tuesday, February 9, 2010

Why you need to use CSS class in webdesign

Written by:Md Sirajul Islam
7th February 2010
Under Category : css class complete tutorial
    Knowledge of css class is very important to design a website . You can specify a certain design or style to any number of elements . This is very much important  . A single instruction is set to lots of element , when you decide to change or upgrade , you just need to change this simple instruction set . This is a clean and safe design behaviour .

Importance of CSS class
    Say,In your website there is 100 pages and in each page you have set a certain element such as text box or image . If you set styling individualy in each  page element , afterwards when you decide to change the style of this page element what will you do ? You have to go through in each page coding to change it . If the number of  pages is larger and so is the number of element,then the coding change task will be so much pain full .
    But if you set a single css class and apply it to  any number of page elements in any number of webpage , when you decide to change or restyle , all you have to do go through a single css class.Then the effect will be applied to  all page elements related to the class .
    I think an example will clear the fact-


Example to show the importance of css class
css class code , watch the results below



Result or demonastration of the above html code




element1
element1
element1
but same class
element2
element2
element2
but same class
element3
element3
same class
element4
element4
same class
Download the source files
    Download two source file from this link

Documentation or Usage
To view the effect,open this introduction to css.html with word pad(select the file,right click,then select open with word pad) .  In  my class change the .9em to any number like .8em or .6em , see the effect.,or you can change the background colour to #F781BE  or any color you choose. or change the width valu from 80 px to any value like 60px