redarrow Posted May 30, 2008 Share Posted May 30, 2008 advance thank you..... becouse i use the same color with inline css i get the dreaded warning from valdation please can u tell me how to get rid off the warning.. can someone kindly show me how to use the same color with inline css..... thank you........ <table align="center" style="border-style: solid; background: #FF0000; border-color: #FF0000; width: 692px;"> <tr> <td style="width: 20%; background: #808080;" align="center"> <a style="text-decoration: none;" href="index.php">Home</a> </td> <td style="width: 20%; background: #808080;" align="center"> <a style="text-decoration: none;" href="services.php">Service</a> </td> <td style="width: 20%; background: #808080;" align="center"> <a style="text-decoration: none;" href="sale.php">For Sale</a> </td> <td style="width: 20%; background: #808080;" align="center"> <a style="text-decoration: none;" href="links.php">Links</a> </td> <td style="width: 20%; background: #808080;" align="center"> <a style="text-decoration: none;" href="contact.php">Contact Us</a> </td> </tr> </table> Quote Link to comment Share on other sites More sharing options...
haku Posted May 30, 2008 Share Posted May 30, 2008 The same color as what? What is the error you are getting? Your use of CSS here is very inefficient. It basically goes against the whole idea behind CSS - only have to declare something one time. Put this in the head of your document: <style type="text/css"> td { width: 20%; background: #808080; text-align: center; } a { text-decoration: none; } </style> and change your td tags to look like this: <td> and your 'a' tags to look like this: a That will cut your code significantly, and if you want to change anything you will only have to change it in one spot, rather than every single tag on the page. It makes your code more compact and easier to read as well. Quote Link to comment Share on other sites More sharing options...
redarrow Posted May 30, 2008 Author Share Posted May 30, 2008 SOLVED Thank you very much i understand that mate ......... well put...... 10/10 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.