NSFCD

Generally Speaking => Power On => Topic started by: BOSSNIG on November 05, 2007, 03:44:15 PM

Title: Table HTML
Post by: BOSSNIG on November 05, 2007, 03:44:15 PM
How can you lock each section to one size in a single bracket, like on this forum, I currently have:

<table width="1000px" class="maintable" border="1px"><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>

Now the size of each section depends on what is typed in there,  want to set it to a certain size that It will always stay at.
Title: Re: Table HTML
Post by: Friendly Hostile on November 05, 2007, 03:46:35 PM
Not sure myself, but this site is quite helpful:

http://www.w3schools.com/default.asp
Title: Re: Table HTML
Post by: bluaki on November 05, 2007, 03:49:34 PM
This is what style sheets are for.

<style>
td {
width="123456789px";
height="987654321px";}
</style>


Of course, don't leave the numbers like that.
If you have other tables with cells that you want a different size, add the "class" attribute to the table tag like this.

<style>
table.asdfasdf td {
width="42px";
height="1337px";}
</style>

<table class="asdfasdf"><tr><td>&nbsp;</td><td>&nbsp;</td></tr></table>
Title: Re: Table HTML
Post by: BOSSNIG on November 05, 2007, 03:52:13 PM
Quote from: bluaki on November 05, 2007, 03:49:34 PM
This is what style sheets are for.

<style>
td {
width="123456789px";
height="987654321px";}
</style>


Of course, don't leave the numbers like that.
If you have other tables with cells that you want a different size, add the "class" attribute to the table tag like this.

<style>
table.asdfasdf td {
width="42px";
height="1337px";}
</style>

<table class="asdfasdf"><tr><td>&nbsp;</td><td>&nbsp;</td></tr></table>


Ummm, get on yahoo plawks.