Home arrow Web Standards arrow Page 9 - Get Down With Markup
WEB STANDARDS

Get Down With Markup


Lists may seem to be mundane items, but many pages on the Web include at least one. The way you choose to mark up these lists can make a big difference. This article explores several the advantages and disadvantages of several common markup methods. It is taken from chapter one of Dan Cederholm's book Web Standards Solutions: The Markup and Style Handbook (Apress, 2004; ISBN: 1590593812).

Author Info:
By: Apress Publishing
Rating: 3 stars3 stars3 stars3 stars3 stars / 11
February 15, 2005
TABLE OF CONTENTS:
  1. · Get Down With Markup
  2. · Quiz time
  3. · Method B: The bullet that bites
  4. · Method C: Getting closer
  5. · Method D: Wrapper’s delight
  6. · Extra credit
  7. · Getting fancier with custom bullets
  8. · Lists that navigate
  9. · Mini-tab shapes

print this article
SEARCH DEVARTICLES

Get Down With Markup - Mini-tab shapes
(Page 9 of 9 )

For something a little different than your average, boxy CSS border, with a few slight modifications we can add fun shapes to the mix to create some interesting navigational effects.

We can use the same unordered list, building on similar CSS from the previous mini-tab example:

  #minitabs {
    margin: 0;
    padding: 0 0 20px 10px;
    border-bottom: 1px solid #9FB1BC;
    }
    #minitabs li {
    margin: 0;
    padding: 0;
    display: inline;
    list-style-type: none;
    }
  #minitabs a {
    float: left;
    line-height: 14px;
    font-weight: bold;
    padding: 0 12px 6px 12px;
    text-decoration: none;
    color: #708491;
    }
  #minitabs a.active, #minitabs a:hover {
    color: #000;
    background: url(tab_pyra.gif) no-repeat bottom center;
    }

This CSS will probably look similar to the previous example. The main difference here is the absence of a border-bottom that created the 4-pixel-tall tab and the addition of a single background-image set to sit bottom center for all hover and selected states (see Figure 1-8).

 

Figure 1-8.  A mini-tab navigation bar with shaped background images

The trick here is to choose an image that is narrow enough to fit under your smallest navigation item. This ensures you’ll only need one single image to use for highlighting all of your navigational links, regardless of varying character widths. There are, of course, unlimited possibilities in regards to the shapes you could use on your own projects (see Figure 1-9).

 

                

Figure 1-9.  A few other various shape possibilities

For source code and working examples of these mini-tabs, see www.simplebits.com/tips/. And for more creative ways to style lists, check out Mark Newhouse’s “Taming Lists article” at A List Apart magazine (www.alistapart.com/stories/taminglists/).

This chapter is from Web Standards Solutions: The Markup and Style Handbook by Dan Cederhold (Apress, 2004, ISBN:  1590593812). Check it out at your favorite bookstore today. Buy this book now.

 


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
WEB STANDARDS ARTICLES

- Mozilla Popcorn Maker 1.0 Makes Videos More...
- Completing a Configuration for Chrome and a ...
- Getting Connected with Firefox and Chrome
- Configuring Servers and Databases with Chrome
- Configuring Firefox for Chrome and a Server
- Designing the Elements of a Web Page
- Matching div heights with CSS and JavaScript
- Forms
- Get Down With Markup
- If I Said You Had a Beautiful Body...
- Web Standards in Dreamweaver Part 3
- Web Standards in Dreamweaver, Part 2
- Web Forms
- Making Lists Using XHTML
- Web Standards in Dreamweaver, Part 1

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials