SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Complex Lists

  1. #1
    Join Date
    Jan 2004
    0 Post(s)
    0 Thread(s)

    Complex Lists

    If you look at this page...

    you'll see a list of mammal orders, families, etc. with each taxonomic grouping given just the right spacing. However, if you look at the source code, you'll see that they used a very amateurish strategy; the spacings are created with spacer images and whatever you call this -  

    Anyway, I'm working on a huge list of animal scientific names. I'm trying to figure out a way to transform it into a list where every ORDER will be indented, say, 5 pixels, ever FAMILY indented 10 pixels, every GENUS indented 15 pixels, etc.

    It would take way too long to do it manually. I've been exploring a search and replace using tags like <ul> and <li>, but that get's awfully confusing.

    Is there some way to easily accomplish something like this, using lists or some other strategy? I suspect it could be done with PHP, but my skills are pretty weak right now.

    Any tips?

    Order Artiodactyla
    Family Cervidae
    Family Bovidae
    Genus Bison
    Genus Ovis
    Order Carnivora
    Family Canidae
    Genus Canis
    Genus Vulpes
    Family Felidae
    Genus Panthera

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Toronto, Canada
    63 Post(s)
    3 Thread(s)
    confusing? not really

    nested ULs is definitely the way to do it

    then apply styling with css | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Posting Permissions

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