|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Separate CSS for tables?
Hello
I would like to have what amounts to a completely separate style for a table. I have been trying to make a class but it won't work with with pseudo-classes. I can't find the answer in any of my instruction material. How do I do this? Thanks much in advance! |
|
#2
|
||||
|
||||
|
You can assign different styles to all HTML tag.
e.g. TABLE { font-size: 10px; font-color: "#0e0e0e" }
__________________
Never sign your code....it leaves you liable! |
|
#3
|
|||
|
|||
|
Thanks noodles
It's just that I want the styles to work with one table only. I do have a style for table already. The biggest problem seems to be with things such as the "a" pseudo-class selectors which, in the following case, the a:link, for instance, takes over the whole page even though it is in a class. I am putting the class in the table tag <.table class="main3"> .main3 { background: orange; a:link {color: blue;} a:visited {color: red;} a:hover {background: blue;} } (colors for testing purposes) |
|
#4
|
|||
|
|||
|
<html>
<head> <title>Untitled Document</title> <style> .main3 { background: orange;} .main3 a:link {color: blue;} .main3 a:visited {color: red;} .main3 a:hover {background: blue;} } a:link {color: green;} a:visited {color: black;} a:hover {background: black;} </style> </head> <body bgcolor="#FFFFFF" text="#000000"> <table width="200" border="1" cellspacing="0" cellpadding="0" class="main3"> <tr> <td> <p>Text</p> <p><a href="#">Link</a></p> </td> </tr> </table> <p>Text </p> <p><a href="#">Link</a></p> </body> </html> |
|
#5
|
|||
|
|||
|
Thank you very much!
|
|
#6
|
|||
|
|||
|
No probs
Quote:
That last } is a typo. It is redundant. |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Separate CSS for tables? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|