HighDots Forums  

Change image size

alt.html alt.html


Discuss Change image size in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bruce A. Julseth
 
Posts: n/a

Default Change image size - 07-21-2008 , 03:39 PM






Is there anyway to specify that an image should stretch and shrink to fit a
screen background? I can make it "repeat" but I'd like it to adjust as the
screen is resized.

Bruce



Reply With Quote
  #2  
Old   
Neredbojias
 
Posts: n/a

Default Re: Change image size - 07-21-2008 , 05:25 PM






On 21 Jul 2008, "Bruce A. Julseth" <julebj_nospam (AT) bellsouth (DOT) net> wrote:

Quote:
Is there anyway to specify that an image should stretch and shrink to
fit a screen background? I can make it "repeat" but I'd like it to
adjust as the screen is resized.
Yes, with javascript, but not as a background image.

Search "javascript image resize".

--
Neredbojias
http://www.neredbojias.net/
Great sights and sounds


Reply With Quote
  #3  
Old   
dorayme
 
Posts: n/a

Default Re: Change image size - 07-21-2008 , 06:51 PM



In article <iz5hk.5036$dP6.964 (AT) bignews1 (DOT) bellsouth.net>,
"Bruce A. Julseth" <julebj_nospam (AT) bellsouth (DOT) net> wrote:

Quote:
Is there anyway to specify that an image should stretch and shrink to fit a
screen background? I can make it "repeat" but I'd like it to adjust as the
screen is resized.

Not as background, no. You are confined to repeat in a couple of
directions and to a few positioning parameters. So the way to work with
such limitations is to choose/make your image carefully so it looks
natural when repeated. For example, a straight or even gently winding
road can be made to meander on forever to the right of a house as a user
opens his browser wider and wider.

You can specify an image (using the img element, not a background) to be
a percentage of a browser window. This is is easily done and the image
will stretch. Again, one would need to choose an image that lends itself
to such distortion.

In the latter case,you can still get backgound image effects by using
various postioning schemes and margins for other elements. Also
z-indexing and there are fancy opacity possibilities...

--
dorayme


Reply With Quote
  #4  
Old   
Bruce A. Julseth
 
Posts: n/a

Default Re: Change image size - 07-21-2008 , 06:58 PM




"Bruce A. Julseth" <julebj_nospam (AT) bellsouth (DOT) net> wrote

Quote:
Is there anyway to specify that an image should stretch and shrink to fit
a screen background? I can make it "repeat" but I'd like it to adjust as
the screen is resized.

Bruce

Thanks for the response. I "play" with repeat to get a good looking
background.

Bruce




Reply With Quote
  #5  
Old   
Gus Richter
 
Posts: n/a

Default Re: Change image size - 07-22-2008 , 01:02 AM



dorayme wrote:
Quote:
In article <iz5hk.5036$dP6.964 (AT) bignews1 (DOT) bellsouth.net>,
"Bruce A. Julseth" <julebj_nospam (AT) bellsouth (DOT) net> wrote:

Is there anyway to specify that an image should stretch and shrink to fit a
screen background? I can make it "repeat" but I'd like it to adjust as the
screen is resized.


Not as background, no. You are confined to repeat in a couple of
directions and to a few positioning parameters. So the way to work with
such limitations is to choose/make your image carefully so it looks
natural when repeated. For example, a straight or even gently winding
road can be made to meander on forever to the right of a house as a user
opens his browser wider and wider.

You can specify an image (using the img element, not a background) to be
a percentage of a browser window. This is is easily done and the image
will stretch. Again, one would need to choose an image that lends itself
to such distortion.
.... and then layer all subsequent document material over the image. The
image will then function as if it were a flexible background image. All
without the use of javascript, of course. Is that what you were thinking?

--
Gus


Reply With Quote
  #6  
Old   
dorayme
 
Posts: n/a

Default Re: Change image size - 07-22-2008 , 03:18 AM



In article <g63pkj$19j$1 (AT) aioe (DOT) org>,
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote:

Quote:
dorayme wrote:
In article <iz5hk.5036$dP6.964 (AT) bignews1 (DOT) bellsouth.net>,
"Bruce A. Julseth" <julebj_nospam (AT) bellsouth (DOT) net> wrote:

Is there anyway to specify that an image should stretch and shrink to fit
a
screen background? I can make it "repeat" but I'd like it to adjust as
the
screen is resized.


Not as background, no. You are confined to repeat in a couple of
directions and to a few positioning parameters. So the way to work with
such limitations is to choose/make your image carefully so it looks
natural when repeated. For example, a straight or even gently winding
road can be made to meander on forever to the right of a house as a user
opens his browser wider and wider.

You can specify an image (using the img element, not a background) to be
a percentage of a browser window. This is easily done and the image
will stretch. Again, one would need to choose an image that lends itself
to such distortion.

... and then layer all subsequent document material over the image. The
image will then function as if it were a flexible background image. All
without the use of javascript, of course. Is that what you were thinking?
Yes, that's it, as indicated by my concluding paragraph "In the latter
case, you can still get backgound image effects by using various
postioning schemes and margins for other elements. Also z-indexing and
there are fancy opacity possibilities..."

The drawback as I see it is it goes against the impulse to keep the html
as meaningful as possible whereas the image is usually likely to be
decorative. You mentioned HTML 5 recently I think, perhaps there will be
greater flexibility in deploying background imagery in it?

--
dorayme


Reply With Quote
  #7  
Old   
Gus Richter
 
Posts: n/a

Default Re: Change image size - 07-22-2008 , 09:51 AM



dorayme wrote:
Quote:
In article <g63pkj$19j$1 (AT) aioe (DOT) org>,
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote:

dorayme wrote:
In article <iz5hk.5036$dP6.964 (AT) bignews1 (DOT) bellsouth.net>,
"Bruce A. Julseth" <julebj_nospam (AT) bellsouth (DOT) net> wrote:

Is there anyway to specify that an image should stretch and shrink to fit
a
screen background? I can make it "repeat" but I'd like it to adjust as
the
screen is resized.

Not as background, no. You are confined to repeat in a couple of
directions and to a few positioning parameters. So the way to work with
such limitations is to choose/make your image carefully so it looks
natural when repeated. For example, a straight or even gently winding
road can be made to meander on forever to the right of a house as a user
opens his browser wider and wider.

You can specify an image (using the img element, not a background) to be
a percentage of a browser window. This is easily done and the image
will stretch. Again, one would need to choose an image that lends itself
to such distortion.
... and then layer all subsequent document material over the image. The
image will then function as if it were a flexible background image. All
without the use of javascript, of course. Is that what you were thinking?

Yes, that's it, as indicated by my concluding paragraph "In the latter
case, you can still get backgound image effects by using various
postioning schemes and margins for other elements. Also z-indexing and
there are fancy opacity possibilities..."
And all without the use of javascript, of course. ;-)

Quote:
The drawback as I see it is it goes against the impulse to keep the html
as meaningful as possible whereas the image is usually likely to be
decorative. You mentioned HTML 5 recently I think, perhaps there will be
greater flexibility in deploying background imagery in it?
Not in HTML5, but certainly in CSS3 (CSS Backgrounds and Borders Module):
<http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-background-size>

--
Gus



Reply With Quote
  #8  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Change image size - 07-22-2008 , 01:06 PM



..oO(Gus Richter)

Quote:
dorayme wrote:

The drawback as I see it is it goes against the impulse to keep the html
as meaningful as possible whereas the image is usually likely to be
decorative. You mentioned HTML 5 recently I think, perhaps there will be
greater flexibility in deploying background imagery in it?

Not in HTML5, but certainly in CSS3 (CSS Backgrounds and Borders Module):
http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-background-size
Opera 9.5 already supports stretching backgrounds.

CSS text shadows and background sizing
http://dev.opera.com/articles/view/css-text-shadows-and-background-sizing/

Micha


Reply With Quote
  #9  
Old   
dorayme
 
Posts: n/a

Default Re: Change image size - 07-22-2008 , 06:23 PM



In article <g64oka$3ht$1 (AT) aioe (DOT) org>,
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote:

Quote:
dorayme wrote:
In article <g63pkj$19j$1 (AT) aioe (DOT) org>,
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote:

dorayme wrote:

The drawback as I see it is it goes against the impulse to keep the html
as meaningful as possible whereas the image is usually likely to be
decorative. You mentioned HTML 5 recently I think, perhaps there will be
greater flexibility in deploying background imagery in it?

Not in HTML5, but certainly in CSS3 (CSS Backgrounds and Borders Module):
http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-background-size
Of course, yes, what was I thinking? <g>

--
dorayme


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.