Hej,
Jeg prøver at lave en tabel der vokser med indholdet, men den
vokser forkert.
Bredden er ikke noget problem, den er fast.
Det er højden der driller:
I min kode herunder er det rækkerne 3 og 5 der vokser i højden
selvom jeg har bestemt, at de skal have en fast højde. Den eneste
række der skulle vokse er række 4.
Er der nogen der kan forklare/hjælpe?
/Klaus
Kode:
<!-- begin: construct table to hold text in a Telia standard box
on white -->
<table cellpadding="0" cellspacing="0" border="0"
style="width:200px;">
<tr><!-- widthcontrol -->
<td title="C1" style="width:5px;"></td>
<td title="C2" style="width:8px;"></td>
<td title="C3" style="width:12px"></td>
<td title="C4" style="width:174px"></td>
<td title="C5" style="width:12px;"></td>
<td title="C6" style="width:8px"></td>
<td title="C7" style="width:5px"></td>
<tr><!-- row1 -->
<td title="r1-2,c1-2" rowspan="2" colspan="2" height="13"
style="height:13px; background-color:#DD0084; text-align:left;
vertical-align:top;"><!-- top left picture 1 --></td>
<td title="r1-2,c3" rowspan="2" style="height:13px;
background-color:#DD0084; text-align:left;
vertical-align:top;"><!-- top left picture 2 --></td>
<td title="r1,c4-7" colspan="4" style="height:5px;
background-color:#DD0084;"><!-- top bar of box; leave this TD
blank --></td>
</tr>
<tr><!-- row2 -->
<td title="r2,c4-6" colspan="3" style="height:13px;
background-color:#FFFFFF; text-align:center;
vertical-align:top;"><!-- bar under topbar of box; leave this TD
blank --></td>
<td title="r4,c7" style="background-color:#DD0084;
text-align:right; vertical-align:top;"><!-- top right picture 2
--></td>
</tr>
<tr><!-- row3 -->
<td title="r3,c1-2" colspan="2" style="height:12px;
background-color:#DD0084; text-align:left;
vertical-align:top;"> <!-- top left picture 3 --></td>
<td title="r3-5,c3-5" rowspan="3" colspan="3"
style="background-color:#FFFFFF; text-align:left;
vertical-align:top; padding-left:5px; padding-right:5px;
padding-bottom:5px; padding-top:5px; white-space:normal;">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem
ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum
dolor sit amet, consectetur adipiscing elit.
<!-- insert main content here -->
</td>
<td title="r3,c6" style="height:12px;
background-color:#FFFFFF; text-align:right;
vertical-align:top;"><!-- top right picture 3 --></td>
<td title="r3,c7" style="height:12px;
background-color:#DD0084; text-align:right;
vertical-align:top;"><!-- top right picture 3 --></td>
</tr>
<tr><!-- row4 -->
<td title="r4,c1" style="background-color:#DD0084;
text-align:left; vertical-align:top;"><!-- left bar of box; leave
this TD blank --></td>
<td title="r4,c2" style="background-color:#FFFFFF;
text-align:left; vertical-align:top;"><!-- bar next to left bar
of box; leave this TD blank --></td>
<td title="r4,c6" style="background-color:#FFFFFF;
text-align:right; vertical-align:top;"><!-- bar next to right bar
of box; leave this TD blank --></td>
<td title="r4,c7" style="background-color:#DD0084;
text-align:right; vertical-align:top;"><!-- right bar of box;
leave this TD blank --></td>
</tr>
<tr><!-- row5 -->
<td title="r5,c1" style="height:12px;
background-color:#DD0084; text-align:left;
vertical-align:top;"></td>
<td title="r5,c2" style="height:12px;
background-color:#FFFFFF; text-align:left;
vertical-align:top;"></td>
<td title="r5,c6-7" colspan="2" style="height:12px;
background-color:#DD0084; text-align:right;
vertical-align:top;"><!-- bottom right picture 1 --></td>
</tr>
<tr><!-- row6 -->
<td title="r6,c1" style="height:8px;
background-color:#DD0084; text-align:left;
vertical-align:top;"></td>
<td title="r6,c2-4" colspan="3" style="height:8px;
background-color:#FFFFFF; text-align:left;
vertical-align:top;"></td>
<td align="r6-7,c5" rowspan="2" style="height:13px;
background-color:#DD0084; text-align:right;
vertical-align:top;"><!-- bottom right picture 2 --></td>
<td title="r6-7,c6-7" colspan="2" rowspan="2"
style="height:13px; background-color:#DD0084; text-align:right;
vertical-align:top;"><!-- bottom right picture 3 --></td>
</tr>
<tr><!-- row7 -->
<td title="r7,c1-4" colspan="4" style="height:5px;
background-color:#DD0084; text-align:left;
vertical-align:top;"><!-- bottom bar of bok; leave this TD blank
--></td>
</tr>
</table>
<!-- end: construct table to hold text in a Telia standard box on
white -->
--
Vil du lære at kode HTML, XHTML, CSS, SSI, ASP eller ASP.NET?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials