Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 03-07-2011, 08:55 AM help with table
madseason's Avatar
Experienced Talker

Posts: 35
Trades: 0
I have this table code:
HTML Code:
<table class="stats" cellspacing="0">
<tr>
<td class="hed" colspan="4">These stats here are good</td>
</tr>
<tr>
<td>The thing</td>
<td>10.0</td>
<td>9.8</td>
<td>6.7</td>
</tr>
<tr>
<td>Other thing</td>
<td>6.5</td>
<td>8.9</td>
<td>9.9</td>
</tr>
</table>
and this CSS code:
Code:
table.stats 
{text-align: center;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif ;
    font-weight: normal;
    font-size: 11px;
    color: #fff;
    width: 280px;
    background-color: #666;
    border: 0px;
    border-collapse: collapse;
    border-spacing: 0px;}

table.stats td 
{background-color: #CCC;
color: #000;
padding: 4px;
text-align: left;
border: 1px #fff solid;}

table.stats td.hed
  {background-color: #666;
color: #fff;
padding: 4px;
text-align: left;
border-bottom: 2px #fff solid;
font-size: 12px;
font-weight: bold;}
What name should i give to the CSS file and where/how do i call it.

Why are in the font family so many fonts and not just one?

Last edited by chrishirst; 03-07-2011 at 09:43 AM..
madseason is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-07-2011, 09:22 AM Re: help with table
edgray's Avatar
Super Moderator

Latest Blog Post:
Frantic
Posts: 4,264
Name: Sugarcane Gray
Location: Hell, Southern Spain
Trades: 0
Quote:
Originally Posted by madseason View Post
What name should i give to the CSS file and where/how do i call it.
call the CSS file whatever you like, and call it like this:

HTML Code:
<link href="css/your-style-sheet.css" type="text/css" rel="stylesheet" media="screen"/>
Quote:
Originally Posted by madseason View Post
Why are in the font family so many fonts and not just one?
Because there is no guarantee that the font you want to use is installed on the browser's computer, so you set a font family, that contains similar fonts, so you still have a little control over how the site displays on a wide variety of machines with different fonts etc.
__________________

Please login or register to view this content. Registration is FREE
- a project in video and sound.

Please login or register to view this content. Registration is FREE
"Absolute Rubbish, an insult to the blues." - NME.

Please login or register to view this content. Registration is FREE
- Come use our agency :)
edgray is offline
Reply With Quote
View Public Profile Visit edgray's homepage!
 
Old 03-07-2011, 09:51 AM Re: help with table
madseason's Avatar
Experienced Talker

Posts: 35
Trades: 0
Thanks for the reply edgray,

how do i adapt this code to the code of the css file?

Code:
    <table class="stats" border="0" cellpadding="1" cellspacing="1" width="100%">
  
 (...)
       
 <td  class="hed" valign="top"><%=rs("field")%></td>
      

(...)
    </table>
i tryed with the link inside the <body href="...\a\b\c\myfile.css (..)/> and after the body tag. Doesn't happen anything.

Last edited by madseason; 03-07-2011 at 09:53 AM..
madseason is offline
Reply With Quote
View Public Profile
 
Old 03-07-2011, 10:06 AM Re: help with table
edgray's Avatar
Super Moderator

Latest Blog Post:
Frantic
Posts: 4,264
Name: Sugarcane Gray
Location: Hell, Southern Spain
Trades: 0
Quote:
Originally Posted by madseason View Post
Thanks for the reply edgray,

how do i adapt this code to the code of the css file?

Code:
    <table class="stats" border="0" cellpadding="1" cellspacing="1" width="100%">
  
 (...)
       
 <td  class="hed" valign="top"><%=rs("field")%></td>
      

(...)
    </table>
i tryed with the link inside the <body href="...\a\b\c\myfile.css (..)/> and after the body tag. Doesn't happen anything.
your CSS file should be called between your HEAD tags. Avoid using windows backslashes - use the unix standard forward slash ( / ) in your URLs.
__________________

Please login or register to view this content. Registration is FREE
- a project in video and sound.

Please login or register to view this content. Registration is FREE
"Absolute Rubbish, an insult to the blues." - NME.

Please login or register to view this content. Registration is FREE
- Come use our agency :)
edgray is offline
Reply With Quote
View Public Profile Visit edgray's homepage!
 
Old 03-07-2011, 10:14 AM Re: help with table
madseason's Avatar
Experienced Talker

Posts: 35
Trades: 0
Still not working. I put the link between the head, class="stats" in all my <table></table>. Maby it's the way (.../a/b/myfile.css")?
madseason is offline
Reply With Quote
View Public Profile
 
Old 03-07-2011, 10:18 AM Re: help with table
edgray's Avatar
Super Moderator

Latest Blog Post:
Frantic
Posts: 4,264
Name: Sugarcane Gray
Location: Hell, Southern Spain
Trades: 0
Quote:
Originally Posted by madseason View Post
Still not working. I put the link between the head, class="stats" in all my <table></table>. Maby it's the way (.../a/b/myfile.css")?
Your document should look something like this:

HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<title>My Page</title>
		<link href="styles.css" type="text/css" rel="stylesheet" media="screen"/>
	</head>
	<body>
<table class="stats" cellspacing="0">
<tr>
<td class="hed" colspan="4">These stats here are good</td>
</tr>
<tr>
<td>The thing</td>
<td>10.0</td>
<td>9.8</td>
<td>6.7</td>
</tr>
<tr>
<td>Other thing</td>
<td>6.5</td>
<td>8.9</td>
<td>9.9</td>
</tr>
</table>

	</body>
</html>
Then your CSS, named "styles.css" should be saved in the same folder as your page.
__________________

Please login or register to view this content. Registration is FREE
- a project in video and sound.

Please login or register to view this content. Registration is FREE
"Absolute Rubbish, an insult to the blues." - NME.

Please login or register to view this content. Registration is FREE
- Come use our agency :)
edgray is offline
Reply With Quote
View Public Profile Visit edgray's homepage!
 
Old 03-07-2011, 10:22 AM Re: help with table
madseason's Avatar
Experienced Talker

Posts: 35
Trades: 0
Thanks again. I changed the way (just put the name of the file like you did) and it works
madseason is offline
Reply With Quote
View Public Profile
 
Old 03-07-2011, 10:26 AM Re: help with table
edgray's Avatar
Super Moderator

Latest Blog Post:
Frantic
Posts: 4,264
Name: Sugarcane Gray
Location: Hell, Southern Spain
Trades: 0
Quote:
Originally Posted by madseason View Post
Thanks again. I changed the way (just put the name of the file like you did) and it works
excellent. happy coding
__________________

Please login or register to view this content. Registration is FREE
- a project in video and sound.

Please login or register to view this content. Registration is FREE
"Absolute Rubbish, an insult to the blues." - NME.

Please login or register to view this content. Registration is FREE
- Come use our agency :)
edgray is offline
Reply With Quote
View Public Profile Visit edgray's homepage!
 
Reply     « Reply to help with table
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.16000 seconds with 12 queries