www.webdeveloper.com
Results 1 to 3 of 3

Thread: Why it moves in Mozilla navigation to the right?

  1. #1
    Join Date
    Sep 2005
    Posts
    1,630

    Question Why it moves in Mozilla navigation to the right?

    I have seen that in IE it works without problem navigation.

    In Mozilla is moved to the right.

    How can I move items to the left?

    Need help

    Code for navigation is the following:
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
    >

    <
    html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <
    head>
      <
    title></title>

      <
    style type="text/css">
      
    /*<![CDATA[*/
      #navigation ul {
            
    list-style:none;
            
    margin:0px 0px 25px 0px;
        }

        
    #navigation li {
            
    padding:3px 0px;
            
    border-bottom:1px solid #e5e5e5;
        
    }

        
    #navigation li a {
            
    color:#666;
        
    }

        
    #navigation img {
            
    margin-right:8px;
        }
      
    /*]]>*/
      
    </style>
    </
    head>

    <
    body>
    <
    div id="navigation">
    <
    h6>Main navigation</h6>
    <
    ul>
    <
    li><img alt="Product1" src="image1.gif"><a href="">Product1</a></li>
    <
    li><img alt="Product2" src="image2.gif"><a href="">Product2</a></li>
    <
    li><img alt="Product3" src="image3.gif"><a href="">IProduct3</a></li>
    </
    ul>
    </
    div>
    </
    body

  2. #2
    Join Date
    Mar 2006
    Location
    Newcastle NSW Australia
    Posts
    4,033
    Each browser uses different default values of margins and/or padding on various elements, and lists really show up those variations. If you zero out the defaults using the universal selector at the start of your css, then it looks the same in all browsers.
    Code:
    * {
    	margin: 0;
    	padding: 0;
    }

  3. #3
    Join Date
    Sep 2005
    Posts
    1,630
    thank you,it works now perfectly

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles