Suggest a Snippet Login Register
  • LOG IN:

    Not a member? JOIN NOW!
     Username                   Password
    Remember me Recover password
DevSnippets Design Community & Snippets Gallery
  • Subscribe by RSS
>
  • Webdesign
    • Design
    • HTML5
    • lists
    • Menu
    • Navigation
    • Portfolio
    • Showcase
    • Template
    • Tooltip
    • Tutorial
    • webdesign
  • Web development
    • AJAX
    • CodeIgniter
    • CSS
    • CSS3
    • Database
    • Javascript
    • jQuery
    • Mootools
    • MySQL
    • PHP
    • PHP Framework
    • plugins
    • WordPress
    • WordPress Hacks
  • Inspiration
    • Fonts
    • Icons
    • Inspiration
    • Mac
    • Mac apps
    • Photography
    • Wallpapers
  • Snippets
In {Articles} -13th May- {50 Comments}

Styling your Lists: 20+ Brilliant How to’s and Best Practices

When we think about CSS-Styled lists, different ideas come to mind but that rusty old image of bulleted items is not one of them anymore. There are lots of different methods to format nice HTML lists that is used in most web designs not only for navigation menu (vertical or horizontal) but for formatting many design blocks in a stylish and elegant manner. In this article, we’ll have a look at how such lists can create a whole new look, feel, and effect of a site.

Style Your Ordered List

Styling your Lists

By default, most browsers display the ordered list numbers same font style as the body text. Here is a quick CSS tutorial on how you can use the ordered list (ol) and paragraph (p) element to design a stylish numbered list.

Elastic Calendar Styling with CSS

Styling your Lists

You can tackle calendar styling with pure CSS, and I feel it makes just as much sense semantically as a table does. By using CSS, we can even do some cool things like do all our sizing with ems so our calendar layout will be elastic. That is, grow in both width and height when text is resized in browsers, while greatly increasing accessibility.

Three Column CSS

Styling your Lists

A Three Column CSS Layout Using Just an Unordered List

Simulating a Table Using an Unordered List

Styling your Lists

With the raise in popularity of AJAX sortable list elements, using list items to represent a multiple column data table can allow for easy sorting of various more “tabley” information. Here is how to simulate a table using an unordered list.

How to Create a Block Hover Effect for a List of Links

Styling your Lists

Learn how to create this “block hover” effect. Because IE only supports the :hover element for links, the link anchor needs to go around all the text in the list item. Therefore, we need to provide some additional hooks in order to style the content. We do this through the use of <em> and <span> tags.

<div id="links">
    <ul>
      <li><a href="#" title="Text">Link Heading One
        <em>Description of link.</em>
        <span>Date posted</span></a></li>
      <li><a href="#" title="Text">Link Heading One
        <em>Description of link.</em>
        <span>Date posted</span></a></li>
    </ul>
  </div>

The Amazing LI

Styling your Lists

Using CSS and Unordered List Items to Do Just About Anything.

Centering List Items Horizontally

Styling your Lists

Slightly Trickier Than You Might Think, by wrapping the list inside a table div and using display: table; trick.

Turning a list into a navigation bar

Styling your Lists

Learn how to create a navigation bar using unordered lists.

FORM elements design using CSS and list (ul and dl)

Styling your Lists

Tables are useful to design complex HTML forms but a good alternative is to use list elements and CSS. In this post you will see another way to design FORM using list elements <ul> and <li>.

<fieldset>
<legend>Sign-up Form</legend>
<form name="signup" action="index.html" method="post">
<ul>
<li> <label for="name">Name</label>
<input type="text" name="name" id="name" size="30" />
</li>
<li> <label for="email">Email</label>
<input type="text" name="email" id="email" size="30" />
</li>
</fieldset>

5 Ways to Set Your Unordered Lists Apart

Styling your Lists

Here are five different ways to style your unordered lists with CSS.

Taming Lists

Styling your Lists

In this article, Mark Newhouse demonstrates how to use CSS to bring unwieldy lists under control. It’s time for you to tell lists how to behave, instead of letting them run wild on your web page.

<div id="bread">
<ul>
	<li class="first">Home
	<ul>
		<li>&#187; Products
		<ul>
			<li>&#187; Computers
			<ul>
				<li>&#187; Software</li>
			</ul></li>
		</ul></li>
	</ul></li>
</ul>
</div>

Nested lists used to create a simple folder metaphore

Styling your Lists

Here’s a rough and ready example showing how to make a folder analalogy using a nested list.

<ul id="sitemap">
<li><a href="#">item 1</a></li>
<li><a href="#">item 2</a></li>
<li><a href="#">item 3</a></li>
<li><a href="#" class="open">item 4</a>
<ul>
<li><a href="#">sub-item 1</a></li>
<li><a href="#">sub-item 2</a></li>
<li><a href="#" class="open">sub-item 3</a>
<ul>
<li><a href="#">sub-sub-item 1</a></li>
<li><a href="#">sub-sub-item 2</a></li>
<li><a href="#" class="open">sub-sub-item 3</a>
<ul>
<li><a href="#">sub-sub-sub-item 1</a></li>
<li><a href="#">sub-sub-sub-item 2</a></li>
<li><a href="#">sub-sub-sub-item 3</a></li>
<li><a href="#">sub-sub-sub-item 4</a></li>
</ul>
</li>
<li><a href="#">sub-sub-item 4</a></li>
</ul>
</li>
<li><a href="#">sub-item 4</a></li>
</ul>
</li>
<li><a href="#">item 5</a></li>
<li><a href="#">item 6</a></li>
</ul>

Handcrafted CSS + HTML Grid Calendar 2009

Styling your Lists

Some experiments with css and grids in order to make CSS Grid Calendar for 2009.

Best Practices

Mixx’s Popular Stories

Styling your Lists

The markup is not simple, since they are using child <ul> along with a voting form and <span> tags.

<ul>
    <li>
      <h4><a href="#"></a><span><a target="_blank" href="#"></a></span></h4>
      <div>
	<div><span></span></div>
	<div>
             <form>
		    <input/>
		    <button type="submit"><span></span></button>
		    <input/>
             </form>
	 </div>
      </div>
      <ul>
	  <li><a href="#"></a></li>
	  <li></li>
	  <li></li>
      </ul>
      <blockquote>
	  <p></p>
      </blockquote>
      <ul>
	  <li><a href="#"></a></li>
	  <li><a href="#"></a></li>
	  <li><a href="#"></a></li>
      </ul>

    </li>
</ul>

Thecosmicmachine

Styling your Lists

Thecosmicmachine’s Supported social networks, uses unordered list. Clean and simple.

<ul id="web2List">
					<li>
						<img src="images/twitter_32.png"/>
						<strong>Twitter</strong><br/>
						What are you doing?
					</li>
					<li>
						<img src="images/facebook_32.png"/>
						<strong>Facebook</strong><br/>
						Connect with the people around you.
					</li>
</ul>

Viget- Inspire

Styling your Lists

Viget- Inspire uses a pretty nice calender in their footer using unordered list.

<ul class="clearfix">
       <li><a href="http://www.viget.com/inspire/2009/05/">May 09</a></li>
       <li><a href="http://www.viget.com/inspire/2009/04/">Apr 09</a></li>
       <li><a href="http://www.viget.com/inspire/2009/03/">Mar 09</a></li>
       <li><a href="http://www.viget.com/inspire/2009/02/">Feb 09</a></li>
       ......
</ul>

Product Planner

Styling your Lists

Product Planner uses ordered list to show the user the steps of using their service. Each item (#how_to_use li.step_1) uses a different image.

<ol>
		<li class="step_1">Find a flow from the gallery.</li>
		<li class="step_2">Use that flow to create your own.</li>
		<li class="step_3">Share it with your colleagues.</li>
</ol>

Onwired Code block

Styling your Lists

Onwired uses ordered list to create their code block.

Jobs on the wall

Styling your Lists

Nick La uses unordered lists to display all available jobs.

<ul class="joblist">
   <li class="">
        <img class="employerlogo" alt="" src="http://jobs.webdesignerwall.com/images/logos/small_1390806013"/>
        <img class="category" alt="" src="http://jobs.webdesignerwall.com/images/cat-design.gif"/>
        <h3><a href="http://jobs.webdesignerwall.com/job.php?id=310">Web/Graphic Designer</a></h3>
        <p class="jobinfo"><span class="type">Full-Time</span>   <em>at</em> Hallmark Channel <em>(Studio City, Ca)</em></p>
   </li>
</ul>

Category: Article, CSS | Leave a Comment | 50 Comments

Related Posts

  • Creating 10 Most-Used Javascript Techniques Using Pure CSS Styling Creating 10 Most-Used Javascript Techniques Using Pure CSS Styling
  • 20 NEW & FREE High Quality (X)HTML/CSS Templates 20 NEW & FREE High Quality (X)HTML/CSS Templates
  • CSS Code Snippets : 15 Wicked Tricks CSS Code Snippets : 15 Wicked Tricks

50 Comments, Add Comment or Ping

  1. Patternhead says:
    May 13, 2009 at 7:17 am

    Great resource, bookmarked for future ref, thanks :)

    • Watch TV says:
      May 14, 2009 at 1:07 am

      Great list, I liked the cosmicmachine best.

  2. Peter says:
    May 13, 2009 at 9:47 am

    >>Simulating a Table Using an Unordered List

    First of all this is a misappropriation. Semantically speaking if it’s tabular data it goes in a table. This goes against the idea of a semantic web.

    How exactly is that better for sorting than a table? There is no evidence of any benefit and just a vague reference to AJAX? WTF? AJAX doesn’t justify a bad idea.

    With tables the DOM separates headers out into thead and you can sort the tr elements of tbody very easily using jQuery or other scripting frameworks.

    Using this method multiline “cells” mess things up because other “cells” in the “row” don’t expand vertically which leads to all kinds of styling issues.

    This doesn’t make things easier, it complicates things.

    • Tim says:
      May 13, 2009 at 10:50 am

      Peter, I agree with you completely. The article was written originally as a concept for creating table-ish rows that had additional options that could be dragged and sorted. While a lot of my readers have found it useful, I am an no way suggesting bloated divs over semantic tabular representation. And of course, while it might be useful to some, it should be noted the blog post was from July 2007.

    • Dan says:
      May 13, 2009 at 1:06 pm

      absolutely correct

      • Noura Yehia says:
        May 13, 2009 at 2:50 pm

        Agreed :)

        We are not suggesting using (li) over tabular layout, its not even a personal preference.
        This post is to showcase different ways to use unordered/ordered lists and it happened that this tutorial (Simulating a Table Using an Unordered List) made a good use of it.

    • Austin Web Design says:
      May 13, 2009 at 4:48 pm

      I agree completely, Peter. With the demise of tables there comes the silly idea that everything should be a list or a series of divs. Tables are perfectly fine, just not for layout.

    • Mikey says:
      May 13, 2009 at 4:59 pm

      Agreed 100%. Most of these examples are semantically poor. What’s even poorer is you’ve used ‘best practices’ in the title of this article, but nearly all of these are as far away removed from good examples of best practices as you could get.

      Remember that just because you can achieve something in a way that’s easier or uses less code than another, doesn’t mean it’s the best way. Web standards and semantics exist for a reason.

  3. mvcforge.com says:
    May 13, 2009 at 9:52 am

    Thanks for the nice article :)

  4. Vladimir says:
    May 13, 2009 at 2:05 pm

    Great list! Thank you for mentioning my CSS Calendar!

  5. joyologo design shop 2.0 says:
    May 13, 2009 at 3:07 pm

    nice list thanks..

  6. Darren Taylor says:
    May 14, 2009 at 1:51 am

    I appreciate that this article is a demonstration of how lists can be styled but it will no doubt mislead people and have them off creating 3 col layouts, tables and forms using non-semantic markup, breaking web standards and creating all sorts of problems for users with impairments. This is actually quite daft, it’s like demonstrating how you can get a form tag to act like a span, it makes no sense to do so.

  7. art2code says:
    May 14, 2009 at 4:47 am

    nice list! thx

  8. Clint says:
    May 15, 2009 at 8:23 am

    Great List.

  9. Tom says:
    May 15, 2009 at 8:48 pm

    Look forward to raading the Elastic Calendar post at CSStricks, thanks for the list.

  10. yacht club says:
    May 16, 2009 at 5:15 pm

    Buried for lack of semantics, accessibility and only caring about the visual outcome.

  11. Dev The Web says:
    May 17, 2009 at 2:07 pm

    wow, just a great article for inspiration, thanks :)

  12. Will says:
    May 18, 2009 at 2:02 am

    Some cool tips, definately going to check out that elastic calender :)

  13. hybridanime49 says:
    May 19, 2009 at 10:31 am

    this is awesome! Great tips!

  14. Jake says:
    May 19, 2009 at 4:24 pm

    The best collection I’ve ever seen, definitely something I can use in the future. Nicely done!

  15. employee clockin clockout says:
    May 29, 2009 at 8:06 pm

    very useful tuts. i should try it if im free

  16. Yuliya says:
    May 30, 2009 at 3:12 pm

    Добавил в избранное адрес вашего сайта!

  17. drop lbs says:
    June 2, 2009 at 8:06 pm

    I must appreciate this collection because this is totally fresh and really can help designers for their projects.

  18. Clément says:
    June 19, 2009 at 2:30 am

    Very nice ! thanks.

Trackbacks/Pingbacks

  • popurls.com // popular today
  • Styling your Lists: 20+ Brilliant How to’s and Best Practices | Lively Web Tuts
  • Styling your Lists: 20+ Brilliant How to’s and Best Practices | DevSnippets
  • Styling your Lists: 20+ Brilliant How to’s and Best Practices
  • Styling your Lists: 20+ Brilliant How to’s and Best Practices
  • Styling your Lists: 20+ Brilliant How to’s and Best Practices | Design Newz
  • Styling your Lists: 20+ Brilliant How to’s and Best Practices | ArKane Scripts
  • How to look better without even trying | NxT LvL MrktnG :: Raising Your Brand To The NxT Lvl
  • Rebekah Renford [New Media] » Blog Archive » Running for President
  • » links for 2009-05-14
  • pligg.com
  • links for 2009-05-14 « My Weblog
  • Friday Focus 05/15/09: Institutional Impact | Devlounge
  • Links: Field Day 2009 Edition | Meryl.net
  • Social Media Saturday 5/16 | Dallas McLaughlin
  • Daily Links | AndySowards.com :: Professional Web Design, Development, Programming, Hacks, Downloads, Math and being a Web 2.0 Hipster?
  • links for 2009-05-20 - somaninn.net - Blog de Somaninn Prok - Liens - Web - Cambodge
  • Stylez vos listes à puces | taggle.org
  • Web Design Articles, Inspiration and News - May 2009 - Creattica Daily
  • 20 HTML list styling tutorials and articles | How to it
  • Web Design Articles, Inspiration and News - May 2009 | Webreweries.com
  • This Week’s Favourites – May 29th 2009
  • Friday Focus 05/15/09: Institutional Impact | rapid-DEV.net
  • Links of the Week 3 - Inspect Element
  • 80+ Must-Read Design Blogs to Enhance your Creativity and your Career | Creative Opera Design Blog: Creative Advice and Inspiration for Graphic Designers and Web Designers
  • 80+ блога, които всеки дизайнер трябва да чете

Sponsored Ads

ADVERTISE HERE

Sponsored Ads

DevSnippets Latest Articles

  • Using Illustrations in WebDesign: 30 Creative Examples
    Tags: Illustration, Inspiration, webdesign Jul/20/2010
  • Dark and Mysterious High Quality Desktop Wallpapers
    Tags: Dark, Wallpapers Jun/23/2010
  • 10+ Most Beautiful Island Photography on Earth
    Jun/16/2010
  • 35 High Definition iPad Wallpapers For A Great Experience
    Tags: Inpiration, Wallpapers Jun/09/2010
  • 30 Unique Logo Designs That Actually Say Something
    Tags: Branding, Inspiration, Logo Jun/02/2010
  • Creating 10 Most-Used Javascript Techniques Using Pure CSS Styling
    Tags: CSS, Tutorial May/31/2010
  • 40 Creative Advertisements With Unexpected Ideas
    Tags: Advertising, Inspiration May/27/2010
  • Getting Slim, Spicy, & WordPress-Ready with Top 10 jQuery Plugins
    Tags: jQuery, WordPress May/25/2010
  • Spicing Up Your Tumblr Experience: Beautiful Themes, Icons and Apps
    Tags: Templates, Tumblr May/19/2010
  • 20 NEW & FREE High Quality (X)HTML/CSS Templates
    Tags: CSS, Design, Template, Tutorial May/17/2010
More Articles →

Design Community News

  • Is It Worth Shifting To Photoshop CS5?

    SloDive
    Jul/04/2010
  • Free Wordpress Theme Vector Nature Template

    templates4all
    Jul/04/2010
  • Best jQuery plugins – June 2010

    Spider8411
    Jun/22/2010
  • Freebies: Vintage Mega Pack 10 Samples from Designious.com

    Doink
    Jun/22/2010
  • CSS3 Animations, the Power Back to CSS Part 1: Transitions

    Teylor Feliz
    Jun/22/2010
  • Create a Photo-Realistic Candle with Basic Photoshop Tools

    Frank
    Jun/22/2010
  • Credit cards and payment icon set

    icon sets
    Jun/22/2010
  • 40 Refreshing Nature Inspired Web Designs

    Brukhar
    Jun/22/2010
  • How to Create a Tumblr Theme (Code Structure)

    Dainis Graveris
    Jun/21/2010
  • The Simple Photoshop CS5 Cheat Sheet

    Frank
    Jun/21/2010
More News →

Our Friends

  • Graphic Design School

  • Designm.ag

Top ↑

Add a Snippet / Design News

© 2008-2010 DEVSNIPPETS | Made by Noura Yehia | Submit Snippet | About| Subscribe | Advertise
In partnership with (mt) Media Temple