Sponsor-Board.de

Normale Version: html Tabelle
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hi,

ich habe eine HTML Tabelle erstellt, die Funktioniert auch so weit ganz gut.

Mein Problem ist aber, dass ich einen abstand nach rechts von 5px zur nächsten Zeile haben möchte.
Nach unten zur nächsten Spalte möchte ich aber keinen so großen abstand haben.

somit kann ich weder cellspacing noch cellpadding benutzten...

Wie bekomme ich das nun also hin?


Hier meine Tabelle:

PHP-Code:
<table cellspacing="10px">
                  <
tr>
                      <
td>
                          <
a>Nr.</a>
                      </
td>
                      <
td>
                          <
a>Darum</a>
                      </
td>
                      <
td>
                          <
a>Uhrzeit</a>
                      </
td>
                      <
td>
                          <
a>Art</a>
                      </
td>
                      <
td>
                          <
a>MeldungOrt</a>
                      </
td>
                  </
tr>
                  <
tr>
                      <
td>
                          <
a>1.</a>
                      </
td>
                      <
td>
                          <
a>04.01.2010</a>
                      </
td>
                      <
td>
                          <
a>08.57</a>
                      </
td>
                      <
td>
                          <
a>T</a>
                      </
td>
                      <
td>
                          <
a>ÖlunfallHeilbronner Straße</a>
                      </
td>
                  </
tr>
                  <
tr>
                      <
td>
                          <
a>2.</a>
                      </
td>
                      <
td>
                          <
a>10.03.2010</a>
                      </
td>
                      <
td>
                          <
a>06.35</a>
                      </
td>
                      <
td>
                          <
a>B</a>
                      </
td>
                      <
td>
                          <
a>KleinbrandSchindersgrube</a>
                      </
td>
                  </
tr>
              </
table



Lg eret12

Wie genau meinst du das?


eret12 schrieb:
Hi,

ich habe eine HTML Tabelle erstellt, die Funktioniert auch so weit ganz gut.

Mein Problem ist aber, dass ich einen abstand nach rechts von 5px zur nächsten Zeile haben möchte.
Nach unten zur nächsten Spalte möchte ich aber keinen so großen abstand haben.

somit kann ich weder cellspacing noch cellpadding benutzten...

Wie bekomme ich das nun also hin?


Hier meine Tabelle:

PHP-Code:
<table cellspacing="10px">
                  <
tr>
                      <
td>
                          <
a>Nr.</a>
                      </
td>
                      <
td>
                          <
a>Darum</a>
                      </
td>
                      <
td>
                          <
a>Uhrzeit</a>
                      </
td>
                      <
td>
                          <
a>Art</a>
                      </
td>
                      <
td>
                          <
a>MeldungOrt</a>
                      </
td>
                  </
tr>
                  <
tr>
                      <
td>
                          <
a>1.</a>
                      </
td>
                      <
td>
                          <
a>04.01.2010</a>
                      </
td>
                      <
td>
                          <
a>08.57</a>
                      </
td>
                      <
td>
                          <
a>T</a>
                      </
td>
                      <
td>
                          <
a>ÖlunfallHeilbronner Straße</a>
                      </
td>
                  </
tr>
                  <
tr>
                      <
td>
                          <
a>2.</a>
                      </
td>
                      <
td>
                          <
a>10.03.2010</a>
                      </
td>
                      <
td>
                          <
a>06.35</a>
                      </
td>
                      <
td>
                          <
a>B</a>
                      </
td>
                      <
td>
                          <
a>KleinbrandSchindersgrube</a>
                      </
td>
                  </
tr>
              </
table



Lg eret12

<td style="padding-right: 5px"><a>xxxx</a></td>
Eine Tabelle besteht aus Zeilen, die immer Rechts der vorigen Zeile angelegt werden, und Spalten, die immer unter der vorigen Spalte angelegt werden.

Ich möchte, dass zwischen den Zeilen ein abstand von 8px ist.
Zwischen den Spalten möchte ich aber nur einen abstand von 4px haben.


mit cellpadding="8px" zieht er ja aber in alle Richtungen eine 8px sperrzone...


somit komme ich mit diesem befehl nicht weiter...




@Cloud:

kann man das auch global in die <table> schreiben?
also dan so:

<table style="padding-right: 5px">...</td>




Lg eret12
Nein, dann würdest du zu der Tabelle nach rechts 5px Abstand schaffen.

Also padding schaft Abstand in die Angegebene Richtung (right, left, top, bottom)
Referenz-URLs