Background images

J

Jason

I cannot figure out if it is possible to set a background
pic in a "fit-to-window" format for Front Page 2000. My
problem is when my web page is viewed sometimes the
background pic is overlapping itself unless the window is
resized. I don't want the overlap I just want the
background once. Is this possible or am I just blowing
smoke?
 
S

Stefan B Rusynko

Not possible w/ html
- make your image w/ added "white" space so it does not tile

For IE 4+ users only you can apply the background using a style to prevent repeating




| I cannot figure out if it is possible to set a background
| pic in a "fit-to-window" format for Front Page 2000. My
| problem is when my web page is viewed sometimes the
| background pic is overlapping itself unless the window is
| resized. I don't want the overlap I just want the
| background once. Is this possible or am I just blowing
| smoke?
 
C

Carmen

You can use CSS. Here's some code I can't remember where
I got it, but it works. Below are instructions are where
to insert each tag of code.

Place this code between the <head> tags, being sure to
edit the imageSRC you're using (mine is called paw.gif):

<SCRIPT LANGUAGE="JavaScript1.2">
<!--
NS4 = (document.layers);
IE4 = (document.all);

scaleWidth = true;
scaleHeight = true;
imSRC = "paw.gif";

if (NS4) window.onload = setResize;

function setResize(){
setTimeout("window.onresize=reDo;",500);
}

function reDo(){
window.location.reload()
}

if (IE4) window.onresize = reDoIE;

function reDoIE(){
imBG.width = document.body.clientWidth;
imBG.height = document.body.clientHeight;
}

function makeIm() {

winWid = (NS4) ? innerWidth :
document.body.clientWidth;
winHgt = (NS4) ? innerHeight :
document.body.clientHeight;

imStr = "<DIV ID=elBGim"
+ " STYLE='position:absolute;left:0;top:0;z-index:-
1'>"
+ "<IMG NAME='imBG' BORDER=0 SRC=" + imSRC;
if (scaleWidth) imStr += " WIDTH=" + winWid;
if (scaleHeight) imStr += " HEIGHT=" + winHgt;
imStr += "></DIV>";

document.write(imStr);

}
//-->
</SCRIPT>




Then place this code as your <body> tag code, being sure
to edit the background map image (mine is called
paw.gif) :

<BODY MARGINHEIGHT=0 MARGINWIDTH=0>
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
makeIm();
//-->
</SCRIPT>


<style type="text/css">
OL.lowalpha {list-style-type: Lower-alpha}
OL.upalpha {list-style-type: upper-alpha}
UL.square {list-style-type: square}
LI.plain {list-style-type: none}
LI LI {list-style-type: circle}
BODY {margin-left: 1 em; margin-right: 15%}
P {font-family:'Tahoma'; margin-top: 5 pt; text-indent: -
3pc}
P {margin-left:10%; margin-right: 2em; margin-bottom: 5em}
IMG.headshot {height: 54 pt; width: 32pt}
P.backgroundmap {background-image: url('../paw.gif');
background-position: 10% 25%; background-attachment: no-
repeat}
</style>
<P class="backgroundmap"><img src="../paw.gif" width="16"
height="16"></P>
</BODY>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top