Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Change image size

Reply
Thread Tools

Change image size

 
 
Bruce A. Julseth
Guest
Posts: n/a
 
      07-21-2008
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
 
 
 
 
dorayme
Guest
Posts: n/a
 
      07-21-2008
In article <iz5hk.5036$>,
"Bruce A. Julseth" <> 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.

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
 
 
 
 
Bruce A. Julseth
Guest
Posts: n/a
 
      07-21-2008

"Bruce A. Julseth" <> wrote in message
news:iz5hk.5036$...
> 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
 
Gus Richter
Guest
Posts: n/a
 
      07-22-2008
dorayme wrote:
> In article <iz5hk.5036$>,
> "Bruce A. Julseth" <> 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
 
dorayme
Guest
Posts: n/a
 
      07-22-2008
In article <g63pkj$19j$>,
Gus Richter <> wrote:

> dorayme wrote:
> > In article <iz5hk.5036$>,
> > "Bruce A. Julseth" <> 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
 
Gus Richter
Guest
Posts: n/a
 
      07-22-2008
dorayme wrote:
> In article <g63pkj$19j$>,
> Gus Richter <> wrote:
>
>> dorayme wrote:
>>> In article <iz5hk.5036$>,
>>> "Bruce A. Julseth" <> 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.

> 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
 
David Segall
Guest
Posts: n/a
 
      07-22-2008
"Bruce A. Julseth" <> 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.

I don't think you can but I posted a similar query some time ago
<http://tinyurl.com/5fy25e> and received some very helpful advice
including an excellent summary from Nik Coughlin of techniques for
creating an image that could be right truncated and still be
acceptable <http://nrkn.com/backgroundWidth/>. Another technique that
I have employed is to use a series of related images that can be
truncated <httprofectus.com.au/ee_headingexample_little.html>. You
can also use an image that is meant to be repeated as I have at
<http://cheapweb.profectus.com.au/> but I don't think it really works.
 
Reply With Quote
 
Michael Fesser
Guest
Posts: n/a
 
      07-22-2008
..oO(Gus Richter)

>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/c...ground-sizing/

Micha
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      07-22-2008
In article <g64oka$3ht$>,
Gus Richter <> wrote:

> dorayme wrote:
> > In article <g63pkj$19j$>,
> > Gus Richter <> 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

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
Preferred Size, Minimum Size, Size Jason Cavett Java 5 05-25-2008 08:32 AM
mega pixels, file size, image size, and print size - Adobe Evangelists Frank ess Digital Photography 0 11-14-2006 05:08 PM
Firefox - Prevent TextField size change when user changes font size? Wongod HTML 2 10-04-2006 12:26 PM
A Paradise DNS address change? What change? There was no change. Tony Neville NZ Computing 7 09-22-2006 01:02 PM
Bigger image size and lower quality vs. Smaller image size and higher quality Desmond Digital Photography 5 09-27-2003 04:08 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57