CodeClerks

Reduce css or html is better or not?



Write the reason you're deleting this FAQ

Reduce css or html is better or not?

Hi all,
I am learn css by myself and now i learnd <div> and <id> and i write followings:
.imhed{width:700px;height:320px;padding:3px;}
.longbanner{width:710px;height:28px;background-color:rgb(252, 183, 62);padding-left:10px;padding-top:2px;padding-

bottom:2px;font-size:14px;}
.kongbai{width:700px;height:120px;padding:10px;}
.lfsmall{width:120px;float:left;height:110px;padding:5px;}
.rgbig{width:550px;float:left;height:110px;border:1px dashed gray;padding:5px;}
.st-or{width:700px;padding:10px;}
.btorr{width:680px;padding:5px;border:1px dashed gray;}
.stto{width:700px;padding:10px;}
.kyky{width:700px;height:70px;padding:5px;}
.av-01{width:350px;float:left;padding-left:3px;}
.yaya{width:300px;height:50px;float:left;padding:5px;}
.nnmm{width:700px;height:160px;padding:10px;}
.bcba{width:155px;height:140px;float:left;padding:5px;}
.ztjcbh {width: 710px; height: 28px; background-color: rgb(252, 183, 62); padding-left: 10px; padding-top: 2px;

padding-bottom: 2px; font-size: 14px; font-weight: bold; }
.erjibh {width: 350px; float: left; padding-left: 3px; font-weight: bold; }

but i am not sure about my website and i think these css too much. Which way to less than this css?
anyone have a good idea? let me know and many thanks.

Comments

Please login or sign up to leave a comment

Join
robertman11
Less is faster and usually better. This doesn't look like too much CSS though.



Are you sure you want to delete this post?

samxim
Yep. I got it. I just not sure about this now i see. then i will use this. thank you very much.



Are you sure you want to delete this post?

Everett
Hello,

You can simplify the CSS when 2 classes or ids have the same styles:


[HTML].st-or, .stto{width:700px;padding:10px;}[/HTML]

You can also put all the CSS on one line, this may speed up your website a bit however it's hard to edit (i like to show CSS formatted).

Kind Regards,
Everett



Are you sure you want to delete this post?