Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS

Status
Not open for further replies.

wallm

Programmer
Apr 4, 2005
69
GB
Can anyone give me any help on how to create a class for this table?

<table width="100%" height="73" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="34%" height="71"><a href="index.asp"><img src="/images/Logo.gif" width="290" height="60"></td>
<td width="66%" height="71">
<div align="right"><img src="/images/banners/lg.gif" border="0"></a></div>
</td>
</tr>
</table>
 
Code:
<style type="text/css">
table.myTable {
    width: 100%;
    height: 73px;
    border-collapse: collapse;
    border: 0;
}

table.myTable td { height: 100%; }
table.myTable td.firstCell { width: 34%; }
table.myTable td.secondCell { width: 66%; }
</style>
Code:
<table class="myTable"><tr>
  <td class="firstCell">...</td>
  <td class="secondCell">...</td>
</tr></table>

*cLFlaVA
----------------------------
[tt]a frickin' twelve-gauge, what do you think?[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
actually, slight change:

Code:
table.myTable td.secondCell { 
    width: 66%;
    text-align: right;
}

get rid of the <div> tag, it's not needed. and get rid of the superfluous closing </a> tag. it's not needed either.

*cLFlaVA
----------------------------
[tt]a frickin' twelve-gauge, what do you think?[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top