Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Help needed with scaling a background image to fit browser/resolution
Old 07-14-2009, 08:50 AM Help needed with scaling a background image to fit browser/resolution
Novice Talker

Posts: 5
Trades: 0
Hello All!

Thanks for your help...

I am fairly new to dreamweaver and even newer to CSS.

Basically I have a fairly simple website that I'm working on... currently the background is an image thats 2000X1500 (widthxheight)

Now on my 24" mac screen it looks great and fits the browser window perfectly but on a smaller screen or on PCs it looks terrible.

I really need to find a way with HTML or CSS that I can adjust the size of the background image to the size of the users' browser window or resolution... I am happy to loose a bit off the right hand side (with the image aligned left) in order to maintain the aspect ratio

Help much appreciated thanks!

my html for the background is currently:

background-image: url(images/sitebackgroundweb.jpg);
background-repeat: no-repeat;
pantherish is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-14-2009, 09:27 AM Re: Help needed with scaling a background image to fit browser/resolution
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
currently the background is an image thats 2000X1500 (widthxheight)
Wow, that's a big image. What's the file size on a monster like that ?
Quote:
I really need to find a way with HTML or CSS that I can adjust the size of the background image to the size of the users' browser window or resolution
Neither HTML or CSS is meant for scaling images, one is a markup language the other is for presentation. That being said, this tip might help you:
http://buildinternet.com/2009/07/qui...r-window-size/

Is this an image that can't be 'sliced' to work with a layout ?
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-14-2009, 09:38 AM Re: Help needed with scaling a background image to fit browser/resolution
Novice Talker

Posts: 5
Trades: 0
thanks for your help!

the file size is rougly 490k. at 1500x1000 72dpi.

Having had a look at that link you posted swapping between 2 different sizes of background image depending on browser window size sounds like something that could definately work for me... the only thing is how do I incorporate that into my code?


thanks again
pantherish is offline
Reply With Quote
View Public Profile
 
Old 07-14-2009, 10:25 AM Re: Help needed with scaling a background image to fit browser/resolution
Novice Talker

Posts: 5
Trades: 0
PS. I'm not entirely sure what you mean by sliced. if that means that I am happy to lose a bit of the image from one edge (top, bottom, left, right) then yes I am happy for that to happen
pantherish is offline
Reply With Quote
View Public Profile
 
Old 07-14-2009, 10:28 AM Re: Help needed with scaling a background image to fit browser/resolution
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
I'm not entirely sure what you mean by sliced.
I mean cut apart, making 'slices' of the image to fit the layout. I guess it depends on the nature and use of the background image. It it's just 'eye candy' then you may not want it cut up. If the bg image is part of the layout, it might be better to slice it.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-14-2009, 10:33 AM Re: Help needed with scaling a background image to fit browser/resolution
Novice Talker

Posts: 5
Trades: 0
I'm not entirely sure what you mean but you can see a page of the site here:

http://felixngonadi.110mb.com/

thanks
pantherish is offline
Reply With Quote
View Public Profile
 
Old 07-14-2009, 10:38 AM Re: Help needed with scaling a background image to fit browser/resolution
Novice Talker

Posts: 5
Trades: 0
the background image is purely decorative but the site is so minimal that the background image has to look good... and its quite an abstract image so i really need the majority of it to display, no matter what the browser size/resolution.

the link you posted before looked like it could help me but I just don't know how to implement the coding into my site!

thanks again
pantherish is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help needed with scaling a background image to fit browser/resolution
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.50750 seconds with 12 queries