.:∴ Archives ∴:.
Tierra Verde

Sunday, December 25

Flat lists  


From Keith Devens
"Flat lists" in CSS

Some handy CSS for doing "flat lists":
.flat-list{
list-style-type: none;
margin-left: 0;
padding-left: 1em;
text-indent: -1em;
}
Now I won't have to look it up ever again. The text-indent combined with padding-left has the effect of indenting wrapped lines of the list, so that even though the list doesn't have "markers" (i.e. bullets or numbers) it's still clear where one list item begins and ends.
I'll have tor try this out sometime. Thanks Keith!

Tags:

Permanent link posted by bytehead @ 12/25/2005 12:16:00 PM   Edit this entry 0 comments Links to this post

0 Comments:

Post a Comment

Links to this post:

Create a Link

 

Article Index

Flat lists
Copyright © 2003-2008, Bryan Price. Licensed by Creative Commons License: Creative Commons License
Home| This page| Colophon| Disclaimer| Privacy Statement