marcusG Posted October 28, 2012 Share Posted October 28, 2012 How do I make this table sync? Quote 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. Quote 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 (edited) [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 Edited October 29, 2012 by marcusG Quote 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 (edited) 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. Edited October 29, 2012 by Philip Quote 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 (edited) Thank you, helped me out. Works like a charm :-) Names, epost and phone numbers are blanked out for obvious reasons. Edited October 31, 2012 by marcusG Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/270008-spacing-not-sure/#findComment-1389123 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.