Style Sheets
  Home arrow Style Sheets arrow Page 4 - CSS: Top Secret Classification
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 
VeriSign Whitepapers 
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: Top Secret Classification
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2008-04-14

    Table of Contents:
  • CSS: Top Secret Classification
  • Floating Elements
  • Floating Text for a Fairy Tale Look
  • Creating a Menu

  • 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
     
    Iron Speed
     
    ADVERTISEMENT

    At the virtual BlackBerry Technical Seminar 2008, you can ask your development questions directly of Research In Motion® (RIM) experts, and take advantage of learning opportunities designed uniquely for BlackBerry solution developers. Register Today!

    CSS: Top Secret Classification - Creating a Menu


    (Page 4 of 4 )

    In this example we create a menu bar (with nifty rollover action) using float:


    <html>

    <head>

    <style type="text/css">

    ul

    {

    float:left;

    width:100%;

    padding:0;

    margin:0;

    list-style-type:none;

    }

    a

    {

    float:left;

    width:6em;

    text-decoration:none;

    color:white;

    background-color:black;

    padding:0.2em 0.6em;

    border-right:1px solid white;

    }

    a:hover {background-color:blue}

    li {display:inline}

    </style>

    </head>

    <body>

    <ul>

    <li><a href="http://www.devshed.com">Home</a></li>

    <li><a href="http://www.devshed.com">Diets</a></li>

    <li><a href="http://www.devshed.com">Equipment</a></li>

    <li><a href="http://www.devshed.com">About Us</a></li>

    </ul>

    <p>

    Welcome to Jabba the Hut's Weight Lose Emporium! Click a link above to see what our site has to offer.

    </p>

    </body>

    </html>

    And lastly, you can use float to create a web page:

    Using Float to Create a Web Page

    Here is how you create a web page with float:


    <html>

    <head>

    <style type="text/css">

    div.container

    {

    width:100%;

    margin:0px;

    border:1px solid yellow;

    line-height:150%;

    }

    div.header,div.footer

    {

    padding:0.5em;

    color:white;

    background-color:black;

    clear:left;

    }

    h1.header

    {

    padding:0;

    margin:0;

    }

    div.left

    {

    float:left;

    width:160px;

    margin:0;

    padding:1em;

    }

    div.content

    {

    margin-left:190px;

    border-left:1px solid yellow;

    padding:1em;

    }

    </style>

    </head>

    <body>

    <div class="container">

    <div class="header"><h1 class="header">Jabba's Weightloss Emporium</h1></div>

    <div class="left"><p>Lose your weight instantly with Jabba's patented weight-loss plan!</p></div>

    <div class="content">

    <h3>Free Weight Loss Tools</h3>

    <p>At Jabba's Weightloss Emporium you will find all the best weight-loss techniques on the web: From The All-You-Can-Eat Bacon Diet to the Eating Big Green Slugs Life Change</p>

    <p>No One does it like Jabba!</p></div>

    <div class="footer">Jabba pwns you!</div>

    </div>

    </body>

    </html>

    Well that's it for this article. In the next tutorial we will continue or discussion of the classification property. So drop by often!

    Till then...


    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.

       · This article was great. It gave me the information I needed to know and an clear...
       · Thanks for stopping by to read my article. In this issue I discuss such topics as...
     

    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


    Iron Speed





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