Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-29-2009, 06:34 AM   PM User | #1
mynameismeg
New to the CF scene

 
Join Date: May 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mynameismeg is an unknown quantity at this point
image resizes with different browsers?

i'm working on my site right now and i've run into a problem. the image i'm using on looks good on my screen. i need the image to resize for different browsers/screens. i've read online about this for seriously days and just can't seem to figure it out. note: i'm very new to programming. i don't know much and have just been using adobe flash and dreamweaver. i used the flash programs to design them and dreamweaver to edit the html. i know a little bit about html and css but i reallllyy need this site so i have to figure it out. so i'm sorry for being such a noob.

basically: i need this site's background image to resize to fit different browsers and windows.
www.digcig.com
please explain?
mynameismeg is offline   Reply With Quote
Old 05-29-2009, 09:38 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
There is no way to resize a background image in CSS(as of now). Though you could fake this by some z-index tricks, see http://www.cssplay.co.uk/layouts/background.html
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

Last edited by abduraooft; 05-29-2009 at 10:29 AM..
abduraooft is offline   Reply With Quote
Old 05-29-2009, 10:25 AM   PM User | #3
mynameismeg
New to the CF scene

 
Join Date: May 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mynameismeg is an unknown quantity at this point
thank you for being direct, abduraooft. saved me a lot of time trying any longer
mynameismeg is offline   Reply With Quote
Old 05-29-2009, 10:57 AM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,615
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Well, I just have to intervene here so that you don’t get off on the wrong foot and thing it’s OK to do what abduraooft showed you with that link. It’s certainly possible to do this but just because it’s possible doesn’t mean that it’s good or right to do this.

I’d like to ask you to use Firefox to visit that page and then switch off the styles (View > Page style > no style). What do you see? I’ll tell you: You see a huge image of a rabbit and nothing else unless you scoll down ten miles. This is not the right approach! This isn’t semantic at all and forces the visitor to see an image that’s totally irrelevant to them or the understanding of the site. And even worse: you force visitors viewing your site with anything other than a regular computer to download a huge image and then spend forever to scroll down just to see the actual content they came for.

I can tell you what the correct approach could be. The first thing you need to know is: the background image isn’t important to understand the subject of the site (or shouldn’t be!). People should still get what you want to tell them without seeing any background image. This is why a background image must not be an HTML image (<img>) but actually a background image applied through CSS.

So in future create/use background images where it either doesn’t matter if it fills the entire screen or use images that can tile, and thus, repeat very well.

As to your crrent image this is relatively simple, actually: Slice your image where you have the graphic in the top left and the graphic in the bottom right in two separate images. You then apply these images as CSS backgrounds to two elements (e. g. <html> and <body>) in the respective corners and whenever one resizses the viewport the images would stay in the corners and kinda “scale” with the viewport size. The text in the bottom left and top right shouldn’t be a background image anyway, or at least the top right should be a separate image as well.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 05-29-2009, 09:59 PM   PM User | #5
mynameismeg
New to the CF scene

 
Join Date: May 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
mynameismeg is an unknown quantity at this point
thanks for your advice, stephan, you're absolutely right. i'm gonna work on modifying it so that i just don't use that image. i like it, but you're right. that's not the important thing on the site.
mynameismeg is offline   Reply With Quote
Reply

Bookmarks

Tags
css, html, image, resize, windows

Jump To Top of Thread


Thread Tools
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 Off

Forum Jump


All times are GMT +1. The time now is 06:40 PM.


Advertisement
Log in to turn off these ads.