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  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
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


    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

    - Building Rounded Corners with CSS3`s -webkit...
    - Using the Custom -moz-border-radius Property...
    - Using CSS3`s Border-Radius Property to Build...
    - Adding Semantic Meaning to Styled Code Block...
    - Styling Code blocks with CSS: Using pre HTML...
    - Building Rounded Corners with CSS3
    - Finishing a Casual Navigation Bar with CSS S...
    - Defining a Navigation Bar`s Hover State with...
    - Styling a Blog`s Links Bar with CSS Sprites
    - Creating an Artistic Blog Header with CSS Sp...
    - Defining the Active State of Menu Sections f...
    - Styling the Hover State of a CSS Sprite-Base...
    - Building CSS Sprite-Based Navigation Bars
    - Creating Framed Pictures with CSS
    - Using a CSS Shading Effect to Decorate Images







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek