Current location: Hot Scripts Forums » General Web Coding » CSS » TD style help


TD style help

Reply
  #1 (permalink)  
Old 01-12-07, 07:56 AM
txt3rob txt3rob is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
TD style help

Code:
<td style="padding: 4px;color:black;">
does this look correct to you?
trying to make all text ignore the stlye in CCS and replace it with black font
__________________
N00b Coder! One of those guys who collects bits of code and puts them together and carnt really code for himself
Reply With Quote
  #2 (permalink)  
Old 01-12-07, 07:58 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Moving this topic to CSS...
Reply With Quote
  #3 (permalink)  
Old 01-12-07, 08:43 AM
Vicious's Avatar
Vicious Vicious is offline
Community VIP
 
Join Date: Jan 2007
Location: Belgium
Posts: 584
Thanks: 0
Thanked 0 Times in 0 Posts
This will work, but you will need to override all other mark-up too.

So if you have defined this:
Code:
td {color:#f00;font-weight:bold;}
and then you put your piece in the HTML:
Code:
<td style="padding: 4px;color:black;">
You will end up with black text... but bold.
Reply With Quote
  #4 (permalink)  
Old 01-12-07, 08:51 AM
txt3rob txt3rob is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
my current css is
Code:
<style type="text/css">
    <!--body {  background-image: url(http://sub.outallnite.co.uk/images/background.gif);   margin-left: 0px;   margin-top: 0px;    margin-right: 0px;  margin-bottom: 0px;}.style1 {   font-family: "Trebuchet MS", Verdana, sans-serif;   color: #FFFFFF; font-size: 14px;    font-weight: bold;}.style2 {color: #FFFFFF; font-size: 12px; font-family: "Trebuchet MS", Verdana, sans-serif;}.style3 {color: #000000}.style5 {font-family: "Trebuchet MS", Verdana, sans-serif; color: #666666; font-size: 12px; font-weight: bold; }body,td,th { font-family: Trebuchet MS, Verdana, sans-serif; color: #FFFFFF;}a { font-family: Trebuchet MS, Verdana, sans-serif; font-size: 12px;    color: #FFFFFF;}a:link {    text-decoration: none;}a:visited {  text-decoration: none;  color: #FFFFFF;}a:hover {   text-decoration: underline;}a:active {  text-decoration: none;}.style7 {color: #FFFFFF; font-size: 11px; font-family: "Trebuchet MS", Verdana, sans-serif; }-->
    </style>
if thats any help i think i already have a TD defined not to sure.
shall i just add .td2 or something and then call it up by
<td style="td2" etc?
__________________
N00b Coder! One of those guys who collects bits of code and puts them together and carnt really code for himself
Reply With Quote
  #5 (permalink)  
Old 01-12-07, 08:55 AM
Vicious's Avatar
Vicious Vicious is offline
Community VIP
 
Join Date: Jan 2007
Location: Belgium
Posts: 584
Thanks: 0
Thanked 0 Times in 0 Posts
Well, you defined CSS between <style>-tags.

And in your first post, you wrote
Code:
<td style="padding: 4px;color:black;">
That's called "inline CSS", and it will always override the CSS you wrote between <style>-tags.

So it's no problem you already have defined TD in between your <style>-tags. The inline css will override that, but only for that specific TD.
__________________
Jack Bauer makes Chuck Norris cry
Reply With Quote
  #6 (permalink)  
Old 01-15-07, 05:01 AM
txt3rob txt3rob is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Cheers dude its sorted now
__________________
N00b Coder! One of those guys who collects bits of code and puts them together and carnt really code for himself
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update textbox style with javascript HairySpider JavaScript 5 10-01-06 05:08 PM
Blogger style script Arctic Script Requests 1 08-03-05 01:50 AM
External style sheets cached? davidjam CSS 3 07-22-05 08:16 AM
Modifying style attributes andreasberglind ASP.NET 0 02-27-04 12:00 PM
Looking for the best Hot Or Not style script. where is it? bunder Script Requests 1 01-08-04 06:08 PM


All times are GMT -5. The time now is 01:58 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.