SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 28
  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ever wanted to have list items in reverse order?

    For instance, when creating a Top Ten list. Currently you can not do this with xhtml or CSS. If you think it would be useful, reply to the following topic.
    http://lists.w3.org/Archives/Public/...3Mar/0111.html

  2. #2
    SitePoint Addict Knightime's Avatar
    Join Date
    Jan 2003
    Location
    USA
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure why you'd want to do this. If you are hand-jamming the code, why not do it in whatever order you want it to display. If it's a function, then ORDER your query results ASC or DESC (in php)

  3. #3
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Because I'd like to do it without having to write PHP code. I also would like for the code to validate, instead of having to use span, and nbsp codes.

  4. #4
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it would also be semantically marked up correctly. nah, it makes sense, josh.
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  5. #5
    SitePoint Addict Knightime's Avatar
    Join Date
    Jan 2003
    Location
    USA
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I must have missed the point since I am all screwed up trying to learn other languages. Is it intended to be a displaying function?

  6. #6
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Josh, are you saying some CSS like this?
    Code:
    ol {
      list-order: reverse;
    }
    If so, that would be really cool and I'd go for it. Is there really that much demand for it though? Probably not, but it has never stopped the w3c before.

  7. #7
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    Is there really that much demand for it though? Probably not, but it has never stopped the w3c before.
    exactly. i think it's just a logical addition to the spec. if you have ordered lists, you should be able to define the counting order...
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  8. #8
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Knightime
    I must have missed the point since I am all screwed up trying to learn other languages. Is it intended to be a displaying function?
    well, the list would already be written in reverse order in the source, but the number automatically added to ordered lists would be reversed. so yes, you'd have something like

    Code:
    <ol style="list-order: reverse">
        <li>one</li>
        <li>two</li>
        <li>three</li>
    </ol>
    being displayed as

    Code:
    3. one
    2. two
    1. three
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  9. #9
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm...people on the w3 list seem to think what josh meant is that this reverse order would actually reverse the order in which the list items are displayed, compared to how they appear in the source. not sure what he meant now...just to affect the visual, automatic numbering, or actually rejig the order ?
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  10. #10
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by redux
    well, the list would already be written in reverse order in the source, but the number automatically added to ordered lists would be reversed. so yes, you'd have something like

    Code:
     
    <ol style="list-order: reverse"> 
    <li>one</li> 
    <li>two</li> 
    <li>three</li> 
    </ol>
    being displayed as

    Code:
     
    3. one 
    2. two 
    1. three

    That is exactly what I was intending.

  11. #11
    SitePoint Zealot Hulkur's Avatar
    Join Date
    Oct 2001
    Location
    Estonia
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This requires, that whole list must be known (browser has to read it all before displaing anything) and markup must be correct or browser will display something very wrong (if anything at all)
    (2B) or (not 2B) = FF

  12. #12
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hulkur
    This requires, that whole list must be known (browser has to read it all before displaing anything)
    which is what browsers do with many other elements already

    and markup must be correct or browser will display something very wrong (if anything at all)
    yes, but it's hoped that if you're concerned about semantically correct markup and CSS solutions such as this, you're coding to correct standards...
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  13. #13
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hummm
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html
     xmlns="http://www.w3.org/1999/xhtml"
     lang="en-US"
     xml:lang="en-US">
    
    <head>
    
    <title>My CSS Example</title>
    
    <style type="text/css"><![CDATA[
    ol {
     list-style: none;
     counter-reset: topten 11;
    }
    
    li:before {
     counter-increment: topten -1;
     content: counter(topten) ") ";
    }
    ]]></style>
    
    </head>
    
    <body>
    
    <ol>
      <li>Three</li>
      <li>Two</li>
      <li>One</li>
    </ol>
    
    </body>
    
    </html>
    Works in Opera... :-p

    ~~Ian
    Last edited by Ian Glass; Mar 18, 2003 at 21:48.

  14. #14
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    please close your li tags, ian
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  15. #15
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a mockup... There, feel better? :-p

    Oh, and at least I've never used presentational markup on the forums, mister <b> </b>

    ~~Ian
    Last edited by Ian Glass; Mar 18, 2003 at 21:57.

  16. #16
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, great! Now, the CDATA junk ruins it. Thanks a whole bunch, redux. Don't you feel helpful now! :-p

    Take that out if you use it, why don'cha.

    ~~Ian

  17. #17
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ian Glass
    Oh, great! Now, the CDATA junk ruins it. Thanks a whole bunch, redux. Don't you feel helpful now! :-p

    Take that out if you use it, why don'cha.

    ~~Ian
    heh...simple solution: external stylesheets (same as with javascript)

    yeah, i do feel better now though. thanks ian

    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  18. #18
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by redux
    heh...simple solution: external stylesheets (same as with javascript)

    yeah, i do feel better now though. thanks ian

    Sadly that is the best way to accomplish getting around CDATA in HTML documents for now. I learned that the hard way when converting a site to XHTML 1.1 and trying to add CDATA in. I just gave up and put scripts in other files.

  19. #19
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by redux
    heh...simple solution: external stylesheets (same as with javascript)
    Well I didn't think Josh'd appreciate:
    Code:
    <!-- yadda -->
    <link rel="stylesheet" href="yadda.css"/>
    <!-- yadda -->
    Yeah, the stuff you need is in yadda.css.
    Lookie here, I try to be helpful, and all you've done is make fun of me. >:-(

    :-p

    ~~Ian

  20. #20
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Opera has less than 1% market share.

  21. #21
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...but it's the most standards-compliant and worthy to be used a general measuring stick.
    Aaron Brazell
    Technosailor



  22. #22
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Sketch
    ...but it's the most standards-compliant and worthy to be used a general measuring stick.
    Really? I think Mozilla is right up there with Opera. Moz does some things better, Opera does others better, but I think they're both pretty even.

    Oh yeah, and typing this from Opera 7, it still doesn't support accesskeys! Try pressing alt+s to post a reply; works in IE and Moz, but not Opera.

  23. #23
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Joshua Clinard
    Opera has less than 1% market share.
    So does Netscape 4, but lots of people still have to support it in some way.

  24. #24
    public static void brain Gybbyl's Avatar
    Join Date
    Jun 2002
    Location
    Montana, USA
    Posts
    647
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    ol {
       list-order: reverse;
    }
    If so, that would be really cool and I'd go for it.
    That's about the coolest thing I've ever heard someone think of (well i didnt hear them think of it) to do in CSS. I hope they start implementing more dynamic things like that without making you use a scripting language.

    Kudos for the good idea.
    Ryan

  25. #25
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    Oh yeah, and typing this from Opera 7, it still doesn't support accesskeys! Try pressing alt+s to post a reply; works in IE and Moz, but not Opera.
    http://my.opera.com/forums/showthrea...ight=accesskey
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com


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
  •