Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 12-12-2006, 06:27 PM   #1
Member (8 bit)
 
Join Date: Aug 2005
Posts: 138
Send a message via Yahoo to tetsuo
Picture auto-size?

I was chosen to be the guy to make the band's web site, lucky me.

I'm using Dreamweaver 8. What I want to do is have the page's background image auto-size within the person's display, with no repeat. I guess repeat would be necessary vertically to account for browser window size... Example: If I use a given image while designing at a display resolution of say 1280x1024, that picture would shrink with a fixed aspect for some one who had a resolution of 1024x768, or expand to someone's who was using greater than 1280x1024. If I could apply this gadget to all images on the page with respect to background image, that would be the sweetest.

I am working with the design view of Dreamweaver except occasionally when I have to stick in a script for an mp3 or video player, it being that I don't know any HTML etc.

If anyone would get a better idea of what I'm working with by seeing the image, go here: www.circletrigonparty.org . Hehe, none of what you see there will be "final", I'm just fooling with stuff.

Thanks.
tetsuo is offline   Reply With Quote
Old 12-12-2006, 09:14 PM   #2
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
That would be very difficult to do. Only 2 ways I know of to accomplish it.
1.) Would be to use a browser resolution script to detect the size that the user is using and then load a separate page for that resolution.
2.) Would be to make a center image and and build some kind of border around it that can be resized.
__________________

Want to Make $$$$ with your Computer? No Risk! Simply press shift-4 four times in a row
mairving is offline   Reply With Quote
Old 12-12-2006, 09:37 PM   #3
Member (8 bit)
 
Join Date: Aug 2005
Posts: 138
Send a message via Yahoo to tetsuo
Okay, I like the sound of "browser resolution script". I don't like the sound of "difficult". So I just need to search for a script and then make a couple different versions of the page? That doesn't sound too hard, because the pages (or at least the one I'm concentrated on right now) are simple. The concern I would have with that is whether it would add significant loading time.
tetsuo is offline   Reply With Quote
Old 12-13-2006, 09:41 AM   #4
Member (7 bit)
 
Zick Boy's Avatar
 
Join Date: Feb 2004
Location: Owings Mills, MD
Posts: 95
No need to make different pages, just different backgrounds. Then, you can use the script below. The drawback is that you'd have to make the images on a predetermined size "guessing" the most common screen sizes (800x600, 1024x768, 1280x1024). If the user has a different screen size, it might not show correctly.

Put this between the head tags in your page:


HTML Code:
<HEAD>
<script language='JavaScript'>

if (screen.width == 1024 && screen.height == 768) {
    document.body.background = '1024x768_image.jpg';
} else if (screen.width == 1280 && screen.height == 1024) {
    document.body.background = '1280x1024_image.jpg';
}

</script>
</HEAD>
Add different sizes as you see fit.

To make the background fixed, on the BODY tag add the property bgproperties="fixed" like this:
HTML Code:
<BODY bgproperties='fixed'>
Zick Boy is offline   Reply With Quote
Old 12-13-2006, 10:13 AM   #5
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Quote:
Originally Posted by Zick Boy
No need to make different pages, just different backgrounds. Then, you can use the script below. The drawback is that you'd have to make the images on a predetermined size "guessing" the most common screen sizes (800x600, 1024x768, 1280x1024). If the user has a different screen size, it might not show correctly.

Put this between the head tags in your page:


HTML Code:
<HEAD>
<script language='JavaScript'>

if (screen.width == 1024 && screen.height == 768) {
    document.body.background = '1024x768_image.jpg';
} else if (screen.width == 1280 && screen.height == 1024) {
    document.body.background = '1280x1024_image.jpg';
}

</script>
</HEAD>
Add different sizes as you see fit.

To make the background fixed, on the BODY tag add the property bgproperties="fixed" like this:
HTML Code:
<BODY bgproperties='fixed'>
Several other drawbacks. Number one would be having very large images that would have to be downloaded. The other problem would be that just because the resolution is determined to be a certain size doesn't mean that it will be a certain size. People may be viewing it in a window. They may have the search or favorite sidebar open, etc.

It would still be much better to design it using a single image.
mairving is offline   Reply With Quote
Old 12-13-2006, 10:35 AM   #6
Member (8 bit)
 
Join Date: Aug 2005
Posts: 138
Send a message via Yahoo to tetsuo
Gracious. I am reading, and trying to fit this information into my little knowledge. But, this all new...I will try your script (it's called a script?) Zick Boy, it's simpler than what I've been finding. Which for some reason all seems to come from 2004-5 era. I want to give an example of what I'm understanding of what your saying, but I'm not sure of which of these message buttons will put it in an isolated box.

For the path to the picture I would use say the folder name, then the pic name, such as

background = 'pics/1024x768_image.jpg'

where "pics" is the folder name containing the background image. Ees goot?

Fixed background? Come again?

As far as pic sizes, I'm not really TOO worried about it, because this scenario is a simple page and if they don't have the bandwidth to stream our mp3s, I don't really care if they see the page. I did try your single image surrounded by a border mairving (a basic black tile repeating with the main image in a centered table over it), but didn't like how it would work out with the other graphics.
tetsuo is offline   Reply With Quote
Old 12-14-2006, 09:35 AM   #7
Member (7 bit)
 
Zick Boy's Avatar
 
Join Date: Feb 2004
Location: Owings Mills, MD
Posts: 95
Quote:
Originally Posted by tetsuo
For the path to the picture I would use say the folder name, then the pic name, such as

background = 'pics/1024x768_image.jpg'

where "pics" is the folder name containing the background image. Ees goot?
Yes

Quote:
Fixed background? Come again?
I guess I misunderstood when you said "fixed aspect" in your original post, I thought you meant that you don't want the background to scroll with the page.
Zick Boy is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set e-mailed picture as desktop mike12 Software Discussion & Support 6 09-15-2005 04:08 AM
need help for newbuild Dswissmiss Computer Hardware 3 08-25-2002 06:54 AM
What's AGP apperture size in BIOS??? PilotinCommand Computer Hardware 4 08-16-2002 05:55 PM
AGP aperture size {anonymous} Gaming and Benchmarks 5 08-09-2002 06:29 PM
Cluster Size ktkendall Windows Tips, Tricks, and Tweaks 2 07-25-2002 04:49 AM


All times are GMT -5. The time now is 05:17 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2