Zeronese, Inc.
Home
Help & Support
Contact Us
Website Templates Web Hosting Reseller Hosting Web Design Web Directory Article Directory Webmaster Tools Make Money Marketing SEO
  economic web hosting Browse Webmasters Article Directory  
 


Log in - Submit Your Article Here

Browse Article Directory

Advice and Reviews Articles Advice and Reviews
Domain Names Articles Domain Names
ecommerce Articles ecommerce
HTML and CSS Articles HTML and CSS
Internet Search Engines Related Articles Internet Search Engines Related
Make Money Online Articles Make Money Online
Other Web Subjects Articles Other Web Subjects
Web Design Articles Web Design
Web Design Software Articles Web Design Software
Web Development Articles Web Development
Web Hosting Articles Web Hosting
web publishing content Articles web publishing content
Website Marketing Articles Website Marketing
web content article categories View all Categories

Article Directory News Letter

 


 
     

 


  By: Christian Watson  
 

I've always been taken with the way that the BBC styles their A-Z index using a simple list and CSS. However, because they use pixels to set the dimensions of each list item, the design breaks when you increase the text size.

It's always been important to me not to break the browser's ability to resize text and so I thought I'd have a go at creating an A to Z index along the same lines that doesn't break when you resize your text.

The code is actually pretty straight forward. Here's the CSS first:


#azindex {
background: #75B9D0;
float: left;
margin: 5px 0 20px 10px;
padding: 0px 5px 15px 5px;
width: 520px;
}


* html #azindex {
padding: 5px 5px 10px 5px;
width: 490px;
}


#index {
font: bold 100% Verdana, Helvetica, sans-serif;
margin: 0;
padding: 0;
}


#index li {
float: left;
height: 2em;
list-style-type: none;
margin: 0.65em 0.3em;
padding: 0;
width: 3em;
}


* html #index li {
margin: 0.2em 0.2em;
}


#index a:link, #index a:visited {
background: #fff;
color: navy;
display: block;
height: 2em;
padding: 0.75em 0 0 0;
text-align: center;
text-decoration: none;
width: 3em;
}


#index a:hover {
background: #93D1E4;
color: #fff;
text-decoration: underline;
}

And here's the HTML:


< div id="azindex">

< a href ="#a"> A
< a href ="#b"> B
< a href ="#c"> C
< a href ="#"> etc
< a href ="#z"> Z




And there you have it - an easy way to add a nice design to what would otherwise have been a boring list. You can find a link to an example in the resource box below.

Christian Watson is a web designer. You can find an example of the above technique on his blog
http://www.smileycat.com/miaow/archives/style-az-list.php

Article Source: zeronese.net article directory.
Article Word Count Appx. : 237
Article Category: Articles » HTML-and-CSS » CSS
See all articles by Christian Watson


Note: Copying of article contents in whole is permitted provided that article body and article author by-lines are kept intact and unchanged. Hyperlinks and/or URLs including article source link provided by authors and/or zeronese must remain active at all times.

     
The views and opinions of authors expressed on Zeronese Article Directory web sites do not necessarily state or reflect those of the Zeronese.net .


Feedback News Letter Site Map Terms and Policies About Us All copyrights reserved 2008 Zeronese, Inc.©