Results 1 to 2 of 2

Thread: Div ID Order

  1. #1
    Join Date
    Sep 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Div ID Order

    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

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    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.
    - Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •