logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 07-01-2009, 06:03 PM   #1
nits4u
 
Join Date: Jun 2009
Posts: 133
Default auto resizing picture .

guys i want to set a background picture that resize itself to fit exactly within the browser with the change in resolution. mean that does not contract or stretch as we change the resolution.
as much i know it is not possible thro0' CSS.
and if i am not wrong this can be done by Java script by using a function that reads the user's current resolution and load the picture according to that.
if so than plz provide the code or is there other way out ???
thanx
nits4u is offline   Reply With Quote
Old 07-12-2009, 04:26 PM   #2
jaymo
 
Join Date: Jan 2009
Posts: 55
Default

Do it with CSS. Just have a background-image and set background repeat to reapeat-x. Just go for the most common resolution, which I think is 1024x768 (correct if wrong) and you should be fine.
jaymo is offline   Reply With Quote
Old 07-12-2009, 05:09 PM   #3
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

Quote:
Originally Posted by jaymo View Post
Do it with CSS. Just have a background-image and set background repeat to reapeat-x. Just go for the most common resolution, which I think is 1024x768 (correct if wrong) and you should be fine.
Uh.. how is this even addressing the question? How is this resizing the background image based on users screen resolution?
domedia is offline   Reply With Quote
Old 07-12-2009, 05:16 PM   #4
jaymo
 
Join Date: Jan 2009
Posts: 55
Default

The guy said 'is there another way out', so I wrote another solution that might work for him.
jaymo is offline   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

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

Forum Jump


All times are GMT. The time now is 08:38 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com