mdmartiny Posted March 7, 2017 Share Posted March 7, 2017 Is there a way to force a div to automatically being placed at the bottom of other divs? I a PHP script that creates a bunch of dynamic divs and one, in particular, I would like to force to be at the bottom of all the other divs. Link to comment https://forums.phpfreaks.com/topic/303387-making-a-div-to-be-the-last-one-in-a-column/ Share on other sites More sharing options...
cyberRobot Posted March 8, 2017 Share Posted March 8, 2017 You could add all the information that you are using for the <div> tags to an array. Then just add the special <div> tag information to the end of the array and output the tags. Link to comment https://forums.phpfreaks.com/topic/303387-making-a-div-to-be-the-last-one-in-a-column/#findComment-1543901 Share on other sites More sharing options...
maxxd Posted March 8, 2017 Share Posted March 8, 2017 You could also accomplish this with CSS using flex and order. It won't affect the actual data structure, which could present some issues with screen readers in this case, but if that's not a concern it'll get the job done. Link to comment https://forums.phpfreaks.com/topic/303387-making-a-div-to-be-the-last-one-in-a-column/#findComment-1543921 Share on other sites More sharing options...
Barand Posted March 9, 2017 Share Posted March 9, 2017 (edited) Double-posting topics violates forum rules. https://forums.phpfreaks.com/topic/303410-forcing-a-div-to-the-bottom-of-another-div/?do=findComment&comment=1543994 Edited March 9, 2017 by cyberRobot Added post link Link to comment https://forums.phpfreaks.com/topic/303387-making-a-div-to-be-the-last-one-in-a-column/#findComment-1543996 Share on other sites More sharing options...
Recommended Posts