SunQuest
 
       Style Sheets
  Home arrow Style Sheets arrow CSS: Continuing the Clarification of CSS C...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
STYLE SHEETS

CSS: Continuing the Clarification of CSS Classification
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2008-05-12

    Table of Contents:
  • CSS: Continuing the Clarification of CSS Classification
  • Absolutely Relatively Speaking
  • Changing the Way You Curse
  • Attack of the Invisible Man

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    CSS: Continuing the Clarification of CSS Classification


    (Page 1 of 4 )

    In our last CSS tutorial, published about a month ago, we covered some of the Classification properties, which allow you to display elements, position them, choose where they will appear, control their visibility, and a whole lot more. In this article we will finish the discussion.

    Creating a Vertical Menu

    In the last episode we learned how to make a horizontal menu with some CSS style. Here we will learn to create a vertical menu. First we will create the .css file:


    <style type="text/css">

    #vmenu {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 100%;
    width: 150px;
    padding: 0px;
    margin: 0px;
    }

    #vmenu ul {
    list-style: none;
    margin: 0px;
    padding: 0px;
    border: none;
    }
    #vmenu ul li {
    margin: 0px;
    padding: 0px;
    }
    #vmenu ul li a {
    font-size: 80%;
    display: block;
    border-bottom: 1px dashed #C39C4E;
    padding: 5px 0px 2px 4px;
    text-decoration: none;
    color: #666666;
    width:160px;
    }

    #vmenu ul li a:hover, #vmenu ul li a:focus {
    color: #000000;
    background-color: #eeeeee;
    }

    </style>

    Next we will create the HTML:


    <div id="vmenu">
    <ul>
    <li><a href="#" tabindex="1">Home</a></li>
    <li><a href="#" tabindex="2">Content</a></li>
    <li><a href="#" tabindex="3">Pictures</a></li>
    <li><a href="#" tabindex="4">Games</a></li>
    <li><a href="#" tabindex="5">Contact Us</a></li>
    <li><a href="#" tabindex="6">Links</a></li>
    </ul>
    </div>

    You can also design the menu in one file, like so:


    <html>

    <head>

    <title>Your Website</title>

    <style type="text/css">

    body {

    background-color: #D5D6AE;

    }

    ul.vmenu {

    padding: 0;

    margin: 0;

    list-style: none;

    font-family: Verdana, Arial, Helvetica, sans-serif;

    font-size: 0.8em;

    border-bottom: 1px solid #6F3E04;

    width: 100px;

    background-color: #EEEEDC;

    }

    ul.vmenu li {

    border-top: 1px solid #6F3E04;

    border-left: 1px solid #6F3E04;

    border-right: 1px solid #6F3E04;

    }

    ul.vmenu li a {

    text-decoration: none;

    display: block;

    width: 78px;

    color: #333333;

    font-weight: bold;

    padding: 2px 10px;

    }

    ul.vmenu li a:hover {

    background-color: #B9BB79;

    color: #EEEEDC;

    }

    </style>

    </head>

    <body>

    <ul class="vmenumenu">

    <li><a href="home.html">Home</a></li>

    <li><a href="images.html">Images</a></li>

    <li><a href="aboutus.html">About Us</a></li>

    <li><a href="contact.html">Contact</a></li>

    </ul>

    </body>

    </html>

    More Style Sheets Articles
    More By James Payne


     

    STYLE SHEETS ARTICLES

    - Creating Gradients for Individual Containers...
    - Creating Gradients for Web Page Headers with...
    - SEO Scrolling Frames Problem Solved
    - Building Cross-Browser Background Effects wi...
    - CSS: Pseudo
    - Using PNG Images to Build Background Effects
    - CSS: Continuing the Clarification of CSS Cla...
    - CSS: Top Secret Classification
    - CSS: Dimensions
    - CSS: Margins and Padding
    - CSS: Crossing the Border
    - CSS: Text, Fonts, and Tables
    - CSS: Working with Text
    - CSS: Backgrounds
    - CSS for the Newbie







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway