Image not positioning in Firefox, works in Chrome?

Discussion in 'CSS' started by le007, Dec 5, 2011.

  1. #1
    The top left logo image is placed correctly in Chrome but it doesn't work in Firefox. Can somebody please fix it?

    
    <div id="topbar">
    <img src="pix1.jpg" class="imagebar">
    
    Code (markup):
    CSS code:
    * {
    margin: 0;
    padding: 0;
    }
    img {
    border: 0;
    }
    
    ul, li {
    list-style: square;
    }
    
    
    html, body {
    height: 100%;
    text-align: center; 
    }
    
    
    
    
    #topbar {
    margin-top: 30px;
    height: 40px;
    width: 100%;
    border-style:solid;
    border-color:white;
    border-width: 1px;
    border-left-width: 0px;
    background-color: black;
    }
    
    
    #details {
    opacity:1;
    background-color: black;
    color:white;
    width: 800px;
    margin: 0 auto; 
    margin-top: 100px;
    filter: alpha(opacity=60); 
    border-style:solid;
    border-color:white;
    border-width: 1px;
    font-family: tahoma;
    font-size: 11px;
    text-decoration: none;
    }
    
    .toptable {
    text-align: center;
    }
    
    
    .imagebar {
    position: absolute;
    margin-top:-15px;
    margin-left:40px;
    border-style:solid;
    border-color:white;
    border-width: 1px;
    
    }
    
    Code (markup):
    Problem solved.
    I changed the following code:
    .imagebar {
    position: absolute;
    top:15px;
    left:40px;
    border-style:solid;
    border-color:white;
    border-width: 1px;

    }
     
    Last edited: Dec 5, 2011
    le007, Dec 5, 2011 IP
  2. fhk_kz5

    fhk_kz5 Member

    Messages:
    191
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #2
    positioning absolute wont help you.Try zooming out on your browser and then you will find what i am trying to say.
     
    fhk_kz5, Dec 7, 2011 IP