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
https://forums.phpfreaks.com/topic/152171-solved-converting-html-to-css/
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.