Sponsor-Board.de
html Tabelle

+- Sponsor-Board.de (https://www.sponsor-board.de)
+-- Forum: Community (/forumdisplay.php?fid=56)
+--- Forum: Hilfe (/forumdisplay.php?fid=102)
+---- Forum: Scripting (/forumdisplay.php?fid=108)
+---- Thema: html Tabelle (/showthread.php?tid=34751)


html Tabelle - eret12 - 22.01.2013 19:09

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


RE: html Tabelle - Thorsten2209 - 22.01.2013 19:12

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




RE: html Tabelle - Niklas - 22.01.2013 19:17

<td style="padding-right: 5px"><a>xxxx</a></td>


RE: html Tabelle - eret12 - 22.01.2013 19:21

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


RE: html Tabelle - Niklas - 22.01.2013 19:28

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)