Jump to content

Spacing? Not Sure.


marcusG

Recommended Posts

[code]<table width="1000" id="table">
<tr>
<th id="table2" width='140' scope='col'> Referansenr</th>
<th id="table2" width='140' scope='col'> Ankomst</th>
<th id="table2" width='140' scope='col'> Avreise</th>
<th id="table2" width='140' scope='col'> Navn    </th>
<th id="table2" width='140' scope='col'> Adresse</th>
<th id="table2" width='140' scope='col'> E-Post                  </th>
<th id="table2" width='140' scope='col'> Telefon</th>
<th id="table2" width='140' scope='col'> Lugar</th>
<th id="table2" width='140' scope='col'> Betaling</th>
<th id="table2" width='140' scope='col'> Pris</th>
<th id="table2" width='140' scope='col'> Betalt?</th>
</tr>
</table>


these are tables

Link to comment
https://forums.phpfreaks.com/topic/270008-spacing-not-sure/#findComment-1388308
Share on other sites

Yes, many tables. One for each row, in fact. Which is the problem, and quite logically so if you think about it.

What you need to use is one table, for all of the rows. That way the browser knows that they are all connected, instead of a bunch of different and unrelated tables.

 

Also:

  • Drop the &nbsp entities, use CSS instead.
  • Use class instead of id, as only one instance of an ID is permitted.
  • Use CSS to define the width. It gives you a lot more control and a lot less code.
  • Add htmlspecialchars () to the output, to prevent XSS and other HTML injection attacks.
  • And, finally: Please read up a bit more on the HTML syntax, especially on how to use tables (just ignore the styling attributes, use CSS for that). For your own sake. ;)

Link to comment
https://forums.phpfreaks.com/topic/270008-spacing-not-sure/#findComment-1388311
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.