Style Sheets
  Home arrow Style Sheets arrow Adjusting Padding and Margins on Floating ...
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

Adjusting Padding and Margins on Floating Lists with CSS
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-12-17

    Table of Contents:
  • Adjusting Padding and Margins on Floating Lists with CSS
  • A review of our cross-browser approach
  • Assigning padding, margins and widths
  • Controlling the indentation of bullets

  • 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


    Adjusting Padding and Margins on Floating Lists with CSS


    (Page 1 of 4 )

    Welcome to the third part of a four-part series that shows you how to build side-by-side floating HTML lists with CSS. In this part, you'll learn how to make your lists look more professional by adjusting their padding and margin values. As always, we'll illustrate our explanations with plenty of code examples.

    Introduction

    Undeniably, HTML lists are an important part of modern web design. Nowadays they’re not only used for displaying bulleted items on a web document, but for wrapping several links into a logical group, in this way increasing their accessibility.

    In either case, including vertical and horizontal lists into a web page is a straightforward process that can be mastered very quickly, and certainly without major headaches. However, things can get more complicated when it comes to building lists that need to be floated to the left or right sides of a web document, since they often require implementing a number of CSS approaches that, in certain cases, are not completely supported by some modern browsers.

    But, if you think that creating floating HTML lists with CSS is a daunting task, you might be wrong. In this series of articles, you’ll be provided with a friendly guide to building these handy lists by using only a simple combination of CSS styles and structural markup.

    Now that you’re well aware of the subject of this series, it’s time to refresh your memory of the topics I covered in the last article. In that specific tutorial, I discussed how to create a pair of floating HTML lists with CSS which were displayed consistently by many modern browsers, including Internet Explorer.

    Basically, the approach I used to build the aforementioned list relied heavily on the utilization of the “float” CSS property, which helpfully floated the lists to the respective left and right sides of a web document.

    However, I must admit that the visual appearance of these floating lists was rather primitive, thus in this third article of the series, I’ll be adjusting certain aspects of them, such as their respective padding and margin values, in this way improving generally their look and feel.

    Are you ready to learn the full details of this styling process? Great, let’s begin now!

    More Style Sheets Articles
    More By Alejandro Gervasio


       · This third article of the series demonstrates how simple is to adjust certain...
       · How do you handle the expanding box problem with these floats?
       · In most cases, overflow: hidden; will fix up the bug, but it depends on the content...
     

    STYLE SHEETS ARTICLES

    - Image Replacement CSS Techniques
    - Using BlueTrip`s Success, Notice and Error C...
    - More Uses for the Thin and Caps CSS Classes ...
    - Styling Definition Lists with the BlueTrip C...
    - Styling Unordered and Ordered HTML Lists wit...
    - Using the BlueTrip CSS Framework`s Thin and ...
    - Adding Borders to Web Page Columns with Blue...
    - Introducing the BlueTrip CSS Framework
    - Using a Background Grid to Assist Web Page L...
    - Extending the Rule Of Thirds for Web Page La...
    - A Two-Column Web Page Layout Based on the Ru...
    - Using the Rule Of Thirds for Web Page Layout
    - Swapping Columns Using the Divine Ratio for ...
    - Using the Golden Ratio in Liquid Web Page De...
    - Fundamental Design Principles for Web Page L...







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