JavaScript and client side scripting.
Moderator: General Moderators
MarK (CZ)
Forum Contributor
Posts: 239 Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:
Post
by MarK (CZ) » Thu Jun 09, 2005 2:45 pm
Hi!
I'm sometimes getting mad why is my IE not following my commands. Here's my code:
Code: Select all
<table>
<tr>
<td rowspan='2' style='width: 130px;'>
<img src='images/img.php?img=man' alt='photo' style='width: 120px; height: 150px; float: left;' align='left'></img>
</td>
<td style='height: 25px; font-size: 11pt; border-bottom: 1pt solid black;'>Name</td>
</tr>
<tr>
<td>text</td>
</tr>
</table>
The border between the top-right and bottom-right fields stays somewhere in the middle. What am I doing wrong???
Thanks!
hawleyjr
BeerMod
Posts: 2170 Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA
Post
by hawleyjr » Thu Jun 09, 2005 2:49 pm
Add colspan="2" in your second td tag
Code: Select all
<table>
<tr>
<td rowspan='2' style='width: 130px;'>
<img src='images/img.php?img=man' alt='photo' style='width: 120px; height: 150px; float: left;' align='left'></img>
</td>
<td style='height: 25px; font-size: 11pt; border-bottom: 1pt solid black;'>Name</td>
</tr>
<tr>
<td colspan="e;2"e;>text</td>
</tr>
</table>
MarK (CZ)
Forum Contributor
Posts: 239 Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:
Post
by MarK (CZ) » Thu Jun 09, 2005 3:23 pm
That does not help
And anyway, I can't see the point why it should be there??
Code: Select all
----------------------------
| | |
| | |
|rowspan=2|----------------|
| | |
| | |
----------------------------
pickle
Briney Mod
Posts: 6445 Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:
Post
by pickle » Thu Jun 09, 2005 5:03 pm
Ha ha - language barriers are great!
~hawleyjr meant to put "rowspan=2" as an attribute of the second <td> tag, exactly like it is in the first. The updated code should look like this:
Code: Select all
<table>
<tr>
<td rowspan='2' style='width: 130px;'>
<img src='images/img.php?img=man' alt='photo' style='width: 120px; height: 150px; float: left;' align='left'></img>
</td>
<td style='height: 25px; font-size: 11pt; border-bottom: 1pt solid black;'>Name</td>
</tr>
<tr>
<td colspan="e;2"e;>text</td>
</tr>
</table>
but that'll still give you a table like this:
Code: Select all
----------------------------
| | Name |
| | |
| Image |----------------|
| here | text |
| | |
----------------------------
What shape of table are you trying to make?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
MarK (CZ)
Forum Contributor
Posts: 239 Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:
Post
by MarK (CZ) » Sat Jun 11, 2005 1:22 am
Your code is exactly the same as hawleyjr posted, no '"rowspan=2" as an attribute of the second <td> tag'...
I get this table fine, the layout is just as I'd like to have it. But I want to change the height of the right-top cell and setting 'height: 25px;' as a style for the TD doesn't behave as I need. Maybe it's just IE having fun of me..
anjanesh
DevNet Resident
Posts: 1679 Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India
Post
by anjanesh » Sat Jun 11, 2005 3:30 am
Guess only way is to set height of text td too.
Code: Select all
<table>
<tr>
<td rowspan="e;2"e; style="e;height:150px; width: 130px;"e;>
<img src="e;images/img.php?img=man"e; alt="e;photo"e; style="e;width: 120px; height: 150px; float: left;"e; align="e;left"e;/>
</td>
<td style="e;height: 25px; font-size: 11pt; border-bottom: 1pt solid black;"e;>Name</td>
</tr>
<tr>
<td style="e;height: 125px"e;>text</td>
</tr>
</table>