Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-18-2004, 10:24 PM   PM User | #1
Canon820
New Coder

 
Join Date: Sep 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Canon820 is an unknown quantity at this point
<table> --> <div>

How could I turn this:

<table width="648" border="1" align="center" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF">

Into:
<div id="hello">

Could you show me hot to make all the crap in that table into CSS so I can put it in a sytlesheet. I'm trying to make my site entirely DIVs.
Canon820 is offline   Reply With Quote
Old 10-18-2004, 10:30 PM   PM User | #2
Roy Sinclair
Senior Coder

 
Join Date: Jun 2002
Location: Wichita
Posts: 3,880
Thanks: 0
Thanked 0 Times in 0 Posts
Roy Sinclair will become famous soon enough
Is the table used for layout purposes or do you have actual data in it? If it's layout then yes, you should replace it but if it's data then the table should remain though it would be proper to replace the table's presentational properties with CSS.
__________________
Check out the Forum Search. It's the short path to getting great results from this forum.
Roy Sinclair is offline   Reply With Quote
Old 10-18-2004, 10:45 PM   PM User | #3
Canon820
New Coder

 
Join Date: Sep 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Canon820 is an unknown quantity at this point
It is a layour thing. I just want to know what to put into the CSS in replace of:

width="648" border="1" align="center" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF"
Canon820 is offline   Reply With Quote
Old 10-18-2004, 10:47 PM   PM User | #4
gsnedders
Senior Coder

 
gsnedders's Avatar
 
Join Date: Jan 2004
Posts: 2,340
Thanks: 1
Thanked 7 Times in 7 Posts
gsnedders will become famous soon enough
Code:
width:648px;
border: 1px solid #ffffff;
margin: 0 0 0 0;
padding: 0 0 0 0;
__________________
Geoffrey Sneddon
gsnedders is offline   Reply With Quote
Old 10-19-2004, 08:54 AM   PM User | #5
ronaldb66
Senior Coder

 
Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,253
Thanks: 0
Thanked 0 Times in 0 Posts
ronaldb66 is an unknown quantity at this point
Table to CSS-P

There's a lot more to converting a table-based layout to a CSS-P based layout then just replacing the table by a div; without any information about what's inside the table, and what the layout of your page should look like, it is rather pointless to try to cough up some style rules just based on the table attributes.

By the way, Geoffrey: those rules only apply to the table element, not to the table cells inside it; you'll need some more for that... Width works, though!
__________________
Regards,
Ronald.
ronaldvanderwijden.com
ronaldb66 is offline   Reply With Quote
Old 10-19-2004, 06:03 PM   PM User | #6
gsnedders
Senior Coder

 
gsnedders's Avatar
 
Join Date: Jan 2004
Posts: 2,340
Thanks: 1
Thanked 7 Times in 7 Posts
gsnedders will become famous soon enough
Quote:
Originally Posted by ronaldb66
By the way, Geoffrey: those rules only apply to the table element, not to the table cells inside it; you'll need some more for that... Width works, though!
and people ask me why I don't like tables

Here's the code from my site for a table (which is used for tabular content ):
Code:
table.championships {
width:97.3333333em;
border-right:1px dashed #000000;
border-bottom:1px dashed #000000;
}

td.championshipsname, th.championshipsname {
width: 17.3333333em;
border-left:1px dashed #000000;
border-top:1px dashed #000000;
padding: 2px 4px 1px 4px;
margin: 0 0 0 0;
}
__________________
Geoffrey Sneddon
gsnedders is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 03:36 AM.


Advertisement
Log in to turn off these ads.