SunQuest
 
       Style Sheets
  Home arrow Style Sheets arrow Page 4 - CSS: Margins and Padding
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: Margins and Padding
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2008-03-31

    Table of Contents:
  • CSS: Margins and Padding
  • Top Margin Using Centimeters and Percentage
  • Using Padding in CSS
  • Working with Lists in CSS
  • How to Set an Image as a List Marker

  • 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

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    CSS: Margins and Padding - Working with Lists in CSS


    (Page 4 of 5 )

    There are several different ways to manipulate lists in CSS: list-item markers, list styles, list-item images, setting markers, and placing markers among them.

    Working with List Item Markers in CSS (Unordered Lists)

    List item markers are those thingamabobs that sit next to data. Or, in less confusing terms, bullets. There are several in CSS and in the following example we will learn how to use them:


    <html>

    <head>

    <style type="text/css">

    ul.circle {list-style-type: disc}

    ul.clearcircle {list-style-type: circle}

    ul.square {list-style-type: square}

    ul.none {list-style-type: none}

    </style>

    </head>

    <body>

    <p> Here is a list of Lame Super Heroes:</P>

    <ul class="circle">

    <li>Aquaman</li>

    <li>Namor</li>

    <li>Namora</li>

    </ul>

    <ul class="clearcircle">

    <li>Reed Richards</li>

    <li>Captain America</li>

    <li>Cannonball</li>

    </ul>

    <ul class="square">

    <li>She-Hulk</li>

    <li>She-Thing</li>

    <li>Wasp</li>

    </ul>

    <ul class="none">

    <li>Plastic Man</li>

    <li>Super Pro</li>

    <li>Apache Chief</li>

    </ul>

    </body>

    </html>

    Working with Item Markers in Ordered Lists

    Working with item markers in ordered lists is very similar to the way you work with item markers in unordered lists:


    <html>

    <head>

    <style type="text/css">

    ol.numeric {list-style-type: decimal}

    ol.lowerroman {list-style-type: lower-roman}

    ol.upperroman {list-style-type: upper-roman}

    ol.loweralpha {list-style-type: lower-alpha}

    ol.upperalpha {list-style-type: upper-alpha}

    </style>

    </head>

    <p>List of Lame Super Villains</p>

    <body>

    <ol class="numeric">

    <li>My Underwear Is Too Tight Man</li>

    <li>Evil Laugher</li>

    <li>Guy with an Enormous Brain</li>

    </ol>

    <ol class="lowerroman">

    <li>Doctor Doom</li>

    <li>Kang</li>

    <li>Sandman</li>

    </ol>

    <ol class="upperroman">

    <li>Doctor Octopus</li>

    <li>Rhino</li>

    <li>The Blob</li>

    </ol>

    <ol class="loweralpha">

    <li>Bill Clinton</li>

    <li>Hillary Clinton</li>

    <li>Red Skull</li>

    </ol>

    <ol class="upperalpha">

    <li>Super Skrull</li>

    <li>Toad</li>

    <li>The Magnus</li>

    </ol>

    </body>

    </html>

    More Style Sheets Articles
    More By James Payne


       · Thanks for stopping by to read my article on Margins and Padding in CSS. In addition...
     

    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 2 hosted by Hostway