View Full Version : Table doesn't display in Css


SteveBeginner
01-10-2007, 08:15 AM
body
{
background-color: #CCCCCC;
}

p#par1
{
color: #FFFFFF;
font-size: 17px;
}

p#par2
{
color: #FFFFFF;
font-size: 13px;
}

p#par3
}
color: #FFFFFF;
font-size: 13px;
}

#Banner
{
margin-top: 10px;
margin-left: 150px;
margin-right: 100px;
width: 700px;
background-color: #666666;

}

#navtop
{
margin-top: 0px;
margin-left: 150px;
margin-right: 100px;
width: 700px;
height: 30x;
background-color: #666666;
border-color: #000000;
border-width: 1px;
border-style: solid;
}

#content
{
margin-top: 5px;
margin-left: 150px;
margin-right: 100px;
width: 700px;
background-color: #666666;
border-color: #000000;
border-width: 1px;
border-style: solid;
}

#footer
{
margin-top: 5px;
margin-left: 150px;
margin-right: 100px;
width: 700px;
height: 30px;
background-color: #666666;
border-color: #000000;
border-width: 1px;
border-style: solid;

}



<html>
<head>
<title>Tab Site</title>
<link rel="stylesheet" type="text/css" href="mainstyle1.css">
<style type="text/css">
a:link {text-decoration: none; color: #FFFFFF; }
a:visited {text-decoration: none; color: #FFFFFF; }
a:active {text-decoration: none; color: #FFFFFF; }
a:hover {text-decoration: underline; color: #000000; }
</style>
</head>
<body>

<div id="banner">Banner</div>



<div id="navtop"><center>
<a href="http://url.com/folder/tabs.htm">Tabs</a> | <a href="http://url.com/folder/lessons.htm">Lessons</a>
| <a href="http://url.com/folder/news.htm">News</a> | <a href="http://url.com/folder/contact.htm">Contact</a>
| <a href="http://url.com/folder/signup.htm">Sign Up</a> | <a href="http://forum.com/forum">Forum</a></center></div>

<div id="content"><center><p id="par1">
Welcome to ? Tabs</p></center>
<br>
<table frame="border" align="left">
<th>New Tabs</th>
<tr>
<td>Tab</td><td>Tab</td>
</tr>
<tr>
<td>Tab</td><td>Tab</td>
</tr>
</table>

</div>


<div id="footer"><p id="par2"><em>? Tabs 2007 - </em></p></div>
</body>
</html>

newbi
01-10-2007, 08:34 AM
I'm not really certain what the problem is, as I can see the table just fine. Would you elaborate a bit?

J to the izzosh
01-10-2007, 08:43 AM
Please try to be a little more descriptive of your problem. What exactly do you mean by, "table doesn't display in CSS"? Nothing should display in your CSS — it's just a set of rules, none of which apply directly to the only table that I can find in your document. And aside from some deprecated and non-standard attributes, the only thing terribly wrong with your table is that you have a table heading element (th) that is not contained within a row (tr).

Please elaborate on your problem and take a moment to read these posting guidelines (http://www.lissaexplains.com/forum/showthread.php?t=59117).

Edit: Oy... This is what I get for going for a stroll around my apartment in the middle of composing a post.

SteveBeginner
01-10-2007, 08:47 AM
http://img441.imageshack.us/img441/7518/problemvz6.jpg

Ok two problems, the table wont show in the Contents.
And now the banner css settings aren't showing up??

J to the izzosh
01-10-2007, 09:15 AM
Remove the align attribute from your table. It's essentially floating the table to the left, pulling it out of the normal document flow and allowing it to float through other elements.

There's a syntactical error in your CSS that's causing the problem with your banner. You have two closing curly braces surrounding your rule for p#par3. You need to change the right brace at the beginning to a left brace. You also have the banner ID spelled with a capital 'B' in your CSS and no capital in the div's actual ID attribute. You should correct this for the sake of consistency.