SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Dec 2005
    0 Post(s)
    0 Thread(s)

    Making a cuptree using css?!?

    I'm trying to figure out how to create a dynamic cuptree like the image below:

    If its static, that means I know how many boxes there are in the first column I can just calculate the next column by pixels and so on... But, if the first column is dynamic I need another way to aproach it! Should it be by divs or tables... How do I figure this out...

    Please help and thanks in advance...

  2. #2
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Yorkshire, UK
    123 Post(s)
    1 Thread(s)
    What do you mean by "dynamic"? Will the boxes always form a pattern of 16>8>4>2>1, or will you sometimes have more than 2 boxes going into 1?

    The easiest way I can think of to do this is with a table - it may not be the ideal solution but I don't think it's too bad. Use rowspans to make the cells after the first column the right height, and within each cell, have a <div> with a specified size (assuming that's appropriate), centred vertically.


Posting Permissions

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