The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> list code
minidiapolis
post Sep 3 2006, 07:41 PM
Post #1


Serious Coder
*****

Group: Members
Posts: 437
Joined: 3-September 06
Member No.: 57



Hi, I know the basic code for a list consists of <ul><li></li></ul>

but how would you make a list go horizontally?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
John Pozadzides
post Sep 3 2006, 08:46 PM
Post #2


WDG Founder
******

Group: Root Admin
Posts: 529
Joined: 3-August 06
From: Magnolia, TX
Member No.: 2



QUOTE(minidiapolis @ Sep 3 2006, 07:41 PM) *

Hi, I know the basic code for a list consists of <ul><li></li></ul>

but how would you make a list go horizontally?

The default for HTML is that lists go Vertically. However, many people use Cascading Style Sheets to make horizontal drop down menus. If you do a search on Google for CSS Drop Down Menu you'll find some info.

But I have to ask, if you just want a vertical list, why not simply use a paragraph like so:
HTML
<p>Item 1 | Item 2 | Item 3 | Item 4</p>

or something like that?

John

Edited: Fixed my broken URL.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Tina Holmboe
post Sep 4 2006, 02:47 AM
Post #3


WDG Member


Group: Administrators
Posts: 4
Joined: 31-August 06
From: Sweden
Member No.: 40



Hello minidiapolis;

As John already touched upon, the way to go about it is to have an proper unordered or ordered list - i.e. UL or OL - and then applying suitable CSS to render it in the fashion you would like. This way you preserve the semantics of "a list", regardless of whether it is rendered vertically or horizontally.

I can warmly recommend List-a-matic as an excellent resource - see, for instance, Simple Horizontal List for an example.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
David Dorward
post Sep 4 2006, 03:46 AM
Post #4





Group: Members
Posts: 2
Joined: 1-September 06
Member No.: 47



QUOTE(Tina Holmboe @ Sep 4 2006, 08:47 AM) *
This way you preserve the semantics of "a list"

and you don't have screen readers trying to pronouce "|".
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 07:48 PM