CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 21st, 2002, 07:56 PM
endl endl is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Posts: 8 endl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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!

Reply With Quote
  #2  
Old March 22nd, 2002, 03:24 AM
noodles1100's Avatar
noodles1100 noodles1100 is offline
Corporate Stooge
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Aberdeen, Scotland
Posts: 134 noodles1100 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
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!

Reply With Quote
  #3  
Old March 22nd, 2002, 10:41 AM
endl endl is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Posts: 8 endl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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)

Reply With Quote
  #4  
Old March 22nd, 2002, 12:06 PM
degsy degsy is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2001
Posts: 1,882 degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 21 h 19 m 30 sec
Reputation Power: 13
<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>

Reply With Quote
  #5  
Old March 22nd, 2002, 01:19 PM
endl endl is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Posts: 8 endl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you very much!

Reply With Quote
  #6  
Old March 22nd, 2002, 02:17 PM
degsy degsy is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2001
Posts: 1,882 degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 21 h 19 m 30 sec
Reputation Power: 13
No probs

Quote:
.main3 a:hover {background: blue;}
}


That last } is a typo. It is redundant.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Separate CSS for tables?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway