Reply
??? about CSS borders
Old 01-05-2005, 12:03 PM ??? about CSS borders
Novice Talker

Posts: 8
Is it possible to make the borders inside a table, the lines that seperate rows and columns, look the way a table looks when you use html border attributes but can it be done using CSS. it seems that CSS border styles only affect the outside border and it takes away the borders inside the table and I want the inside border color to match the outside border but the validator tells me that there is no attribute "bordercolor" because "the document type you are using does not support that attribute for this element." I have managed to validate all of the pages at www.bignightout.org except the shows.asp page because of the bordercolor attribute, would changing the DOCTYPE to LOOSE fix it I wonders?
kdg5686 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 01-05-2005, 02:29 PM
faze1's Avatar
Ultra Talker

Posts: 389
I've noticed this problem aswell and it seesm to get worse from one browser to the next. I don't know a work around for this but what if you were to lose the tables border="?" and create all the borders in css. It wont look like the traditional table boorder but at least everything would be uniformed.

Sorry I couldn't be more useful
__________________
[size=2]Faze1.net - Webhosting - Focusing on quality service
faze1 is offline
Reply With Quote
View Public Profile Visit faze1's homepage!
 
Old 01-05-2005, 02:39 PM
Extreme Talker

Posts: 158
Do you mean something like this :

table, td {border:solid red 2px;}

The inner lines should be applied to <td>
The outer lines are applied to <table>
ElectricSheep is offline
Reply With Quote
View Public Profile
 
Old 01-06-2005, 01:22 AM
Novice Talker

Posts: 8
well now, thanks for your input and that would be the ticket too except I don't want to apply it to all of the tables on this page, just one in particular, I'm a newbee so maybe you could explain how to name a particular table so I could place it with a div? thanks
kdg5686 is offline
Reply With Quote
View Public Profile
 
Old 01-06-2005, 01:36 AM hi
Mooofasa's Avatar
Defies a Status

Posts: 1,612
Name: Michael (mik) Land
Location: England
Then you must asign an Id to it.

e.g.

Code:
style1#table, td {border: solid red 2px}
Then, when you want it to apply:

e.g.

HTML Code:
<table>
       <tr>
          <td id="style1">
          </td>
       </tr>
</table>
(I think that is right).
__________________
Tumblings.co.uk - Tumblog with thoughts, quotes, links, videos, images and my creations.
Opera Browser - The best free web browser.
Opera Dev Tools - Firefox is now Firefail.
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Old 01-06-2005, 02:37 AM
faze1's Avatar
Ultra Talker

Posts: 389
Personally I think the css route is a much better choice than border="?".

If you plan on using this for more than one table or cell, you should use a class instead. An ID should only be used once per page.

.anynameyouwant {border:solid red 2px;}

<table class="anynameyouwant">
<tr>
<td>
No border
</td>
</tr>
<tr>
<td class="anynameyouwant">
border
</td>
</tr>
</table>

Since this example only has two cells everything will look like it has a border.

Hope that helps,
__________________
[size=2]Faze1.net - Webhosting - Focusing on quality service
faze1 is offline
Reply With Quote
View Public Profile Visit faze1's homepage!
 
Old 01-06-2005, 12:41 PM uh huh that's the ticket
Novice Talker

Posts: 8
hey Mik, I had to do it like this, td#style1 { but it works like a charm, putting id="style1" in every td that I wanted to affect, I think I like it, I like it alot.

and thanks to all of you for your help, I'm glad I joined up with this place !!!
kdg5686 is offline
Reply With Quote
View Public Profile
 
Old 01-06-2005, 12:53 PM
Webmaster Talker

Posts: 660
Location: Kokkola, Finland
as faze1 said if you use it more than once you need to use a class instead

td.style1 {

then

class="style1"
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 01-06-2005, 01:24 PM ooooopps
Novice Talker

Posts: 8
hey davemies, I was so danged happy to see it work like I wanted it to without using invalid markup I forgot about faze1 saying only once with the id cause it didn't validate so I did have to change it to a class and now it validates so I'm still happy, thanks alot yous guys cool beaners
kdg5686 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to ??? about CSS borders
 

Thread Tools

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
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.16443 seconds with 12 queries