PDA

View Full Version : Div ID Order



_tech_dude_
09-29-2006, 09:20 AM
This is my idea: in order to make an updates page for my website,i figured i could make each update in a div container, and make the ID a number (1, 2 , 3 etc) and the, instead of just listing the contents of each container in the order written, the page will order them, with the highest number first. i'm assuming this would be done with javascript, and if not i'm sorry for using the wrong forum, i just wanted to check.
thanks for your time :)

mburt
09-29-2006, 10:50 AM
First of all, you can't make an id tag a decimal value. It has to start with a letter of some kind. ex: a1, a2, a3
However: this can be done with JavaScript. But I don't see the point. Listing updates on a website doesn't require any extra time or anything, just list the div containers in the proper order, and they'll come up in that order. Div elements are block-level elements which basically means they'll take up an entire line, so you won't need any breaks. Plus, if your user doesn't have JavaScript enabled the whole "updates" layout will be messed up.
Hopefully you'll understand why this isn't the best idea ever. Sure; it could be done, but there's honestly no point.