Stránka 1 z 1

HTML - ohraničení tabulky

Napsal: 05 zář 2016 06:29
od tomas_vlcek
Dobrý den, mám tu jeden kód, ale bohužel si mi tam napravo od každé z 6 buněk objeví takový maličký úzký pruh (další buňka, která je prázdná). Nevím jak se toho zbavit. Výstup je v příloze (soubor sken.doc).

<table width="100%" border="1">

<style>
td a { width: 100%; height: 100%; text-align: center; display: block}
td a { color: white; font-size: 20px; font-weight: bold; padding-top:15px }
td a:hover { background-color: brown; color: white; font-weight: bold }
a {text-decoration: none}
</style>

<tr bgcolor="green"><!-- 1 -->
<td width="50%" align="center" bgcolor="white"><font size="5">Registrace</font><td>
<td width="50%" align="center" bgcolor="green"><font size="7"><a href="formulár2.php">ZDE</a></font><td>
</tr>

<tr bgcolor="green"><!-- 2 -->
<td width="50%" align="center" bgcolor="white"><font size="5">Průběžná startovní listina</font><td>
<td width="50%" align="center" bgcolor="red"><font size="7"></font>X<td>
</tr>

<tr bgcolor="red"><!-- 3 -->
<td width="50%" align="center" bgcolor="white"><font size="5">Výsledková listina</font><td>
<td width="50%" align="center" bgcolor="red"><font size="5"></font>X<td>
</tr>

</table>

Re: HTML - ohraničení tabulky

Napsal: 05 zář 2016 08:13
od CZechBoY
Protože máte na konci každé buňky další začátek buňky nikoliv konec.
takhle to je ok
https://jsfiddle.net/0pp39gar/
  1. <table width="100%" border="1">
  2.   <tr bgcolor="green">
  3.     <!-- 1 -->
  4.     <td width="50%" align="center" bgcolor="white"><font size="5">Registrace</font></td>
  5.     <td width="50%" align="center" bgcolor="green"><font size="7"><a href="formulár2.php">ZDE</a></font></td>
  6.   </tr>
  7.  
  8.   <tr bgcolor="green">
  9.     <!-- 2 -->
  10.     <td width="50%" align="center" bgcolor="white"><font size="5">Průběžná startovní listina</font></td>
  11.     <td width="50%" align="center" bgcolor="red"><font size="7"></font>X</td>
  12.   </tr>
  13.  
  14.   <tr bgcolor="red">
  15.     <!-- 3 -->
  16.     <td width="50%" align="center" bgcolor="white"><font size="5">Výsledková listina</font></td>
  17.     <td width="50%" align="center" bgcolor="red"><font size="5"></font>X</td>
  18.   </tr>
  19.  
  20. </table>

Re: HTML - ohraničení tabulky

Napsal: 05 zář 2016 18:22
od faraon
Jo, chybí ti tam všude lomítka! :D

Kód: Vybrat vše

<tr>
<td>...<td>
<td>...<td>
</tr>