HighDots Forums  

CSS - Multicolumn lists

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss CSS - Multicolumn lists in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default CSS - Multicolumn lists - 12-17-2003 , 08:11 AM






I'm a system developer and won't even pretend that I'm a designer, but
I want to move our graphics designers off of "old way" of hacking html
to get desired results, to marking up documents according to current
web standards.

I've been trying to design on of our new pages myself, but the biggest
problem I'm running into is trying to create multicolumn lists. I
have a list of items, which is most definitely a list, not a table,
but I can't for the life of me figure out how to display a list in
three columns. The main reason I want to do this, is for screen real
estate. I've tried setting the li tag to display:inline, and setting
a fixed width, but I guess the width doesn't go along with the inline
attribute. Has anyone had experience with this?

Reply With Quote
  #2  
Old   
Anne van Kesteren
 
Posts: n/a

Default Re: CSS - Multicolumn lists - 12-17-2003 , 08:39 AM






Chris Stout wrote:

Quote:
I'm a system developer and won't even pretend that I'm a designer, but
I want to move our graphics designers off of "old way" of hacking html
to get desired results, to marking up documents according to current
web standards.

I've been trying to design on of our new pages myself, but the biggest
problem I'm running into is trying to create multicolumn lists. I
have a list of items, which is most definitely a list, not a table,
but I can't for the life of me figure out how to display a list in
three columns. The main reason I want to do this, is for screen real
estate. I've tried setting the li tag to display:inline, and setting
a fixed width, but I guess the width doesn't go along with the inline
attribute. Has anyone had experience with this?
Small example with fixed width in px ignoring accessibility here for a
moment. We have the following unordered list:

<ul>
<li>Item 01</li>
<li>Item 02</li>
<li>Item 03</li>
<li>Item 04</li>
<li>Item 05</li>
<li>Item 06</li>
<li>Item 07</li>
<li>Item 08</li>
<li>Item 09</li>
</ul>

That is the markup. Now it is time to style:

ul{
margin:0;
padding:0;
list-style:none;
width:600px;
}
ul li{
margin:0;
padding:0;
display:block;
float:left;
width:200px;
}

That is it, I hope :-)


--
Anne van Kesteren
<http://www.annevankesteren.nl/>


Reply With Quote
  #3  
Old   
Anne van Kesteren
 
Posts: n/a

Default Re: CSS - Multicolumn lists - 12-17-2003 , 01:23 PM



Brian wrote:

Quote:
Chris Stout wrote:


problem I'm running into is trying to create multicolumn lists. I
have a list of items, which is most definitely a list, not a table,
but I can't for the life of me figure out how to display a list in
three columns. The main reason I want to do this, is for screen real
estate.


You mean you want a list to go down the screen, and then start again at
the top of the next column? Quite a bit more difficult then you might
imagine.
element{
float:top; /* [1] */
}

I want CSS3 now!

[1] <http://www.w3.org/TR/2002/WD-css3-box-20021024/#float>

--
Anne van Kesteren
<http://www.annevankesteren.nl/>


Reply With Quote
  #4  
Old   
Christoph Paeper
 
Posts: n/a

Default Re: CSS - Multicolumn lists - 12-17-2003 , 04:18 PM



*Chris Stout*:
Quote:
I've been trying to design on of our new pages myself, but the biggest
problem I'm running into is trying to create multicolumn lists.
I've a test page for this at
<http://webdesign.crissov.de/temp/multicol-lists>, the English original is
at <http://www.fu2k.org/alex/css/cssjunk/ListColumns.mhtml>.

--
"Show me a sane man and I will cure him." -- C.G. Jung


Reply With Quote
  #5  
Old   
Alex Bell
 
Posts: n/a

Default Re: CSS - Multicolumn lists - 12-18-2003 , 03:55 AM



On 17 Dec 2003 06:11:35 -0800, chris (AT) williamsburg (DOT) com (Chris Stout)
wrote:

Quote:
I'm a system developer and won't even pretend that I'm a designer, but
I want to move our graphics designers off of "old way" of hacking html
to get desired results, to marking up documents according to current
web standards.

I've been trying to design on of our new pages myself, but the biggest
problem I'm running into is trying to create multicolumn lists. I
have a list of items, which is most definitely a list, not a table,
but I can't for the life of me figure out how to display a list in
three columns. The main reason I want to do this, is for screen real
estate. I've tried setting the li tag to display:inline, and setting
a fixed width, but I guess the width doesn't go along with the inline
attribute. Has anyone had experience with this?
You might like to look at
http://www.members.iinet.net.au/~abell1/oboe.htm

and associated pages which have the alphabet in three columns + a
blank, and another list below.
Please note that I can't make it work reliably with MSIE for the Mac,
though it does work in MSIE 5.5, Opera 7.23, Mozilla 1.3, and Netscape
6.2

Regards, Alex





Reply With Quote
  #6  
Old   
AT
 
Posts: n/a

Default Re: CSS - Multicolumn lists - 12-18-2003 , 11:30 AM



Anne van Kesteren <mail (AT) annevankesteren (DOT) nl> wrote

Quote:
Brian wrote:

Chris Stout wrote:


problem I'm running into is trying to create multicolumn lists. I
have a list of items, which is most definitely a list, not a table,
but I can't for the life of me figure out how to display a list in
three columns. The main reason I want to do this, is for screen real
estate.


You mean you want a list to go down the screen, and then start again at
the top of the next column? Quite a bit more difficult then you might
imagine.

element{
float:top; /* [1] */
}

I want CSS3 now!

Hell, I want CSS2 now.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.