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 February 20th, 2002, 03:59 PM
MikeeX MikeeX is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Bako, CA
Posts: 42 MikeeX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Talking CSS Class Question

The CSS file that I am creating is going really well, but I'm stuck on a part that I am not sure what to do. I have tried many, many differnet things and am not able to get it to work.

What I want to do is make all <td>'s by default the color WHITE unless otherwise specified. I have some <td>'s that I want "#183cad" color code. Here is my current CSS File:

***********

BODY
{
FONT-SIZE: small;
BACKGROUND: url(images/bg.gif) #000000 fixed;
MARGIN: 0px;
HEIGHT: 0pt
}
A:visited
{
FONT-WEIGHT: normal;
FONT-SIZE: 12px;
COLOR: #000000;
FONT-FAMILY: Tahoma, Verdana, Helvetica, sans-serif;
TEXT-DECORATION: none
}
A:link
{
FONT-WEIGHT: normal;
FONT-SIZE: 12px;
COLOR: #000000;
FONT-FAMILY: Tahoma, Verdana, Helvetica, sans-serif;
TEXT-DECORATION: none
}
A:active
{
FONT-WEIGHT: normal;
FONT-SIZE: 12px;
COLOR: #000000;
FONT-FAMILY: Tahoma, Verdana, Helvetica, sans-serif;
TEXT-DECORATION: none
}
A:hover
{
FONT-WEIGHT: normal;
FONT-SIZE: 12px;
COLOR: #183cad;
FONT-FAMILY: Tahoma, Verdana, Helvetica, sans-serif;
TEXT-DECORATION: underline
}
TD
{
background-color: white;
}

*******************

How do I code in here to specify "#183cad" for different <td>'s ??

Any help would be greatly appreciated!!!!!!!!

Reply With Quote
  #2  
Old February 20th, 2002, 04:02 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
try using classes or unique ids.
i.e.

<td class="class1"></td>
and
<style>
td { background-color: <your default color here> }
.class1 { background-color: #183cad }
</style>

or for the ids:
<td id="firsttd"></td>
<style>
#firsttd, #secondtd, #thirdtd { background-color: #183cad }
</style>

Reply With Quote
  #3  
Old February 20th, 2002, 04:18 PM
MikeeX MikeeX is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Bako, CA
Posts: 42 MikeeX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
I have tried both the CLASS and ID Tags within my HTML code to call the funtion in my .css file. I am using an inline CSS File, does this matter? Or does it have to be done a differnet way? Now my CSS File looks like so....

*******************

td
{
background-color: white }
.blue { background-color: #183cad }

*********************

That's just the last piece. Is that right? If so, it doesn't work. Thanks in advance!!

Reply With Quote
  #4  
Old February 20th, 2002, 04:25 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
if you use <td class="blue">...</td> it should work since the last definition should override the first.

it should not matter (in some rare cases it does though) if you use inline css or a linked (<link rel="stylesheet"...>) css.

there is some other misunderstanding. there is no functions in css...

if you experience problems on a specific browser only, try not setting up a default color but adding class or id properties to ALL <td> tags.

Reply With Quote
  #5  
Old February 20th, 2002, 04:38 PM
MikeeX MikeeX is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Bako, CA
Posts: 42 MikeeX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
I can't believe I'm having this hard of a time getting this to work hahaah. Anyways, I took into consideration your suggestion on not setting a default color for <TD>'s. So I used the following code in my .css file:

********************

TD
{
.white { background-color: white }
.blue { background-color: #183cad }
}

*******************

Should this code work?

Reply With Quote
  #6  
Old February 20th, 2002, 04:41 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
try yourself. i am busy answering other peoples questions right now

Reply With Quote
  #7  
Old February 20th, 2002, 04:42 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
aaaaah sorry, i think you got the syntax messed up.

it should be:

TD.white { background-color: white }
TD.blue { background-color: #183cad }

Reply With Quote
  #8  
Old February 20th, 2002, 04:42 PM
MikeeX MikeeX is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Bako, CA
Posts: 42 MikeeX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Well I did try it ;-) And it didn't work for some reason. I'll just keep playing with it. Thanks alot for your support!!!

Reply With Quote
  #9  
Old February 20th, 2002, 04:46 PM
MikeeX MikeeX is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Bako, CA
Posts: 42 MikeeX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
AHH HAY! You are the man :-)

Thank you much

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS Class Question


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