|
|
|
|
![]() ![]() |
Jun 22 2007, 10:55 AM
Post
#1
|
|
|
Oh come on Mrs. B! Group: Members Posts: 648 Joined: 6-June 07 From: Tasmania, Australia Member No.: 22,422 |
hey everyone!
i know i would usually be able to fix this but... its stumped me. My table just isnt working. Could someone help me, make some changes? CODE <table width="489" border="1"> <tr width="498"> <td width="249"> test </td> <td width="249"> test </td> </tr> <tr width="498"> <td width="498"> test </td> </tr> <tr width="498"> <td width="249"> test </td> <td width="249"> test </td> </tr> </table> just copy it into an HTML document and have a look. What I want is the middle TR to go all the way along, not just what it is doing. It only aligns with the other, but I dont want that. I cant believe i cant fix this but... looks like i cant. anyway, any help? just change it so it works properly! |
|
|
|
Jun 22 2007, 11:53 AM
Post
#2
|
|
|
Premium Member Group: [HOSTED] Posts: 286 Joined: 17-June 07 Member No.: 22,702 |
CODE <table width="489" border="1">
<tr width="498"> <td width="249">test</td> <td width="249">test</td> </tr> <tr width="498"> <td width="498" colspan="2">test</td> </tr> <tr width="498"> <td width="249">test</td> <td width="249">test</td> </tr> </table> |
|
|
|
Jun 22 2007, 11:55 AM
Post
#3
|
|
|
Premium Member Group: [HOSTED] Posts: 286 Joined: 17-June 07 Member No.: 22,702 |
Be careful about extra line-feeds between your <td> and </td> tags. They produce unpredictable results. That's why I removed them from your example.
|
|
|
|
Jun 22 2007, 06:48 PM
Post
#4
|
|
|
Super Member Group: [HOSTED] Posts: 749 Joined: 12-July 06 From: Ontario, Canada Member No.: 14,464 |
Also, you only need to specify the width of the first cell in each column. That will save a lot of typing, space and bandwidth. The table is already 489 pixels wide, so the browser assumes the rows are also, no need to specify that. By doing that, you can have unpredictable results (also, you made a typo). So therefore, you can try this:
HTML <table width="489" border="1"> <tr> <td width="249">test</td> <td width="249">test</td> </tr> <tr> <td colspan="2">test</td> </tr> <tr> <td>test</td> <td>test</td> </tr> </table> Notice that even the middle cell didn't need the width specified because it spans across cells which already have the width specified, it uses those measurements. Adding extra lines breaks can confuse you, so avoid them if possible. |
|
|
|
Jun 23 2007, 02:41 AM
Post
#5
|
|
|
Oh come on Mrs. B! Group: Members Posts: 648 Joined: 6-June 07 From: Tasmania, Australia Member No.: 22,422 |
Oh ok!
ill try that. ok, everything is fine now! thanks for your help! This post has been edited by Sten: Jun 23 2007, 04:23 AM |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 2nd December 2008 - 03:54 PM |