 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
robinvdt
Joined: 21 Oct 2004 Posts: 5
|
Posted: Mon Jul 31, 2006 12:45 pm Different "standard" styles for Tables |
|
|
|
Hello,
I hope anyone can help me with the following problem:
I've created a default CSS document so all pages are formatted the same and are easy to adjust. But now I've run into a small problem.
I have given some formating rules for the < TABLE > tag and also made a seccond formatversion using .boldtable (read about that one somewhere)
But now I'm trying to create a third "default" table format. Does anyone have a suggestiont to make it work?
thanks
Robin |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8749 Location: Castle Pines North, CO USA
|
|
robinvdt
Joined: 21 Oct 2004 Posts: 5
|
Posted: Mon Jul 31, 2006 12:58 pm |
|
|
|
well the CSS currently looks like
| Code: |
<!--
body
{
font-family:verdana;
font-size:10;
color:black;
background-color:white;
TABLE
{
font-family:verdana;
font-size:10;
color:black;
background-color:white;
}
.boldtable, .boldtable TD, .boldtable TH
{
font-family:verdana;
font-size:10;
color:#C10000;
background-color:#FFFEB8;
}
--> |
(well and some more formatting for links etc.)
And now I'm looking for a way to define a third table with an other backgroundcolor etc. |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8749 Location: Castle Pines North, CO USA
|
Posted: Mon Jul 31, 2006 1:12 pm |
|
|
|
Well that is a start at least on the source code. I really wished you would have provided more.
Since styles cascade, using
| Code: |
table
{
font-family:verdana;
font-size:10;
color:black;
background-color:white;
} |
will have all tables with a white background etc. And then instead of
| Code: |
.boldtable, .boldtable TD, .boldtable TH
{
font-family:verdana;
font-size:10;
color:#C10000;
background-color:#FFFEB8;
} |
I would use something like
| Code: |
table.boldtable
{
font-size:10px;
color:#C10000;
background-color:#FFFEB8;
width: 100%;
} |
so you can call that as
| Code: |
<table class="boldtable">
<tr>
<td></td>
</tr>
</table> |
and then something like
| Code: |
table.tabletwo
{
font-size:12px;
color:#fff;
background-color:#ccc;
width: 100%;
} |
so that you can call it
| Code: |
<table class="tabletwo">
<tr>
<td></td>
</tr>
</table> |
So in essnece you would have something like
| Code: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<style type="text/css">
body
{
font-family:verdana;
font-size:10;
color:black;
background-color:white;
table
{
font-family:verdana;
font-size:10;
color:black;
background-color:white;
}
table.boldtable
{
font-size:10;
color:#C10000;
background-color:#FFFEB8;
width: 100%;
}
table.tabletwo
{
font-size:12px;
color:#fff;
background-color:#ccc;
width: 100%;
}
</style>
</head>
<body>
<table class="boldtable">
<tr>
<td></td>
</tr>
</table>
<table class="tabletwo">
<tr>
<td></td>
</tr>
</table>
</body>
</html> |
And this way you can add more as needed. Of course you can always rely on the default as well. No need to put the font family as long as they will be all verdana.
_________________
Corey
Loud Commerce | Loud Worx | Merchant Account Blog |
|
robinvdt
Joined: 21 Oct 2004 Posts: 5
|
Posted: Tue Aug 01, 2006 1:16 am |
|
|
|
| thanx! its working |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|