CSS Columns from Lists?

RWBRWB Icrontian
edited February 2007 in Internet & Media
I have an unordered list I wanna make into 3 even columns without the use tables and crap like that. Any ideas?

[PHP]
<div id="secondary_menu">
<ul>
<li><a href="#various">Various</a></li>
<li><a href="#comfort_inn">Comfort Inn</a></li>
<li><a href="#country_inn_suites">Country Inn & Suites</a></li>
<li><a href="#courtyard">Courtyard by Marriott</a></li>
<li><a href="#crown_plaza">Crown Plaza</a></li>
<li><a href="#doubletree">Doubletree</a></li>
<li><a href="#embassy_suites">Embassy Suites</a></li>
<li><a href="#hampton_inn">Hampton Inn</a></li>
<li><a href="#hilton">Hilton</a></li>
<li><a href="#holiday_inn">Holiday Inn</a></li>
<li><a href="#homewood_suites">Homewood Suites</a></li>
<li><a href="#hyatt">Hyatt</a></li>
<li><a href="#marriott">Marriott</a></li>
<li><a href="#radisson">Radisson</a></li>
<li><a href="#sheraton">Sheraton</a></li>
<li><a href="#value_place">Value Place</a></li>
</ul>
</div>
[/PHP]

Things may get added or removed from time to time so I can effectivly use tables for what I am doing.

Comments

  • edited January 2007
    of course the best solution is to bust up the list into three div classes and then do something with those divs.

    three column layouts are very popular.

    http://www.bluerobot.com/web/layouts/layout3.html
    http://www.glish.com/css/7.asp
    http://www.saila.com/usage/layouts/

    css play has a lot of handy stuff too

    http://www.cssplay.co.uk/
  • nonstop301nonstop301 51° 27' 24.87&quot; N // 0° 11' 38.91&quot; W Member
    edited January 2007
    Very useful links lightnin

    I'm slowly adapting into CSS as well although it's not as difficult as HTML or Javascript :)
  • RWBRWB Icrontian
    edited January 2007
    The list needs to stay intact while being able to "overflow" into the next container evenly distributing the list items. I know it can be done, but those links only show how to create a 3 column site, of course with separate divs. I wish I could do it like that, but I can't. Eventually these items will be generated into this list so I wouldn't have control at that point.
  • nonstop301nonstop301 51° 27' 24.87&quot; N // 0° 11' 38.91&quot; W Member
    edited January 2007
    What you're referring to sounds like a multi column navigation menu style rather than the a simple 3 column webpage layout.

    I know how such a navigation menu can be done using Javascript but I don't know whether it's possible with CSS.

    If you want to use Javascript instead, <a href="http://www.milonic.com/menusample73.php"&gt;here</a> is a link to view an example and you can download the script from that site as well if that's the sort of thing you are after.
  • RWBRWB Icrontian
    edited January 2007
    Sometimes I am an idiot, I did google for answers but a new search term dawned on me JUST NOW... "multi column lists HTML" and viola I got this

    Thanks for your link as well, but this seems a bit more simple. I like simple. haha Gonna have to take a look at all that code later and see if I can use it, seems interesting, god knows I love javascript.
  • nonstop301nonstop301 51° 27' 24.87&quot; N // 0° 11' 38.91&quot; W Member
    edited January 2007
    RWB wrote:
    ...a new search term dawned on me JUST NOW... "multi column lists HTML" and voila I got this

    That will do very nicely as well in the CSS format :)
  • LincLinc Owner Detroit Icrontian
    edited January 2007
    There's quite a few on the front page now if you want to have a look at the HTML and CSS. Most notably this page: http://www.short-media.com/news/shorties
  • nonstop301nonstop301 51° 27' 24.87&quot; N // 0° 11' 38.91&quot; W Member
    edited February 2007
    That's a great front page you produced General with all the new CSS tricks you recently picked up :):thumbsup:
Sign In or Register to comment.