HighDots Forums  

Tabel Border in CSS?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Tabel Border in CSS? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lane Baldwin
 
Posts: n/a

Default Tabel Border in CSS? - 07-13-2004 , 11:26 AM






I'm in the final stages of completing a small web site for a client and have
gotten a single error when validating the code at W3C's site. It doesn't
like the fact that I've specified a border color on the table I'm using for
layout.

Is there a way to specify border color using CSS? If I understand it
correctly, this should solve the error problem.

TIA for any help.

Lane

P.S. - This forum -- the advice and the links provided - has become my main
resource for learning to build better sites. I appreciate everyone's
assistance very much!! LB



Reply With Quote
  #2  
Old   
gareth
 
Posts: n/a

Default Re: Tabel Border in CSS? - 07-13-2004 , 11:54 AM






Just create a CSS class eg

..mainTableBorder{
color: #999999;
border: thin solid #999999;
}

and then apply it to the table tag eg

<table class="mainTableBorder">


--
Gareth
http://www.garethdp.com/
Buzz inet - http://www.buzzinet.co.uk/

Team Macromedia Volunteer for Dreamweaver MX
Dreamweaver MX Support: http://www.dreamweavermxsupport.com/index.php

PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.
http://www.dreamweavermxsupport.com/extensions/

Co-Author: Dreamweaver MX: Instant Troubleshooter - Apress
Co-Author: Practical Intranet Development - Apress
Co-Author: Dreamweaver MX: Advanced PHP Web Development - Apress
Co-Author: Dreamweaver MX: PHP Web Development - Wrox



Reply With Quote
  #3  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Tabel Border in CSS? - 07-13-2004 , 12:00 PM



.oO(Lane Baldwin)

Quote:
Is there a way to specify border color using CSS?
Yep. Use the 'border' property on the table and td elements, e.g.

table, td {border: 1px solid #000}

HTH
Micha


Reply With Quote
  #4  
Old   
D. Shane Fowlkes
 
Posts: n/a

Default Re: Tabel Border in CSS? - 07-13-2004 , 01:21 PM



I am by no means a CSS guru but the suggestion above will define ALL of your
tables and cells!! If you are targeting a specific cell or table, you can
give that cell/table an ID like so:

<table id="MySpecialTable">


and in the CSS file, do this:

#MySpecialTable
{border: 1px solid #000;
color: #FF0000;
etc...}

and this will give you that pretty border on just that one table or
cell.....

HTH


--


**************************************************
D. Shane Fowlkes
Web Applications Manager
Easter Associates, Inc.
1011 East Main Street
Suite 220
Richmond, VA 23219
(804) 643-4433
Fax: (804) 643-1033
shane (AT) easterassociates (DOT) com
**************************************************


"Michael Fesser" <netizen (AT) gmx (DOT) net> wrote

Quote:
.oO(Lane Baldwin)

Is there a way to specify border color using CSS?

Yep. Use the 'border' property on the table and td elements, e.g.

table, td {border: 1px solid #000}

HTH
Micha



Reply With Quote
  #5  
Old   
Lane Baldwin
 
Posts: n/a

Default Update Re: Tabel Border in CSS? - 07-18-2004 , 10:56 AM



Gareth and everyone else:

Thanks for the info. It sure is helping me learn what else I can do with
CSS. Sorry it took so long to respond, but have been out of town doing one
of my other jobs (musician).

Here's where I am so far:

www.lanebaldwin.com/FCTest

First attempt: did exactly as you suggested below. This put a border around
the entire table, but not on the cells...so I had the pink border around the
entire table, but the plain Jane default border in between cells. So...

Second attempt: removed from table and applied to each individual cell. Now
have the border throughout the entire table as originally designed and
implemented w/o CSS. When viewing in IE6, the border looks a bit thicker
than it was originally, but still (I think) looks OK. IN Opera 7.23 and NN
7.1, border appears and is pink...but to my half-blind eyes, appears a
little strange.

Any feedback greatly appreciated.

Lane

"gareth" <gareth (AT) buzzinet (DOT) co.uk> wrote

Quote:
Just create a CSS class eg

.mainTableBorder{
color: #999999;
border: thin solid #999999;
}

and then apply it to the table tag eg

table class="mainTableBorder"


--
Gareth



Reply With Quote
Reply




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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.