By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,057 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,057 IT Pros & Developers. It's quick & easy.

html table widths

tolkienarda
100+
P: 316
hi all

It's been a long time since i've done actual html code. and i seem to have forgotten how to make <td>'s different widths. for example i want to have a image in the top left taking up 25% of the table and text on the other side taking up 75% and then on the next row have the left colom take 75% and the right take up 25% i dont even know if that is possible following is the code that failed for me.

[HTML]
<table width="100%">
<tr>
<td width="25%"><img src="../images/image1.jpg"></td>
<td>text lots of text</td>
</tr>
<tr>
<td width="75%">text lots of text</td>
<td><img src="../images/image2.jpg"></td>
</tr>
</table>
[/HTML]
Feb 12 '07 #1
Share this Question
Share on Google+
2 Replies


tolkienarda
100+
P: 316
hi all

It's been a long time since i've done actual html code. and i seem to have forgotten how to make <td>'s different widths. for example i want to have a image in the top left taking up 25% of the table and text on the other side taking up 75% and then on the next row have the left colom take 75% and the right take up 25% i dont even know if that is possible following is the code that failed for me.

[HTML]
<table width="100%">
<tr>
<td width="25%"><img src="../images/image1.jpg"></td>
<td>text lots of text</td>
</tr>
<tr>
<td width="75%">text lots of text</td>
<td><img src="../images/image2.jpg"></td>
</tr>
</table>
[/HTML]
ok so i am totaly stupid not my fault i was born that way

[HTML]
<td colspan...>
[/HTML]
Feb 12 '07 #2

Expert 100+
P: 1,892
ok so i am totaly stupid not my fault i was born that way

[HTML]
<td colspan...>
[/HTML]
It happens don't forget about rowspan either!
Feb 13 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.