473,804 Members | 3,123 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

fixed layer and IF code for IE

Jaz

Trying to use a fixed layer for a couple of NAV buttons.

I found this code, but the IE part is commented, and I don't
understand the IF statement. It works great on Moz/Firebird and Opera
BUT not IE. Would someone please take a look at this and tell me if it
can made to work in IE? If it can, a hint on the syntax/code would be
much appreciated! PS, this would also get rid of my fixed background.

Thanks in advance
Jaz
------------------------------------------
<style type="text/css">
#fixed
{position:fixed ;left:10px;top: 100px;width:0px ;height:0px;bor der:0px;backgro und:#330000;col or:#330000;}
</style>
<!--[if IE]>
<style type="text/css">
#fixed {position:absol ute;}
</style>
<script type="text/javascript">
function fixIE(id) {
var elem=document.a ll[id]; // IE only, so document.all is safe
elem.style.posi tion="absolute" ; // "fixed" doesn't work in IE
var
root=document.d ocumentElement? document.docume ntElement:docum ent.body;
var posX=elem.offse tLeft-root.scrollLeft ;
var posY=elem.offse tTop-root.scrollTop;
root.onscroll=f unction() {
elem.style.left = (posX + root.scrollLeft ) + "px";
elem.style.top = (posY + root.scrollTop) + "px";
};
}
function initIE(){fixIE( "fixed");}
</script>
<![end if] -->
<!--[if IE 6]>
<style type="text/css">
html {
overflow: hidden;
margin:0px;
padding:0px;
}
body {
overflow: auto;
margin: 0px 0px 0px 100px;
padding: 0px 8px;
height:100%;
}
</style>
<script type="text/css">
initIE = undefined;
</script>
<![end if] -->
</head>
<body onload="if (initIE) initIE()">
<div id="fixed">
<table><tr><t d>
<a href="index.htm l"><img src="butn_home. jpg" width=100
height=40 border=0 alt=""></a>
<a href="products. html"><img src="butn_produ cts.jpg" width=100
height=40 border=0 alt=""></a>
<a href="order.htm l"><img src="butn_order .jpg" width=100
height=40 border=0 alt=""></a>
<a href="contact.h tml"><img src="butn_conta ct.jpg" width=100
height=40 border=0 alt=""></a>
<a href="knownby.h tml"><img src="butn_known by.jpg" width=100
height=40 border=0 alt=""></a>
</td></tr></table>
</div>

------------------------------------------
(Please excuse the 'burp' when replying)
Jul 20 '05 #1
1 3529
Jaz
Jaz <ha*****@beerbu rp.com> forgot to take the pills and typed:

Trying to use a fixed layer for a couple of NAV buttons.

I found this code, but the IE part is commented, and I don't
understand the IF statement. It works great on Moz/Firebird and Opera
BUT not IE. Would someone please take a look at this and tell me if it


Um... nevermind... it seems to work fine by itself. I guess it's how I
built it into my own page. I'll keep trying...
(Please excuse the 'burp' when replying)
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7854
by: Roger Leigh | last post by:
Hello, I'm writing a fixed-precision floating point class, based on the ideas in the example fixed_pt class in the "Practical C++ Programming" book by Steve Oualline (O' Reilly). This uses a long int to store the value, and the precision (number of decimal points) is variable (it's a templated class): template <size_t _decimal_places = 4> class FixedFloat {
1
1943
by: PAD | last post by:
I have written a javascript routine that populates a parent document with a series of <iframe>s. Each <iframe> receives its contents from a series of separate smaller HTML files. Of course my NN 4.8 browser doesn't deal well with the <iframe> so I wrapped the code that generates the <iframe> in <ilayer> tags. NN now recognizes the contents. However within each of the 'content' files I have another javascript routine that basically...
41
1605
by: Richard | last post by:
http://geocities.com/r_bullis/test3.html I've managed to get to this point. Problem is, I get an error saying that an item is not defined as an object. When clicked on, the link should activate the first layer and does not. I'm just following what the original script was using. Could be a simple placement of the division tag. Any ideas on how to correct appreciated.
1
1493
by: Roderik Emmerink | last post by:
Hi, I used a javascript from quirksmode.org to obtain a layer to be fixed (in IE and FF). The black rectangle at: http://www.roderik.net/experiment.htm should be fixed (stay in the same position when you scroll down). Does anyone have an idea why this layer is not responding in this page (I have tried the script in another page where it does work).
2
2215
by: headware | last post by:
I'm relatively new to ASP.NET and ADO.NET, but I have a basic design question regarding the use of web services and APS.NET applications. Right now we have an application that uses web services to access the database layer. However, the code works in a pretty cumbersome and ungeneric way. Basically every query, update, and insert has its own function. So you see a lot of functions like webService.InsertCustomer(name, age, phone); or...
8
1900
by: Jon Maz | last post by:
Hi, I'm facing a code-optimisation issue on an asp.net/vb.net/SQL Server 2000 project. A web page containing not much more than 3 DropDownLists is taking nigh on 6 seconds to load, because each ddl opens up a separate connection to the DB, pulls out its data, and closes its own connection before the next ddl repeats the process. The code to handle each DDL's connection to the DB is packaged in an object (presentation-layer code...
1
3460
by: kraj | last post by:
hi, i need a help in my web page, i used layer in my document in html and i want to set fixed position of that layer in page & if system resolution 800*600 or 1024*768, the layer must be in the same place no change in position. how i can set this for my this requirement? please give reply as soon as possible.... thanks
9
2746
by: SAL | last post by:
Hello, I have a Dataset that I have table adapters in I designed using the designer (DataLayer). I have a business logic layer that immulates the DataLayer which may/may not have additional logic in. My business classes are, of course, decorated with the: <System.ComponentModel.DataObject() attribute. So, I drop a GridView on a webform and set its datasource to an ObjectDatasource which in turn is using one of my business logic...
0
1408
by: microgolf | last post by:
Hey, i'm new to this group beceaus i have a question i have been trying to solve for a few days now but i just cant figure it out. I am trying to constrain the min-width of my site, but i have some div's in there with a fixed and absolute positioning... And these two dont seem to get along? Or maybe it is beceaus i use z-index to layer some divs.
0
9587
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10588
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.