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
CSS: all td's of a table behave acording to the table
Old 05-03-2005, 12:55 PM CSS: all td's of a table behave acording to the table
Recrehal's Avatar
Experienced Talker

Posts: 39
Location: Aachen, Germany
Trades: 0
If I want borders around all my <td>'s, but want a class called "navigation" to not have a border, is there a way to assign the class only to the surounding table? CSS doesn't make sense if I have to assign each and every td to the class navigation so I know there is a way.

In other words, what is to do to use

HTML Code:
<table class="navigation">
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
</tr>
</table>
instead of

HTML Code:
<table>
<tr>
<td class="navigation">a</td>
<td class="navigation">b</td>
<td class="navigation">c</td>
</tr>
</table>
[CSS]
td
{
border: 1px solid #000000;
}

.navigation
{
border: 0px;
}
[/CSS]
Recrehal is offline
Reply With Quote
View Public Profile Visit Recrehal's homepage!
 
 
Register now for full access!
Old 05-04-2005, 03:38 PM
Skorch1's Avatar
Super Talker

Posts: 115
Location: California
Trades: 0
Your css file should look like this Use shorter class names easier to add into html pages!(add your own font info)

table.navigation {border: o}
table {border: 10px}

then to insert into your html type

table class="navigation" <tr>...and ontinue with your table as normal

This now means you have two table tags one has a border (table) and the other doesn't (table class="navigation")
Skorch1 is offline
Reply With Quote
View Public Profile Visit Skorch1's homepage!
 
Old 05-05-2005, 08:59 AM
Recrehal's Avatar
Experienced Talker

Posts: 39
Location: Aachen, Germany
Trades: 0
I don't want a border around the table, but around the <td>'s so that doesn't really help. Furthermore a classname should always represent the meaning so there is no need to shorten it. As for the insertion: I'm using PHP anyway

So isn't there a way to get this done? Probalby with *>.navigation or something. I'm sure there is a way to asign the same border (which shall be none) to the table aswell as to the td's inside of it.
Recrehal is offline
Reply With Quote
View Public Profile Visit Recrehal's homepage!
 
Old 05-05-2005, 12:49 PM
brokensoul2271's Avatar
- - - - - - - - -

Posts: 750
Location: Lancashire, UK
Trades: 0
i'm really not sure about this and dont have time to try but wouldnt it work if you did
HTML Code:
<table id=navigation>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
</tr>
</table>
and in your css,
Code:
#navigation td {CSS RULE}
like i said really unsure about it and still dont know alot about CSS so sorry if its wrong..
__________________
Yes, indeed...

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
brokensoul2271 is offline
Reply With Quote
View Public Profile Visit brokensoul2271's homepage!
 
Reply     « Reply to CSS: all td's of a table behave acording to the 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.13351 seconds with 12 queries