Jump to content
mdmartiny

Making a div to be the last one in a column

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Guest
This topic is now 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.