Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Apr 2006
    Posts
    37
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Unordered List Help

    Hi, i have 7 items in an Unordered List.

    for designs sake, i'm trying to display them on my page like this.

    <li></li> | <li></li>
    <li></li> | <li></li>
    <li></li>
    <li></li>
    <li></li>

    Each list item is a link, and it has display:block property on it so the link background changes color in hover and is rectangular in shape.

    Any ideas how i can achieve the above look?

    Thanks.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Details

    You need to supply a bit more details:

    Are these list items meant to be all in one list, or can they be in multiple lists?
    In what order do you want them to appear, compared to the order in which they appear in the markup?

    (By the way:
    it has display:block property
    you mean the links, right? List items are block level by default.)
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    New Coder
    Join Date
    Apr 2006
    Posts
    37
    Thanks
    2
    Thanked 0 Times in 0 Posts
    yep, the links have display:block on them.

    and it's all one UL.

    id like to show the lists in the following order.

    1 | 6
    2 | 7
    3
    4
    5

    Is this possible?

    i've been googling, and i may have to add a class to each list, but i really don't want to add more mark-up, is there a way i can do this just through CSS?

    thanks.

  • #4
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Yeah, there's no real way to do what you're looking for w/ CSS; there's an article that goes over some of the alternatives (http://old.alistapart.com/articles/multicolumnlists/), none of them very appealing. I tend to just add extra classes to the list items and use those for the style hooks.


  •  

    Posting Permissions

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