DevSnippets
Subscribe by RSS
  • DevSnippets FEED
  • |
  • User Link Feed
  • |
  • Code Snippets
  • Home
  • Contact Us
  • About DevSnippets
  • Archives
  • Subscribe
  • Follow Us
  • CSS
  • jQuery
  • Menus
  • Layouts
  • WordPress
  • javascript
  • IE Hacks
  • Mootools
  • Prototype
  • WordPress Hacks
  • more →

Results

In {Article/ CSS} -13th May- {50 Comments} Styling your Lists: 20+ Brilliant How to’s and Best Practices

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

What others said...

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+ блога, които всеки дизайнер трябва да чете
  • Tabs (27)
  • Forms (127)
  • Menu (59)
  • Tables (9)
  • Navigation (35)
  • ToolTips (22)
  • LightBox (39)
  • Calendar (9)
  • AutoComplete (13)
  • Accordion (15)
  • Sliders (38)
  • Gallery (80)
  • Image Effects (55)
  • Date & Time (15)
  • Charts (16)
  • Carousel (12)
  • Tag Clouds (1)
  • Links (1)
  • Layouts (75)
  • IE Hacks (19)
  • Image Sprites (6)
  • Sliding Door (7)
  • Techniques (81)
  • Image Effects (14)
  • Font Styles (22)
  • Positioning (5)
  • Menus (40)
  • Rounded Corner (19)
  • Tools (1)
  • Drop Shadows (1)
  • CSSFrameworks (2)
  • Mootools (83)
  • jQuery (317)
  • Prototype (22)
  • Scriptaculous (10)
  • Javascript (123)
  • javascript Framework (1)
  • LOG IN:

    Not a member? JOIN NOW!
     Username                   Password
    Remember me Recover password

Add a Snippet / Design News

Feb/09/2010

40 Examples of Cool Javascript

jenny
ToolTipsjQuery
JavaScript has blossomed so rightly. Since then, there are jquery, Mootools , Scriptallicious, Prototype etc..which ...
Feb/08/2010

Expandable Drop Down Ticker

ddrive
SlidersjQuery
A jQuery ticker script that can be viewed both sequentially and simultaneously, via drop down ...
Feb/08/2010

30 The Best jQuery plugins inspired...

psdeluxe
jQuery
The plugins in this article will allow you to insert in to your website very ...
Feb/08/2010

Drop-In Modals with CSS3

gardasee
Layouts
For those using WebKit based browsers (Safari and Chrome), CSS3 effects and properties can help ...
Feb/08/2010

Dynamic headings for the blog title

Delicia
WordPress
An article presenting a little snippet which allows to dynamically asign h1/h2 tags to ...
Feb/08/2010

10 Amazing Jquery Navigation Menus

GraphicDesignBay
NavigationWordPress Layouts
If you want to create a navigation menu, that really stands out of the crowd, ...
Feb/08/2010

10 wordpress hacks & tricks that I...

Fatma
WordPressWordPress Hacks
There are many wordpress tweaks , hacks and tricks that we see everyday here are ...
Feb/08/2010

Awesome CSS3 & jQuery Slide Out...

Mary Lou
Rounded Corner
Here is an awesome little slide out button. The inspiration for that button came from ...
Feb/08/2010

Free Wordpress Theme Brick Wall

DynamicWP
WordPressWordPress Layouts
Today we released our new free wordpress theme "Brick Wall". A customized theme based Black ...
Feb/08/2010

How to add an option to Hybrid News...

Elio
WordPressWordPress Hacks
Tutorial covering the process of adding an option to the Hybrid News theme settings page.
More Code Snippets →

Design Community News

  • 30 Very Catchy Typography Design Concepts in Print Ads

    30 Very Catchy Typography Design Concepts in Print Ads
  • 9 Funniest JavaScript Effects

    9 Funniest JavaScript Effects
  • Quick photo editing – Online and FREE

    Quick photo editing – Online and FREE
  • Bring your websites alive: From Boring to Exciting!

    Bring your websites alive: From Boring to Exciting!
  • 20 Fonts Ideal For The iPhone And Other Mobile Screens

    20 Fonts Ideal For The iPhone And Other Mobile Screens
  • 9 Best iPhone Apps For iPhotographers

    9 Best iPhone Apps For iPhotographers
  • 34 Ways to bring Traffic to your Website or Blog

    34 Ways to bring Traffic to your Website or Blog
  • Photoshop tutorial. Chinese cookie

    Photoshop tutorial. Chinese cookie
  • History of 20 EPL Club Logos of 2010

    History of 20 EPL Club Logos of 2010
  • 30 Free and Fresh iPad Wallpapers

    30 Free and Fresh iPad Wallpapers
  • 100 Most Funny and Creative Advertisement Designs

    100 Most Funny and Creative Advertisement Designs
  • 50 Fantastic Examples Of Origami Art Work

    50 Fantastic Examples Of Origami Art Work
  • 3d Glossy Green Orbs Icons – Arrows

    3d Glossy Green Orbs Icons – Arrows
  • Learn How To Create A Clean Layout In Photoshop

    Learn How To Create A Clean Layout In Photoshop
More News →

Top ↑

Add a Snippet / Design News

Top Submitters

    • dnamic (135)
    • chosen (113)
    • Martin Ivanov (85)
    • ravindra (61)
    • tutorialfeed (54)
    • Noura Yehia (41)
    • Spider8411 (41)
    • dicky83 (39)
    • psdeluxe (32)
    • woork (31)
    • ddrive (27)
    • Oxp (24)
    • kailoon (23)
    • tech (23)
    • Mert TOL (22)
    • satbir (21)
    • vladocar (18)
    • impresslab (17)
    • spicywebdesign (17)
    • prlamnguyen (17)
    • Shazza (16)
  • © 2008-2009 DEVSNIPPETS | Made by Noura Yehia | Add Snippet | About| Subscribe
    In partnership with (mt) Media Temple