Tables uitlijnen --- OPGELOST ---
Ik heb een klein vraagje:
Ik probeer de uitlijning van mijn table goed te maken, zodat alle woorden op 1 regel passen, nu is dat niet het geval bij Rekening Nummer:
De code die ik gebruik is dit:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
echo "<table class='cmstable' cellspacing='0' cellpadding='2' width=100%>";
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<th class='cmsheader' colspan='4'>Extra Gegevens</th>";
echo "</tr>";
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "Bank Relatie"; // Bank relatie
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankRel' size='35' value=''/>";
echo "</td>";
echo "<td>";
echo "IBAN nr."; // IBAN Nr.
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraIban' size='35' value=''/>";
echo "</td>";
echo "</tr>";
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "Bank Adres"; // Bank adres
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankAdres' size='35' value=''/>";
echo "</td>";
echo "<td>";
echo "Swift / BIC"; // Swift / BIC
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraSwift' size='35' value=''/>";
echo "</td>";
echo "</tr>";
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "<span style=\"margin-left: 30px;\">Huisnummer</span>"; // Bank Huisnummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankAdresHuisnr' size='35' value=''/>";
echo "</td>";
echo "<td>";
echo "Rekening nr."; // Rekening Nummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraReken' size='35' value=''/>";
echo "</td>";
echo "</tr>";
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "<span style=\"margin-left: 30px;\">Postcode</span>"; // Bank Postcode
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankAdresPostc' size='35' value=''/>";
echo "</td>";
echo "<td>";
echo "KvK nr."; // KvK nummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraKvk' size='35' value=''/>";
echo "</td>";
echo "</tr>";
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "<span style=\"margin-left: 30px;\">Plaats</span>"; // Bank Plaats
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankAdresPlaats' size='35' value=''/>";
echo "</td>";
echo "<td>";
echo "BTW nr."; // BTW nummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBTW' size='35' value=''/>";
echo "</td>";
echo "</tr>";
echo "</table>";
?>
echo "<table class='cmstable' cellspacing='0' cellpadding='2' width=100%>";
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<th class='cmsheader' colspan='4'>Extra Gegevens</th>";
echo "</tr>";
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "Bank Relatie"; // Bank relatie
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankRel' size='35' value=''/>";
echo "</td>";
echo "<td>";
echo "IBAN nr."; // IBAN Nr.
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraIban' size='35' value=''/>";
echo "</td>";
echo "</tr>";
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "Bank Adres"; // Bank adres
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankAdres' size='35' value=''/>";
echo "</td>";
echo "<td>";
echo "Swift / BIC"; // Swift / BIC
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraSwift' size='35' value=''/>";
echo "</td>";
echo "</tr>";
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "<span style=\"margin-left: 30px;\">Huisnummer</span>"; // Bank Huisnummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankAdresHuisnr' size='35' value=''/>";
echo "</td>";
echo "<td>";
echo "Rekening nr."; // Rekening Nummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraReken' size='35' value=''/>";
echo "</td>";
echo "</tr>";
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "<span style=\"margin-left: 30px;\">Postcode</span>"; // Bank Postcode
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankAdresPostc' size='35' value=''/>";
echo "</td>";
echo "<td>";
echo "KvK nr."; // KvK nummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraKvk' size='35' value=''/>";
echo "</td>";
echo "</tr>";
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "<span style=\"margin-left: 30px;\">Plaats</span>"; // Bank Plaats
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankAdresPlaats' size='35' value=''/>";
echo "</td>";
echo "<td>";
echo "BTW nr."; // BTW nummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBTW' size='35' value=''/>";
echo "</td>";
echo "</tr>";
echo "</table>";
?>
Graag een antwoord :)
Greetz,
Sem
Gewijzigd op 23/10/2012 15:29:26 door Sem E
Opmerkingen:
script consequent: je gebruik in je html nu " en ' door elkaar. Vergelijk regel 64 en 67.
Tip: gebruik ' voor de echo en " voor de HTML. HOef je niet te escapen.
De uitlijning van bank relatie en bank adres kloppen (ook) niet met de rest in de 1e kolom.
Overigens is de vraag of je dit met een table moet doen of met css.
maar die regel 64, de style=\"\" moet met dubbel qoutes (") anders werkt hij niet mee.
dus ik zou bijvoorbeeld
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "<span style=\"margin-left: 30px;\">Huisnummer</span>"; // Bank Huisnummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankAdresHuisnr' size='35' value=''/>";
echo "</td>";
echo "<td style=\"width: 500px;\">"; // <<<------------------------------
echo "Rekening nr."; // Rekening Nummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraReken' size='35' value=''/>";
echo "</td>";
echo "</tr>";
?>
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "<span style=\"margin-left: 30px;\">Huisnummer</span>"; // Bank Huisnummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankAdresHuisnr' size='35' value=''/>";
echo "</td>";
echo "<td style=\"width: 500px;\">"; // <<<------------------------------
echo "Rekening nr."; // Rekening Nummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraReken' size='35' value=''/>";
echo "</td>";
echo "</tr>";
?>
En de eerste kolom moet zo, om aan te geven dat Huisnummer enz. bij Adres horen, en geen aparte kollomen zijn.
Gewijzigd op 23/10/2012 15:24:07 door Sem E
text-wrap:none;
}
aan je css toevoegen
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "<span style=\"margin-left: 30px;\">Huisnummer</span>"; // Bank Huisnummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankAdresHuisnr' size='35' value=''/>";
echo "</td>";
echo "<td style=\"width: 75px;\">"; // <<<------------------------------
echo "Rekening nr."; // Rekening Nummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraReken' size='35' value=''/>";
echo "</td>";
echo "</tr>";
?>
echo "<tr class='cmscell ". oddeven() ."'>";
echo "<td>";
echo "<span style=\"margin-left: 30px;\">Huisnummer</span>"; // Bank Huisnummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraBankAdresHuisnr' size='35' value=''/>";
echo "</td>";
echo "<td style=\"width: 75px;\">"; // <<<------------------------------
echo "Rekening nr."; // Rekening Nummer
echo "</td>";
echo "<td>";
echo "<input type='text' name='extraReken' size='35' value=''/>";
echo "</td>";
echo "</tr>";
?>
En nu is het gelukt, bedankt Obelix, of Idefix of Perkamentus ;)
--- OPGELOST ---
Hopelijk doe je ook wat met:
Obelix en Idefix op 23/10/2012 15:02:30:
script consequent: je gebruik in je html nu " en ' door elkaar. Vergelijk regel 64 en 67.
Tip: gebruik ' voor de echo en " voor de HTML. HOef je niet te escapen.
Tip: gebruik ' voor de echo en " voor de HTML. HOef je niet te escapen.