Click here to Skip to main content
15,314,664 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Good evening to all in my code i am using many row and columns and tables in this many tables,tr,td having same css but the with and hight is different for example
CSS
.NamelabelSearchbyrestaurantname{color:#fff;font-size:12px;width: 120px;}
.NametxtboxSearchbyrestaurantname{color:#fff;font-size:12px;width: 240px;}


or create one css like and give the with is in tables,tr.

CSS
.NamelabelSearchbyrestaurantname{color:#fff;font-size:12px;}

My doubt is which one is better the single css or the separate css anyone give me the solution
thanks in advance
By
Meganathan M
Posted
Comments
[no name] 29-Jan-13 10:22am
   
Requirement not clear...
meganathanm 29-Jan-13 10:38am
   
thank you for your reply sisir patro the two css are having same color and font-size but the width are different if i create two css with same color,font-size and different width is better or create one css with same color,font-size and give width in element style.

1 solution

CSS
.Searchbyrestaurantname{color:#fff;font-size:12px}
.NameTypelabel {width: 120px}
.NameTypeTextbox {width: 240px}

usage
HTML
<table><tbody><tr><td class="Searchbyrestaurantname NameTypelabel">Label here</td></tr></tbody></table>
<table><tbody><tr><td class="Searchbyrestaurantname NameTypeTextbox"><input type="text"></input></td></tr></tbody></table>
   
Comments
fjdiewornncalwe 29-Jan-13 11:06am
   
+5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900