how to make background image fit with all screen sizes

  • draganta
  • Beginner
  • Beginner
  • User avatar
  • Posts: 55

Post 3+ Months Ago

hi guys,

is there any way to make an image of 1024x764 fit with screen size of 1152x864, 800x600 or other screen sizes?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • bleepnik
  • Professor
  • Professor
  • User avatar
  • Posts: 971
  • Loc: South Jersey, US

Post 3+ Months Ago

You mean on a web page, not a physical desktop, right? Just checking...

Yes, there is a way:
http://www.cssplay.co.uk/layouts/background.html

(View source to see how it's done.)

Or even:
http://www.htmlite.com/faq022.php

(If you don't feel like analysing someone else's source code.)

Keep in mind, of course, that this method will stretch your image to the dimensions of the browser window, so if you have something that needs its aspect ratio maintained, it's going to look mighty funny (the stretchy bunny is a good example).

Hth,
Gita
  • Jepps98
  • Graduate
  • Graduate
  • User avatar
  • Posts: 149
  • Loc: Umm, not exactly sure...

Post 3+ Months Ago

or you can just put in <img src="#" width="100%" height="100%"> thats another way...
  • jlknauff
  • Expert
  • Expert
  • User avatar
  • Posts: 502
  • Loc: Florida

Post 3+ Months Ago

Jepps98 wrote:
or you can just put in <img src="#" width="100%" height="100%"> thats another way...
Not with the bg image.
  • dyfrin
  • Expert
  • Expert
  • User avatar
  • Posts: 503
  • Loc: WI

Post 3+ Months Ago

imo use jscript to replace bg image with whichever resolution one you have.
Like bg800x600.jpg bg1024x768.jpg and use the standard one (of course browser viewable isn't the full 800x600 so adjust accordingly)
  • Ballena
  • Novice
  • Novice
  • Ballena
  • Posts: 27
  • Loc: Sweden

Post 3+ Months Ago

Thanks, this did help me too.
  • Rifat
  • Novice
  • Novice
  • Rifat
  • Posts: 18

Post 3+ Months Ago

Use percentage paramaters inside the tags for the width and the height, it will then stay relative to the web browser size.
  • draganta
  • Beginner
  • Beginner
  • User avatar
  • Posts: 55

Post 3+ Months Ago

nice.. thanks to all your responses :D
  • mbz
  • Novice
  • Novice
  • mbz
  • Posts: 16

Post 3+ Months Ago

I just did my first ever web page and I did background image that fit all screens (or at least I think it does).
It took only 3 lines of codes. Please, take a look at my new web page.

http://home.comcast.net/~milazinkova/Fogshadow.html


Please let me know, if somebody need to know what those 3 lines of code were.
[/url]
  • omergok
  • Born
  • Born
  • omergok
  • Posts: 1

Post 3+ Months Ago

all right. what about tables? how can i fit the background-Image of a table?
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

mbz wrote:
I just did my first ever web page and I did background image that fit all screens (or at least I think it does).
It took only 3 lines of codes. Please, take a look at my new web page.

http://home.comcast.net/~milazinkova/Fogshadow.html


Please let me know, if somebody need to know what those 3 lines of code were.

It doesn't ... it's tiled and not stretched ...
  • murcielagossi
  • Proficient
  • Proficient
  • User avatar
  • Posts: 457

Post 3+ Months Ago

So wait, you want visitors to dl a 1024x768 just to use as a bgimage, that seems like a big waste of load time.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

murcielagossi wrote:
So wait, you want visitors to dl a 1024x768 just to use as a bgimage, that seems like a big waste of load time.


What do you mean dl?

Isn't there some CSS to make it stretch?
  • murcielagossi
  • Proficient
  • Proficient
  • User avatar
  • Posts: 457

Post 3+ Months Ago

dl = download

sorry for the shorthand

Post Information

  • Total Posts in this topic: 14 posts
  • Users browsing this forum: No registered users and 50 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.