homepage Welcome to WebmasterWorld Guest from 54.167.249.155
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
tables and css
please comment/help
Acternaweb




msg:1208645
 7:18 pm on Feb 16, 2004 (gmt 0)

Being a new to css user, I have a question that I need help/advice on. I have 3 columns in a table, can each columns have it's own style to it?
If so, how would it be called:

<td class"rightcolumn">?

Appreciate any help and your thoughts.

Thanks,

 

birdbrain




msg:1208646
 8:19 pm on Feb 16, 2004 (gmt 0)

Hi there Acternaweb,


I have 3 columns in a table,
can each column have it's own
style to it?


Yes it can.
Here is an example...


<html>
<head>

<style type="text/css">
<!--
table{border:solid 1px #000000;}
#left {width:100px;height:100px;background-color:#ff0000;border:solid 1px #000000;}
#center {width:100px;height:100px;background-color:#00ff00;border:solid 1px #000000;}
#right {width:100px;height:100px;background-color:#0000ff;border:solid 1px #000000;}
//-->
</style>

</head>
<body>

<table><tr>
<td id="left">left</td>
<td id="center">center</td>
<td id="right">right</td>
</tr></table>

</body>
</html>

Being new to csss, you may find
this link extremely useful..


w3schools [w3schools.com]

birdbrain

Acternaweb




msg:1208647
 9:55 pm on Feb 16, 2004 (gmt 0)

Cool thanks for the tip. I have found a way to do this (at least I think I am doing it) in CSS instead of using tables.

Two quick questions that I hope someone can help be answered:

*difference between div class and span class
* do you need to tag each paragraph?

Thanks for the site it looks like a great start

aaronjf




msg:1208648
 10:10 pm on Feb 16, 2004 (gmt 0)

You don't need a new tag for every paragraph. You simply need to enclose all the elements you want controled by a particular CSS rule with the opening and closing tag.

For instance:

<div class"right" >
<h1> My Paragraph </h1>
<p>This is my first paragraph. </p>
<p>&nbsp;</p>
<h2> Second Paragraph </h2>
<p>This is my second paragraph. </p>
</div>

And before you ask, yes you can but a div inside a div.

I will let someone how can clearly define the div and span tag answer the rest of your question.

aevea




msg:1208649
 11:12 pm on Feb 16, 2004 (gmt 0)

span and div are both generic elements but divs are block-level (like paragraphs and headings) and spans are inline (like anchors and strong tags).

Adam

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved