Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
How to control text in a table
Old 05-09-2008, 04:15 PM How to control text in a table
Experienced Talker

Posts: 38
Name: jim
Trades: 0
Newbie question: I am trying to define the text inside a table. Using the body text definition below, the text in the table was partially correct but not completely. I then tried to define the text in the table object, but it doesn't work either. Can anybody help me write this correctly?

<style type="text/css">
body {
font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif;
font-size: 12px;
font-weight: normal;
color: #111133
}
table.a {
font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif;
font-size: 12px;
font-weight: normal;
color: #113311
}
</style>

...

<table class="a" width="300" etc.

...
jwriter is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-09-2008, 07:13 PM Re: How to control text in a table
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
The styling in the body will cascade to everything in it, so the styling on the table class, which only differs on color, is largely redundant. You could get by with this:

table.a{color: #113311;}

I would urge you to just forget the tables altogether unless you're using them for TABULAR DATA.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-09-2008, 07:46 PM Re: How to control text in a table
Experienced Talker

Posts: 38
Name: jim
Trades: 0
Thanks LNR... I tried using just the body style and it did not cascade into the table (it did work in the rest of the body however). Maybe the problem is the table is nested inside a <form> </form> statement. If you want to see the complete html, it is at...
http://www.jwwriter.com/demo/login_c.html
I am just trying to control the font inside the table with CSS. Any help appreciated.
jwriter is offline
Reply With Quote
View Public Profile
 
Old 05-10-2008, 07:57 PM Re: How to control text in a table
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
I put this into your styles and worked just fine - changed the color to green..

table {color: #1F5C20;}

Based on what little you have there, that should work, unless you've got something else that I'm not seeing.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-11-2008, 01:24 AM Re: How to control text in a table
Experienced Talker

Posts: 38
Name: jim
Trades: 0
Hmmm, this is strange. I put a screen capture jpg on the page to show you how the fonts look on my system. The table text is definitely 2-3 times bigger than the rest of the body text...

http://www.jwwriter.com/demo/login_c.html

Are you seeing something different on your system? I would sure like to know why - it's a mystery. --jw
jwriter is offline
Reply With Quote
View Public Profile
 
Old 05-11-2008, 12:42 PM Re: How to control text in a table
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
It might have something to do with your erroneous code:

Quote:
<body background="world5.gif" bgcolor="#CCCCCC">

<center>
<br><br><br><br><br>
<font

<!-- login table ----->


<form name="form1" method="post" action="checklogin.php">
You have an opening and improperly written <font> tag (which you should NOT be using), get rid of it.

You have no DOCTYPE - you must have one if you want anything close to consistent cross-browser compatibility.

If you're going to use css, you won't need that deprecated <center> thing either, or all those <br>'s - -ALL of that can and should be done with CSS.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-11-2008, 02:35 PM Re: How to control text in a table
Experienced Talker

Posts: 38
Name: jim
Trades: 0
Fantastic. Adding the DOCTYPE made the fonts cascade. I used...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
For any other newbies out there, I found the list of doctypes at...
http://htmlhelp.com/tools/validator/doctype.html

There is one new problem, and that is my comments now appear on screen, but basically the problem is solved - thanks.
jwriter is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to control text in a table
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24669 seconds with 12 queries