Jump to content

[SOLVED] Converting <table> html to css


paruby

Recommended Posts

I have the following table on my page ::

 

<table border="1" cellpadding="3" cellspacing="3" bordercolor="#808080" width="649">
<tr>
	<td width"200" class="tdhead">Header Text</td>
	<td width"440" class="tdhead">Header Text 2</td>
</tr>	
<tr>
	<td width"200" class="tdresult">Text</td>
	<td width"440" class="tdresult">Text 2</td>
</tr>
</table>

 

The corresponding CSS I have so far is ::

 

.tdhead  {
font-family: arial, helvetica, sans-serif;
font-size: 13px;
color: #FFFFFF;
font-weight: bold;
background-color: #000000;
}

.tdresult  {
font-family: arial, helvetica, sans-serif;
font-size: 13px;
color: #000000;
}

 

I would like to get away from the <table> code fully if possible...  Can someone post what the corresponding full CSS would be, without the <table> HTML?

 

Thanx!

 

paruby

 

Link to comment
Share on other sites

Don't discard tables completely - some instances they make things a lot easier.

 

Some tables 've found are much easier to create using DIVs so it's mostly choosing the right tool for the job.

 

Take a look at DIVs because you'll need to use that instead of you're not wanting to use tables.

 

TIP: Search for floating tables.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.