Help - Search - Members - Calendar
Full Version: CSS Table Styling
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
mathceleb
I've made some changes in my .css file, and my tables are not picking up the .css styles. I have <table id="orig"> which links to this .css file below. My tables are not showing the borders. Any assistance would be helpful:

/* V3 */

*{
list-style:none;
margin:1px;
padding:0px;
border-size: 1px;
}


#menu {
width: 200px;
float: left;
border-size: 1px;
margin-right: 2em;
}

#menu li a {
height: 32px;
voice-family: "\"}\"";
voice-family: inherit;
height: 24px;
font-weight: bold;
text-decoration: none;
}

#menu li a:link, #menu li a:visited {
color: #B40404;
display: block;
background: url(v3.JPG);
background-repeat:no-repeat;
padding: 8px 0 0 10px;
}

#menu li a:hover {
color: #0e69be;
background: url(v3.JPG) 0 -32px;
background-repeat:no-repeat;
padding: 8px 0 0 10px;
border:1px solid #000000;
}

#menu li a:active {
color: #B40404;
background: url(v3.JPG) 0 -64px;
background-repeat:no-repeat;
padding: 8px 0 0 10px;
}

p {
font-size : 12px;
font-family : times new roman;
color : #000000;
text-align : left;
margin : ;
}

h3 {
font-family : times new roman;
color : #000000;
text-align : left;
}

h2 {
font-family : times new roman;
color : #000000;
text-align : left;
}

h1 {
font-family : times new roman;
color : #000000;
text-align : left;
}

body {
font-size : 12px;
font-family : times new roman;
color : #000000;
background : #ffffff url() fixed repeat;
}

blockquote {
font-size : 10px;
font-family : arial;
color : #000000;
text-align : left;
}

a:hover {
font-weight : normal;
font-size : 12px;
font-family : times new roman;
color : #ff0000;
background : normal;
text-decoration : bold;
}

a:visited, a:link, a:active {
font-weight : normal;
font-size : 12px;
font-family : times new roman;
color : #0000ff;
text-decoration : bold;
}

table #orig
{
font-family: arial;
font-size: 12pt;
background-color: white;
border-style: solid;
border-color: blue;
padding: 3px;
}

th #orig
{
border-width: 3px;
border-style: solid;
border-color: blue;
padding:2px;
}

td #orig
{
border-width: 3px;
border-style: solid;
border-color: blue;
padding: 3px;
}

pandy
Start with correcting the validation errors.
http://jigsaw.w3.org/css-validator/validat...;usermedium=all
If that doesn't help, please post the URL to the problem page.
Frederiek
What the W3C CSS Checker doesn't see, but what the WDG Validator (link on this page) would have noticed, is that an ID must be unique in a page. You use #orig three times. You could use it as a class instead.
pandy
Hmm. I also have a feeling you mean 'table#orig' and so on rather than 'table #orig'. The latter selects an element with the id 'orig' that is contained in a table. It doesn't select the table itself, not even if it has the id 'orig' (unless it's nested inside another table).

http://htmlhelp.com/reference/css/structure.html
http://www.w3.org/TR/CSS2/selector.html


mathceleb
QUOTE(pandy @ Nov 17 2008, 02:34 AM) *

Hmm. I also have a feeling you mean 'table#orig' and so on rather than 'table #orig'. The latter selects an element with the id 'orig' that is contained in a table. It doesn't select the table itself, not even if it has the id 'orig' (unless it's nested inside another table).

http://htmlhelp.com/reference/css/structure.html
http://www.w3.org/TR/CSS2/selector.html


Thank you, that worked like a charm.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.