SunQuest
           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 September 19th, 2003, 07:09 AM
enormoustrouser enormoustrouser is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 84 enormoustrouser User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 36 m 11 sec
Reputation Power: 5
No CSS border on <TR>?

I would love to encapsulate one of my table rows in a border but my attempts to do so have been less than forthcoming. Here is the CSS code I'm using:

.propList {
padding : 2px;
border-style : solid;
border-color : black;
border-width : 1px;
background-color : #cc9;
font-size : 10px;
}

.thickBorder {
border-style : solid;
border-width:2 px;
border-color : black;
}

Here is my HTML code:

<table border=0 width=100% align=center cellpadding='0' cellspacing='0' class='propList'>
<tr class='thickBorder'>
.
.
.
</tr>
</table>

(This is actually being echoed from PHP but that's irrelevant.) The problem, as you may have guessed, is that no border actually shows itself.

Now the likelihood of this being a stupid mistake borne of my ignorance regarding CSS, represents a fairly high probability.

Thanks for any help,
Tim

Reply With Quote
  #2  
Old September 19th, 2003, 12:13 PM
Clone53421's Avatar
Clone53421 Clone53421 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2003
Posts: 689 Clone53421 User rank is Private First Class (20 - 50 Reputation Level)Clone53421 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 17 h 7 m 56 sec
Reputation Power: 6
Send a message via AIM to Clone53421
The border style you are defining is only affecting the outer table border. And apparently a TR element does not have a border property. To define the border on the td elements, obviously you could put a class definition in each td elemtent, but I thought that would be redundant and should not be necessary. I was up against a wall until I found some info that led me to do something like this:
Instead of defining your .thickBorder class, you need to define the thickBorder td element. So, change your line
Code:
.thickBorder {

into
Code:
.thickBorder td {

It should work then. Notice that if you are using styles that do work for TR, you will probably want to leave them applied to the TR and not to TD elements, since, for example, background would leave space inbetween cells if there were any cellspacing. So then you would need two definitions, one for ".thickBorder" to be applied to TR, and one for ".thickBorder td" to be applied to TD.

Reply With Quote
  #3  
Old September 19th, 2003, 02:39 PM
enormoustrouser enormoustrouser is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 84 enormoustrouser User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 36 m 11 sec
Reputation Power: 5
Thanks for your reply. I thought to try assigning to TD but then I'd get a border between each cell as well. Oddly enough, though, I managed to get the TR border working on another page somehow, just not on this one. Guess I'm a sporadic genius.

Thanks again,
Tim

Reply With Quote
  #4  
Old September 19th, 2003, 05:23 PM
Clone53421's Avatar
Clone53421 Clone53421 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2003
Posts: 689 Clone53421 User rank is Private First Class (20 - 50 Reputation Level)Clone53421 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 17 h 7 m 56 sec
Reputation Power: 6
Send a message via AIM to Clone53421
You could always nest the entire row in another table, and put a border attribute on either the TD it was in or the new table itself... but I would think there should be a "cleaner" way to do it. Oh well.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > No CSS border on <TR>?


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 2 hosted by Hostway