473,395 Members | 1,762 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

CSS background: auto zoom

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.
Jun 27 '08 #1
1 8809
In article
<91**********************************@u36g2000prf. googlegroups.com>,
howa <ho******@gmail.comwrote:
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
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Francis Parsons | last post by:
Hi! I'm doubtful there's a workaround for this problem, but it's worth a shot. I'm using IE's (css) "zoom" property to zoom the body of a document (in conjunction with persistance so the...
1
by: Glabbeek | last post by:
I'm changing the layout of my site. Instead of using tables, I will use DIVs. It's working fine, except for 1 thing: In IE6 some DIVs are not the correct width. Mozilla and Opera are showing the...
1
by: Christophe Candas | last post by:
Hye, You will find here under a script which will load a picture in a layer , picture depending on the cursor position. Everything's ok until the line:...
3
by: Greg Heilers | last post by:
Hello everyone... If one has a <div> that is completely filled with a background-image; how does one style it so that the image *continues* to fill the <div> top-to-bottom, left-to-right; if...
6
by: John Ortt | last post by:
Hi there everyone, I have a part info form which has a faded image of our company logo as a background. I want to replace the faded image with a bright red warning image on items which have run...
9
by: patrick j | last post by:
Hi I've just discovered that IE 7 messes up horizontal lists. I've done a bit of searching the web but a solution has not sprung forth from this searching. Below is a url with a horizontal...
2
by: Dravid | last post by:
Hello, I am putting together a simple picture viewing program to view jpg pictures. I have the picturebox autosize set to true. I dont have the picturebox in a pannel set to autoscroll, so if I...
1
by: pravinnweb | last post by:
can anyone tell me how to set auto height to outer div that is in green box id "gray-background" it should increase relatively to inner div "smbox" here is the css and html code it should work in...
4
by: agpkd2001 | last post by:
Hi I wrote a program in VB and after runnig ,it draw a shape ,now i wonder to know how i can zoom this drawing because sometimes it become very tiny and i can not see it ,so is there any way to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.