marcusG Posted October 28, 2012 Share Posted October 28, 2012 How do I make this table sync? Link to comment https://forums.phpfreaks.com/topic/270008-spacing-not-sure/ Share on other sites More sharing options...
ManiacDan Posted October 28, 2012 Share Posted October 28, 2012 Use tables. You're not using them. Tabular data should be in tables. Link to comment https://forums.phpfreaks.com/topic/270008-spacing-not-sure/#findComment-1388299 Share on other sites More sharing options...
marcusG Posted October 29, 2012 Author Share Posted October 29, 2012 [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 More sharing options...
Christian F. Posted October 29, 2012 Share Posted October 29, 2012 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   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 More sharing options...
marcusG Posted October 31, 2012 Author Share Posted October 31, 2012 Thank you, helped me out. Works like a charm :-) Names, epost and phone numbers are blanked out for obvious reasons. Link to comment https://forums.phpfreaks.com/topic/270008-spacing-not-sure/#findComment-1389111 Share on other sites More sharing options...
Christian F. Posted October 31, 2012 Share Posted October 31, 2012 You're welcome, glad I could help. Link to comment https://forums.phpfreaks.com/topic/270008-spacing-not-sure/#findComment-1389123 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.