Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Dynamic resize of image paradox

Reply
Thread Tools

Dynamic resize of image paradox

 
 
KiwiBrian
Guest
Posts: n/a
 
      05-12-2006
I often see comments that I have interpreted to mean that what this page
demonstrates is not possible.
Where have I gone wrong?
Why is this the first time that I have seen this in effect in 10 years of
surfing?
Maybe I just need to get out more.
Brian

http://nopeople.com/CSS/background_image_resize/


 
Reply With Quote
 
 
 
 
Spartanicus
Guest
Posts: n/a
 
      05-12-2006
"KiwiBrian" <(E-Mail Removed)> wrote:

>I often see comments that I have interpreted to mean that what this page
>demonstrates is not possible.
>Where have I gone wrong?
>Why is this the first time that I have seen this in effect in 10 years of
>surfing?
>
>http://nopeople.com/CSS/background_image_resize/


It's not a background image.

>Maybe I just need to get out more.


Stay in, learn a few basics about HTML and CSS.

--
Spartanicus
 
Reply With Quote
 
 
 
 
Neredbojias
Guest
Posts: n/a
 
      05-13-2006
To further the education of mankind, "KiwiBrian" <(E-Mail Removed)>
vouchsafed:

> I often see comments that I have interpreted to mean that what this
> page demonstrates is not possible.
> Where have I gone wrong?
> Why is this the first time that I have seen this in effect in 10 years
> of surfing?


I did that years ago and had it in a page with automatic font-size adjust.
Trouble is most images don't resize that well and the system bloats the
markup, anyway.

--
Neredbojias
Infinity has its limits.
 
Reply With Quote
 
ironcorona
Guest
Posts: n/a
 
      05-13-2006
KiwiBrian wrote:
> I often see comments that I have interpreted to mean that what this page
> demonstrates is not possible.
> Where have I gone wrong?


It's quite simple to do:

<img
src="http://www.google.com.au/intl/en_au/images/logo.gif"
alt="google logo"
style="width:100%; height:100%;"
/>

[I've used the Google logo but any image will do]

--
Brian O'Connor (ironcorona)
 
Reply With Quote
 
sunil
Guest
Posts: n/a
 
      05-14-2006
It is absolutely nothing.. It will resize while the div tag resizes.
All div tags are defined in % values..And it is not background image.
See the below code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>background image resize - CSS only</title>
<meta name="" content="authored by http://www.nopeople.com" />
<style type="text/css">
body {
height: 100%;
width: 100%;
border: 0px;
margin: 0px;
padding: 0px;
}
html {
height: 100%;
width: 100%;
overflow: hidden;
}
#background_image {
position: absolute;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
z-index: 1;
}
#page {
position: absolute;
top: 0px;
left: 2px;
z-index: 2;
height: 100%;
width: 100%;
overflow: auto;
}
#ad {
margin-top: 3%;
width: 30%;
float: right;
clear: right;
}
p {
text-align: right;
}
p.footer_link {
text-align: left;
margin: 0px;
}
#content {
width: 30%;
margin: 3%;
}
</style>
</head>

<body>
<img src="CRW_1603 Old Matanuska Bridge.jpg" alt="big pic" width="3364"
height="2548" id="background_image" />
<div id="page">
<div id="ad"><p class="footer_link">Web design by: <a
href="http://www.nopeople.com"
target="_blank">nopeople.com</a></p></div>
<div id="content"><p>Resize the window, and the background image will
scale to fit the new window size.</p></div>
</div>
</body>
</html>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FXRuby dynamic drawing canvas and off-screen image buffer resize Ranieri Teixeira Ruby 2 02-09-2008 01:42 PM
Dynamic Image Resize and Data Type issues webonomic ASP .Net 2 01-26-2006 08:40 PM
Wireless Performance Paradox on Thinkpad T42p Sid Joyner Wireless Networking 0 09-06-2005 01:00 AM
cross-browser dynamic image resize douglas.gennetten@hp.com Javascript 1 04-11-2005 08:52 PM
How to resize all images sizes and coordinates of the images on resize browser rams.kakara@gmail.com ASP General 2 02-13-2005 09:03 AM



Advertisments