Image not showing right in Firefox.

Discussion in 'CSS' started by fabs, Oct 26, 2009.

  1. #1
    Hello.
    I am working in a web site, the problem is that the images in firefox appear to be in a different position than IE.
    They are slightly moved toward the left side!
    I am a real noob when it cames to css and design in general can anyone please help me?
    If it can be helpful
    I can post the link of the page I have the problem with.
    Thank you in advance.
     
    fabs, Oct 26, 2009 IP
  2. MhW

    MhW Active Member

    Messages:
    370
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    85
    #2
    Can you post the HTML & CSS? :)

    Preferably, a live demo would be better for us to help you ;)
     
    MhW, Oct 26, 2009 IP
  3. fabs

    fabs Peon

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This is my CSS:
    @charset "utf-8";
    /* CSS Document */
    
    body
    {
    	background:url(../grf/sfondo.gif) repeat-x ;
    	background-color:#2b2b2c;
    
    }
    
    #menu
    {
    	background:url(../grf/menu.gif) no-repeat;
    	height:86px;
    }
    
    #body
    {
    	background:url(../grf/main_bg.gif) repeat-y;
    }
    
    #body_botton
    {
    	background: url(../grf/main_capbottom.gif) no-repeat top;
    	height:10px;
    }
    
    #color
    {
    	background-color:#CCCCCC;
    }
    
    /* FONT */
    
    .menu
    {
    	font-family:Verdana;
    	font-size:12px;
    	font-weight:bold;
    	color:#FFFFFF;
    	text-decoration:none;
    }
    
    .menu_select
    {
    	font-family:Verdana;
    	font-size:12px;
    	font-weight:bold;
    	color:#990000;
    	text-decoration:none;
    }
    
    .testo
    {
    	font-family:Verdana;
    	font-size:12px;
    	text-align:justify;
    	color:#666666;
    	padding:15px;
    	text-decoration:none;
    }
    
    .testo_select
    {
    	font-family:Verdana;
    	font-size:12px;
    	font-weight:bold;
    	color:#666666;
    	text-align:left;
    	text-decoration:none;
    }
    
    .piede
    {
    	font-family:Verdana;
    	font-size:12px;
    	color:#666666;
    	text-decoration:none;
    }
    
    .titolo
    {
    	font-family:Verdana;
    	font-size:18px;
    	color:#666666;
    	padding:15px;
    	text-decoration:none;
    }
    
    
    
    a:hover
    {
    	color:#990000;
    }
    
    /* DIV */
    
    div.pic
    {
    	float:left;
    	margin: 10px;
    	padding:0 0 0px 0;
        background: url(../grf/shadow2.png) no-repeat bottom  right;
    
    }
    
    div.pic img
    {
    	display: block;
    	border: 1px solid;
        border-color: #CCC #CCC #AAA #CCC;
        padding: 2px;
    	background: #f6f6f6;
       
    }
    
    Code (markup):
    And these are the pages that are not showing the pictures in firefox like IE:

    http://www.mmcarline.it/tariffe-autonoleggio.html
    http://www.mmcarline.it/noleggio-auto-portfolio.html
    Code (markup):
    Thank you for the help!
     
    fabs, Oct 27, 2009 IP
  4. MhW

    MhW Active Member

    Messages:
    370
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    85
    #4
    Just add align="center" to the opening <td> tag, before the image. As per usual IE wouldn't load for me (kept "not responding" :rolleyes:), so I've only tested it on firefox.
     
    MhW, Oct 27, 2009 IP
  5. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #5
    As always, Firefox is displaying what you wrote while IE makes things up as it goes along. The space in the td you created is wider than your image size but IE is either manipulating the image or adding margins to make it fit; a definite no-no.
     
    drhowarddrfine, Oct 27, 2009 IP
  6. fabs

    fabs Peon

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thank you very much mate It worked!
     
    fabs, Oct 28, 2009 IP
  7. adwebtiser

    adwebtiser Peon

    Messages:
    95
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    you are using &nbsp; for positioning your image which is why your image probably will be positioned differently in all browsers, just give the td padding values and it should work on all browsers
     
    adwebtiser, Oct 28, 2009 IP
  8. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #8
    The align attribute was deprecated 10 years ago. You shouldn't use it.
     
    drhowarddrfine, Oct 28, 2009 IP