Wells-it.com - Web Hosting

Background Help

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 14 posts

Joined: Sep 2003

Hi, how do i make it where my background image isn't tiled, i just want my background image to fit any browser, and i want it where the image isn't cut off? How can i do this?

Busy's picture
Modrater

He has: 6,157 posts

Joined: May 2001

the only way to make it fit every screen size is to have it tiled, and the image has to be a minimum of 1300 wide if it's a design, plain patterns can be 100x100.

If you want a design (a picture or something) the only way is to set it in the middle of the screen and either tile it in the background for added effect (use tables) or set the image in the center and use bgcolor for the extra space on big screens (CSS). you'd have to make your background image for 800x600 size if fixed and hope the smaller screen sizes dont mind and the bigger ones get it centered.
Welcome to the fun of a multi sized world

<?bhb if(broken){ echo("It wasn't me Smiling "); } ?>
Learn HTML the ez way - EzHTML.net

Some people are like slinkies, they dont really serve any purpose but they still bring a smile to your face when you push them down the stairs ...

He has: 69 posts

Joined: Oct 2003

to just make it to where it doesn't tile.. in the body tag you can just add

Quote: bgproperties="fixed"

I don't know about making that fit on every browser though.

Busy's picture
Modrater

He has: 6,157 posts

Joined: May 2001

bgproperties isn't a universal thing (wont work in all browsers), you can fix it with CSS which is a little more universal but if it's an image will be cut off in smaller screen sizes and will have blank areas in larger

<?bhb if(broken){ echo("It wasn't me Smiling "); } ?>
Learn HTML the ez way - EzHTML.net

Some people are like slinkies, they dont really serve any purpose but they still bring a smile to your face when you push them down the stairs ...

They have: 14 posts

Joined: Sep 2003

can someone list me all the web browser size, so i can resize my image to fit the different sizes?

Suzanne's picture

She has: 5,512 posts

Joined: Feb 2000

Nimrod, that's a really bad idea.

For instance, while my monitor is set to 1200x1000 something or other, my browser is currently somewhere between 800 and 900 wide and tall equally.

You just cannot determine what an end user is doing.

Post a link to the mockup and we can give you some better ideas on how to make it work across different sizes and resolutions.

Busy's picture
Modrater

He has: 6,157 posts

Joined: May 2001

to add to what Suzanne mentioned, some people have their tool bars on the side instead of top and bottom

<?bhb if(broken){ echo("It wasn't me Smiling "); } ?>
Learn HTML the ez way - EzHTML.net

Some people are like slinkies, they dont really serve any purpose but they still bring a smile to your face when you push them down the stairs ...

Jack Michaelson's picture

He has: 1,729 posts

Joined: Dec 1999

Busy wrote: to add to what Suzanne mentioned, some people have their tool bars on the side instead of top and bottom

How about innerHeight, innerWidth, ClientHeight and ClientWidth?

Shakespeare: onclick || !(onclick)

JeevesBond's picture
Moderator

He has: 3,711 posts

Joined: Jun 2002

It's not worth writing a massive DOM hack to do this...As Suzanne said:

Quote: You just cannot determine what an end user is doing.

It would be a pain and you can guarantee it'll be easily broken - as all hacks are Smiling It would be far easier to use CSS:

body {
background-image: url(bg.jpg);
background-repeat: no-repeat;
}

a Padded Cell our articles site!

Suzanne's picture

She has: 5,512 posts

Joined: Feb 2000

Using JavaScript to read what the enduser has is fine, but the problem comes in when you try to match that with endless versions of your site. Smiling

Jack Michaelson's picture

He has: 1,729 posts

Joined: Dec 1999

Suzanne wrote: Using JavaScript to read what the enduser has is fine, but the problem comes in when you try to match that with endless versions of your site. Smiling

yep, that's a real pain in the *** Smiling

Shakespeare: onclick || !(onclick)