Discussion:
Q U E R Y
(too old to reply)
John Dunne
2005-07-25 16:52:04 UTC
Permalink
hey...
19 year old graphic designer here, totally unfamiliar with programming
content. working hard on an online portfolio at the moment but experiencing
some difficulties. i think javascript could rescue me.

problem:
-set a gif file as a background image in a html document
-it fills the whole of my internet browser window on my 17" monitor yet,
when viewed on a smaller monitor, users have to use the ugly horizontal
scrollbar to view the whole document.
-surely there is a way of configuring a background image so that,
irrespective of the user's monitor size, it just fills the window.....

please help,
advice/recommendations really appreciated,
thanks very much,
john.
Jasen Betts
2005-08-02 10:50:48 UTC
Permalink
Post by John Dunne
hey...
19 year old graphic designer here, totally unfamiliar with programming
content. working hard on an online portfolio at the moment but experiencing
some difficulties. i think javascript could rescue me.
-set a gif file as a background image in a html document
-it fills the whole of my internet browser window on my 17" monitor yet,
when viewed on a smaller monitor, users have to use the ugly horizontal
scrollbar to view the whole document.
-surely there is a way of configuring a background image so that,
irrespective of the user's monitor size, it just fills the window.....
please help,
advice/recommendations really appreciated,
thanks very much,
john.
you don't need javascript, try using z-index and a 100% sized image.

<html>
<head>
<title> elastic picture </title>
</head>
<body style="margin: 0px; padding: 0px;">
<div style="width: 100%; height: 100%; left: 0px; top: 0px; position: absolute; z-index: 0;">
<img src="image.jpg" style="width: 100%; height: 100%;">
</div>
<div style="z-index: 1; position: absolute;">
The actual page... :D
</div>
</body>
</html>

not my own code I googled for this.
--
Bye.
Jasen
Loading...