Style Sheets
  Home arrow Style Sheets arrow Page 2 - Style Sheets for a Useful Links Page
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

Style Sheets for a Useful Links Page
By: Stephen Davies
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 4
    2007-10-24

    Table of Contents:
  • Style Sheets for a Useful Links Page
  • Style Sheet 1 - Unordered List type
  • Style Sheet 2 - Ordered List type
  • Tricks with Lists

  • 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&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th -1:00PM EST. Register Today!

    Style Sheets for a Useful Links Page - Style Sheet 1 - Unordered List type


    (Page 2 of 4 )

    First, a style sheet is needed to customize the headers being used. Here is an example of that. Of course, it can be edited according to the needs of any site. Remember that the <style> tags go inside the <HEAD> tags at the top of your web page and not in the main body <BODY>.

    <style type="text/css">

    <!--

    BODY { font-family:arial; background-color:ffffff; foreground-
    color:000000; font-size:11; }

      P { font-family:arial; color:000000; font-size:11; }

    A { text-decoration:none; color:0000cc; font-size:11; font-
    weight:bold; } A:visited { text-decoration:none; color:0000cc;
    font-size:11; }

    A:hover { text-decoration:underline; color:0066cc; font-size:12;
    font-weight:bold; }

      UL { list-style-type:circle; }

    H1 { text-decoration:underline; color:000000; font-size:14; font-
    weight:bold; }

      H2 { color:000000; font-size:12; font-weight:bold; }

      H3 { color:000000; font-size:11; font-weight:bold; } -->

    </style>

    The tags for the first list below are <UL> and </UL>. The <LI> tag is used to list the items inside the unordered list. There are many ways to use this, particularly when performing a laundry list of items on an a web page. For useful links, a laundry list is exactly what you may need.

    Here is a sample of an unordered list in HTML:

    <UL>

      <LI>Good Guys

      <LI>Bad Guys

      <LI>Nobody cares

    </UL>


    Here is the page resulting from the code:

    • Good Guys

    • Bad Guys

    • Nobody cares


    Do not forget to close the list with the </UL>. If a different shape to the bullet is needed, then there is an easy way to do that in the <UL> tag. The attributes tell the browser what shape should be displayed. For example:

    <UL type="square">

      <LI>PSP

      <LI>iPod

      <LI>iPhone

    </UL>

    The browser window will display the list as:

      • PSP

      • iPod

      • iPhone

    So changing the shape of the tag is very easy and quick. You can choose between several different shapes for the tag:


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

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

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

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

    Okay, so what if an image is needed rather than plain simple shapes? This is no problem. A simple change to the code and an image is placed:

    ul

    {

      list-style-image: url('shape.gif')

    }


    The same principle can apply to changing the text font attributes like this when it becomes necessary to mix both ordered and unordered lists:

    ul li { font-size:24px; }

    In that way, if both unordered and ordered lists are used on the web page, the style sheet will customize just one type of list. In the above example that is the unordered list.

    Here is another common example that can be customized easily:

    <html>

    <body>


      <h2>Example of A Nested List</h2>

      <ul>

        <li>Action</li>

        <li>Sci-Fi</li>

        <li>Comedy</li>

        <li>Fantasy</li>

        <li>Horror</li>

      <ul>

         <li>Halloween</li>

         <li>Hills have Eyes</li>

         <li>The Number 23</li>

         <li>The Howling</li>

      <ul>

         <li>The Howling 2</li>

         <li>The Howling 3</li>

      </ul>

        </li>

      </ul>

      </li>

      <li>Romance</li>

    </ul>

    </body>

    </html>

    Next I will cover the ordered type of list for a web page.

    More Style Sheets Articles
    More By Stephen Davies


     

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