faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

10 of 11 people (91%) answered Yes
Recently 5 of 6 people (83%) answered Yes

Entry

How can I set a fixed background for NN like in www.nedcom.nl/fixed.htm?

Apr 4th, 2008 20:51
ha mo, Jean-Bernard Valentaten, Bart Hoeksel,


First of all you can define a stylesheet in the header (you don't need 
a js-Function for that)
<style type="text/css">
  body {background:white url(images/Nedcom-Blue.gif) no-repeat fixed 
center center}
</style> 
This is going to work with IE 4, IE 5.x and NN6
For NN4.x you will need to use layers and branch to another page that 
was specially made for NN4.x
so in your fixed.html insert the following in the script section:
function branch() {
  if !((document.all)||(document.getElementById)) {
    location.href="./fixedNN.html"
  }
}
and in the body-Tag
<body onLoad="branch();">
This will make sure that only NN6 and IE will use the page with the 
stylesheet.
The page for NN4.x is pretty easy too. You use two layers, where one is 
moved over the other. You'll find the answer to that in another folder. 
If you can't find it, mail me.
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com