PDA

Click to See Complete Forum and Search --> : Simple question concerning CSS and HTML


hpl
May 28th, 2002, 07:18 AM
How do I set apply a class on an entire table?


<table>
<tr>
<td>This is the test</td>
<td>A new line</td>
</tr>
</table>

beachbum
May 28th, 2002, 07:21 AM
Not quite sure what u mean but anyhow u really arent supposed to use 'tables' in CSS. U should use <div> tags. Do u know anything about CSS already? What do u want to do and what do u already know how to do.

hpl
May 28th, 2002, 07:48 AM
Sorry for beeing unprecise, I only want to know how I can define my font size of all the fields in a table

cpradio
May 28th, 2002, 07:55 AM
<style type="text/css">
td,th,body { font-size: 10px; font-family: Verdana;}
</style>

punkpie_uk
May 28th, 2002, 07:55 AM
<table class="classname"> should work.

<table style="font-family:arial; font-size:8pt;">

beachbum
May 28th, 2002, 08:00 AM
Sorry for not answering directly but I think that u are attempting to jump into something in CSS without knowing enough of the basics. U need to create a separate css file with #frame properties and paragraph properties and then use them to build your "tables".

here's a sample CSS file and html file

'Called yourstyles.css
body {
text-align: center;
background: url(back.gif) fixed;
margin-left: 0;
margin-top: 0;
}

A {
color: #000080;
text-decoration:none
}

A:hover {
color: #FF0000;
font-family: Verdana, Helv, Arial;
}

A:visited {
color: #000080;
font-family: Verdana, Helv, Arial;
}

#frame {
width:750px;
margin-right: auto;
margin-left:auto;
margin-top:20px;
padding:0px;
background:#fff;
text-align:center;
border:4px solid #000;
}

#frameinner {
width:742px;
margin-right: auto;
margin-left:auto;
padding:0px;
background:#fff;
text-align:left;
}

#contentheader {
text-align: left;
padding: 7px;
background:#fff;
}

#contentleft {
width:340px;
padding: 0px;
float:left;
text-align:center;
background:#fff;
}

#contentright {
width: 340px;
padding: 0px;
float:left;
text-align:left;
background:#fff;
}

#contentfooter {
text-align: left;
padding: 7px;
background:#fff;
}

p.standard {
margin-left: 0;
margin-top: 10px;
align:left;
font-family: Verdana, Helv, Arial;
font-size: 12px;
font-color: #000;
}

p.footer {
margin-left: 333px;
margin-top: 10px;
align:left;
font-family: Verdana, Helv, Arial;
font-size: xx-small;
font-color: #000;
}



<html>

<head>
<link rel=stylesheet href="yourstyles.css" type="text/css">
</head>

<body>
<div id="frame">
<div id="contentheader">
'Something in here
</div>

<div id="frameinner">
<div id="contentleft">
<img src="somepic.gif"><br>
<br><br>
</div>

<div id="contentright">
<img src="someotherpic.gif"><br>
<p class="standard">
Some text<br>
</p>
</div>
</div>
</div>
</body>

</html>

Hopefully this gives u some ideas :)