HighDots Forums  

CSS Code for Table Border Colour

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss CSS Code for Table Border Colour in the Macromedia Dreamweaver forum.



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

Default CSS Code for Table Border Colour - 11-08-2005 , 03:17 PM






Hello all

I have recently discovered that when adding colour to a table border with
HTML, it will only appear correctly in IE. To ensure the colours appear
correctly in other browsers, this should be done with CSS.

I have one style sheet for my entire site. Admittedly, I an not well versed
in CSS at all. Saying that, I would love to know the basic entry you use to
dictate table border colour.

I thank you all very much in advance!

Ben


Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: CSS Code for Table Border Colour - 11-08-2005 , 03:28 PM






table { border:1px solid green; }

This will put a 1px solid green border around each table on the page.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Bjam70" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hello all

I have recently discovered that when adding colour to a table border with
HTML, it will only appear correctly in IE. To ensure the colours appear
correctly in other browsers, this should be done with CSS.

I have one style sheet for my entire site. Admittedly, I an not well
versed
in CSS at all. Saying that, I would love to know the basic entry you use
to
dictate table border colour.

I thank you all very much in advance!

Ben




Reply With Quote
  #3  
Old   
kryha1
 
Posts: n/a

Default Re: CSS Code for Table Border Colour - 11-08-2005 , 03:30 PM



table {
color:black;
}

or create the class like one below , and apply it to the table <table class="table_border>

..table_border {
color:black;
}

Reply With Quote
  #4  
Old   
kryha1
 
Posts: n/a

Default Re: CSS Code for Table Border Colour - 11-08-2005 , 03:34 PM



ooop I am sorry I forgot to add border to it
so it should go like this:

..table_border { border:1px solid black;}

Reply With Quote
  #5  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: CSS Code for Table Border Colour - 11-08-2005 , 03:42 PM



<table class="table_border">


--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"kryha1" <krystian24 (AT) hotmail (DOT) com> wrote

Quote:
table {
color:black;
}

or create the class like one below , and apply it to the table <table
class="table_border

.table_border {
color:black;
}



Reply With Quote
  #6  
Old   
Bjam70
 
Posts: n/a

Default Re: CSS Code for Table Border Colour - 11-08-2005 , 03:51 PM



Thank you both for the quick responses. Here is a sample of my current style
sheet:

.text {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #866B64;
font-size: 13px;
}

.quotetext {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #000066;
font-size: 13px;
}

Would the next entry (for the table border) be:

.table{
border: 1px solid;
color: #E0D4C4;
}

Thank you so much again!! I really appreciate the help.


Reply With Quote
  #7  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: CSS Code for Table Border Colour - 11-08-2005 , 03:55 PM



Quote:
.table{
border: 1px solid;
color: #E0D4C4;
}
That's a custom class, and it will have no effect unless you apply it to a
table on the page, e.g.,

<table class="table"....

You could also redefine the table tag (by just removing the leading period
in the CSS above), and that would then automatically style every table on
the page.


--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Bjam70" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Thank you both for the quick responses. Here is a sample of my current
style
sheet:

.text {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #866B64;
font-size: 13px;
}

.quotetext {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #000066;
font-size: 13px;
}

Would the next entry (for the table border) be:

.table{
border: 1px solid;
color: #E0D4C4;
}

Thank you so much again!! I really appreciate the help.




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

Default Re: CSS Code for Table Border Colour - 11-08-2005 , 04:32 PM



..oO(Bjam70)

Quote:
Thank you both for the quick responses. Here is a sample of my current style
sheet:

.text {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #866B64;
font-size: 13px;
}

.quotetext {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #000066;
font-size: 13px;
}
Better:

body {font: 13px Geneva, Arial, Helvetica, sans-serif}
..text {color: #866B64}
..quotetext {color: #006}

Properties like 'font-family' and 'font-size' are inherited, there's no
reason to declare them over and over again.

Micha


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.