Forum Moderators: not2easy

Message Too Old, No Replies

FF 3 background image appearing larger than IE and Chrome

FF bug related to bg images

         

LordMatt

6:02 am on May 29, 2009 (gmt 0)

10+ Year Member



I have a 314x518 imgae that I am using as the BG in CSS.
While IE and Chrome are dispaying the BG image with correct dimension, FF3 stretches the imgage to 347x640.

I am unable to understand this behaviour.
I even moved the BG image to an img tag and explicitly set the image width and height in the img tag attribute but even then the image just expanded to 347x6~~

Can anyone explain this weird FF behaviour and any fixes.

<code>
*{padding:0;margin:0;}
#weatherNew {position:relative;font-size:10px;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;width:314px;height:593px;overflow:hidden;background:#fff url(iphone-interface-314x588.jpg) no-repeat 0 0;}
#weatherNew a{text-decoration:none;}
#weatherNew ul{list-style-position:inside;}
#weatherNew .clearAll{clear:both;}
</code>

the image is uploaded here:

<snip>

[edited by: swa66 at 6:28 pm (utc) on May 29, 2009]
[edit reason] no personal URLs allowed please see ToS and forum charter [/edit]

birdbrain

11:43 am on May 29, 2009 (gmt 0)



Hi there LordMatt,

and a warm welcome to these forums. ;)

I tested your image with this code...


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">

<title></title>

<style type="text/css">

#weatherNew {
position:relative;
width:314px;
height:593px;
font-family:'lucida grande',tahoma,verdana,arial,sans-serif;
font-size:10px;
overflow:hidden;
background:#fff url(iphone-interface-314x588.jpg) no-repeat 0 0;
}
</style>

</head>
<body>

<div id="weatherNew">

</div>

</body>
</html>


...and could discern no problem, whatsoever.

birdbrain

LordMatt

12:11 pm on May 29, 2009 (gmt 0)

10+ Year Member



Thanks for the replies friends. I have resolved the issue. It was due to some code differences in the svn branch I was working on. This is not a bug in FF.

Please consider this answered.