LanceT Posted March 13, 2007 Share Posted March 13, 2007 I'm working on a script that will display some tables side by side in a larger table. I want to make it so that they can align with each other no matter how many tables there are (the number of tables is set by the user). To give you an example Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/42438-making-a-tables-align-to-fit-a-layout-width/ Share on other sites More sharing options...
emehrkay Posted March 13, 2007 Share Posted March 13, 2007 i guess this is php if youre dynamically generating the outisde (white) table that table would look like <table> <tr><td></td><td></td></tr> //these would be the rows and in between the td tags you'd place the blue tables </table> now in your loop while drawing the white table you have to keep a count of how many blue tables will be put inside of it if the number is divisible by two, you add a </td></tr><td> if it isnt you just add </td><td> hope that makes sense the rest is styling. i would use pure css and divs, but do what you need to do Link to comment https://forums.phpfreaks.com/topic/42438-making-a-tables-align-to-fit-a-layout-width/#findComment-205879 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.