Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member animatorsathish's Avatar
    Join Date
    Apr 2006
    Posts
    7
    Member #
    13010
    Hi,
    I am facing a problem while using css. pls look at the following code.
    <html>
    <head>
    <style type="text/css">
    html,body{
    margin:0;
    padding:0;
    }
    ul{margin:0;}
    </style>
    </head>
    <body>
    <ul>
    <li>Margin problem</li>
    </ul>
    </body>
    </html>



    Problem: when i set margin=0 for the 'li' item its removed when i view from Internet Explorer. But still there is some left margin on other browsers like Opera and firefox. How do i overcome this?
    Can anybody help me?

    Thanks in advance.
    Sathish.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    I've always used: margin:0px auto;

    Like this:

    <html>
    <head>
    <style type="text/css">
    html,body{
    margin:0px auto;
    }

    </style>
    </head>
    <body>
    <ul>
    <li>Margin problem</li>
    </ul>
    </body>
    </html>


    And I only think you need to do it once (in the html,body )

    Not sure if that helps you or not.



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:29 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com