From: howa on
Hi,

I have a DIV, in which the width is a relative width, I want in
Firefox, when I `zoom in`, the image will be enlarged as the
background, it is possible?

E.g.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style>
html {font-size:13px}

#test {
width:30em;
height:400px;
background: #ff0000 url(http://farm1.static.flickr.com/
162/416152814_8f7ffb4bb1.jpg) top left no-repeat;
}

</style>
</head>
<body>

<div id="test">&nbsp;</div>

</body>
</html>



Thanks.
From: dorayme on
In article
<91955636-e34b-4df5-a35d-60212c3e1833(a)u36g2000prf.googlegroups.com>,
howa <howachen(a)gmail.com> wrote:

> Hi,
>
> I have a DIV, in which the width is a relative width, I want in
> Firefox, when I `zoom in`, the image will be enlarged as the
> background, it is possible?
>
> E.g.

No, a background image is a fixed size, the natural 100% size of it as
(mostly) made in an image software program. And the only choices you
have for the display of it as a background is to repeat it in the
horizontal or the vertical or both directions.

If you want to give an appearance of an image enlarging to fill the bg
of an element, you have to use an image that looks natural when repeated

If you want an image to enlarge with the size of an element, you can put
the image in the flow of the document in the usual way as src="" and em
or percentage size it depending on quite what is important to you.

--
dorayme