SitePoint Sponsor |
|
User Tag List
Results 1 to 11 of 11
Thread: Changing image sizes
-
Nov 13, 2000, 11:40 #1
- Join Date
- Nov 2000
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
How do you make the image show more of it when you resize the page? Like i want people on 800x600 to see the image, but then when you goto 1024x786, i want them to be able to see additional parts of the image.
so how do you make it so that the image resizes when you make the window size bigger?
thanks
-
Nov 13, 2000, 11:49 #2
- Join Date
- Aug 1999
- Location
- East Lansing, MI USA
- Posts
- 12,937
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You'd need to use javascript to do this, as such this question would be best answered in the client side scripting category.
-
Nov 13, 2000, 12:59 #3
- Join Date
- Oct 2000
- Location
- Nashvegas Baby!
- Posts
- 7,845
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
aspen...all you would need to do to achieve this effect is to make the image larger to begin with...
Matt...a good way to accomplish this would be to start with a larger image...make it a background so that you don't get scrollbars horizontally...
then when your user comes to the page at 800x600, they get a portion of the image...if they come there with a larger resolution, they get more of the image.Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
-
Nov 13, 2000, 14:00 #4
- Join Date
- Nov 2000
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
would it work if i make the image as the background of a cell? here's my example of what i need to do: i want the banner at the top of my page to expand. so i'm thinkin that making the image the bk of a cell would probably do it...
-
Nov 13, 2000, 14:47 #5
- Join Date
- Oct 2000
- Location
- Nashvegas Baby!
- Posts
- 7,845
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Matt...all that would do is to tile that image in the cell when the cell expands...plus not all browsers support using an image as a cell or table background.
It would help us if you could give us an exact example of what you are wanting to accomplish.Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
-
Nov 13, 2000, 22:34 #6
- Join Date
- Nov 2000
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
alright, i'll have to try that. thanks for the help.
-
Nov 13, 2000, 23:18 #7
- Join Date
- Aug 1999
- Location
- East Lansing, MI USA
- Posts
- 12,937
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
oh... I thought you wanted to dynamically change the size of the image depending on the users resolution.
-
Nov 14, 2000, 04:05 #8
- Join Date
- Aug 2000
- Location
- Manchester, UK
- Posts
- 1,046
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I've found a script that might do exactly what you're after!
I was orignally looking for a script that redirects the user to a page containing an appropriately sized image based on their resolution but this may prove better:
Code:<!-- ONE STEP TO INSTALL RESOLUTION IMAGE: 1. Copy the coding into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the BODY of your HTML document --> <BODY> <SCRIPT LANGUAGE="JavaScript1.2"> <!-- Original: Daniel Farmer (danfarmer@hotmail.com) --> <!-- Web Site: http://www.mp3.com/protoculture --> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin if (screen.height >= 768 && screen.width >= 1024) { document.write("<img src='http://your-web-site-address-here.com/image.gif' width=850 height=11 border=0>"); } else { if (screen.height == 600 && screen.width == 800) { document.write("<img src='http://your-web-site-address-here.com/image.gif' width=600 height=11 border=0>"); } else { document.write("<img src='http://your-web-site-address-here.com/image.gif' width=475 height=11 border=0>"); } } // End --> </script> <p><center> <font face="arial, helvetica" size="-2">Free JavaScripts provided<br> by <a href="http://javascriptsource.com">The JavaScript Source</a></font> </center><p> <!-- Script Size: 0.96 KB -->
If you're after a script to redirect based on resolution, JavaScript source is also a good place to start.
Hope that helpsNot bad for 0903 and only two cups of coffee eh?
Ady
v-technologies - Freelance Goodness.
-
Nov 14, 2000, 11:07 #9
- Join Date
- Nov 2000
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
that's exactly what i was looking for!!! thanks a mil!
-
Nov 14, 2000, 11:08 #10
- Join Date
- Oct 2000
- Location
- Nashvegas Baby!
- Posts
- 7,845
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
good job Ady
Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
-
Nov 14, 2000, 11:09 #11
- Join Date
- Aug 2000
- Location
- Manchester, UK
- Posts
- 1,046
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Glad to be of help
Adyv-technologies - Freelance Goodness.
Bookmarks