Hello,
I've aquired some Javascript that will kick in when a IE version < 6 comes to visit. It positions elements with a position:fixed effect. I need to add control for one more div container. Problem is - I don't have a clue about Javascript.
This is the complete sheet: - html, body{
-
background:url(foo) fixed;}
-
#head, #footer, #navigation_oben{
-
position:absolute;
-
top:75px;
-
z-index:10;}
-
#head{
-
top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop : document.body.scrollTop)}
-
#wrap, #content-wrap {
-
height:100%;}
-
#content{
-
padding:6em 1em;}
-
#footer{
-
top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop +(documentElement.clientHeight-this.clientHeight) : document.body.scrollTop +(document.body.clientHeight-this.clientHeight));}
This controls the header and brings it up to the top (?) - #head{
-
top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop : document.body.scrollTop)}
I'd like the code to position the addtional div 75px down from the top of the viewport / directly underneath the #head object. Could someone please help me mod the code necessary ?
regards.
3 1235 acoder 16,027
Recognized Expert Moderator MVP
I don't think this code is a very good idea - mixing CSS with Javascript.
However, if 'head' appears at the top, adding +75 to 'head2' (the additional div) should move it to the desired position.
Ah, sweet - that works thanks! I'm not fond of using JS myself, but it seems the only way to achieve the desired effect. Are there any problems I should be aware of?
What about the ActiveX warning posted by IE6 under WinXP? Is there a way to prevent this from happening?
regards
acoder 16,027
Recognized Expert Moderator MVP
Ah, sweet - that works thanks! I'm not fond of using JS myself, but it seems the only way to achieve the desired effect. Are there any problems I should be aware of?
Read about the viewport. Note that for a novice, it may not be an easy read.
What about the ActiveX warning posted by IE6 under WinXP? Is there a way to prevent this from happening?
There is, but it's there for a reason. You can prevent it for yourself probably by adding your website to your trusted sites or signing the control, but it's up to each individual to decide what level they wish to keep their security.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: MStepansky |
last post by:
Whats the difference between Javascript and Java3D?
I mean can Javascript do like Java3D can? Or is Java3D on top of Javascript
(the core, if thats what it is)? Then I should learn Javascript BEFORE Java3D,
right? no?
Worse, whats the difference between Java and Javascript?
Whats the difference between Visual Basic and Visual...
|
by: Leszek |
last post by:
Hi.
Is it possible in javascript to operate on an array without knowing how mamy
elements it has?
What i want to do is sending an array to a script, and this script should
add all values from that array
Could you show me a little example how to do this?
Thanks.
|
by: nescio |
last post by:
hello,
i have made an application in php so that people can make, on the fly, a
form.
when they submit the form there is a javascript formvalidation.
because we do not know how many fields there are in the form (it is made on
the fly) i collect all the form fieldnames in an php array and sent it to
the javascript function:
|
by: Water Cooler v2 |
last post by:
http://www.w3schools.com/js/js_whereto.asp
This link is to a JavaScript tutorial on w3schools. The page says that
a script put in the HEAD is executed only when called, whereas one put
in the BODY is executed as the page loads (implying invariably, whether
called or not).
To test, I tried the following two pages:
|
by: sgMuser |
last post by:
Hi,
I am not a good developer of Javascript codes. Needs this help to make
some modification to this famous free javascript from Anarchos. i am
using this in one of my webpage. What it does is, rotates banners with
hyperlink specific to each image. it works just perfect but i need a
simple modification. now I want to stop rotating the images...
| |
by: Wm.M.Thompson |
last post by:
For a computer programmer JavaScript is not difficult. It is pretty
easy to look at some code for the first time and figure out what is
going on.
This is especially true if you have gratuated from an old-fashioned
top-down programmer to an object oriented computer programmer. I mean,
most Javascript has a look where things are sectioned...
|
by: rn5a |
last post by:
I have gone through a no. of posts in this NewsGroup regarding my
problem but alas, couldn't come across one which would have helped me
in resolving the issue. My problem is this:
An ASPX Form has a Button. When the Button is clicked, I want a
JavaScript confirm dialog to pop-up with the options 'OK' & 'Cancel'. I
have done this using the...
|
by: Tom Cole |
last post by:
I'm working on a small Ajax request library to simplify some tasks
that I will be taking on shortly. For the most part everything works
fine, however I seem to have some issues when running two requests at
the same time. The first one stops execution as the second continues.
If I place either an alert between the two requests or run the second...
|
by: Joe Hrbek |
last post by:
Could someone help me translate to something that would close to it in
python? The anonymous functions are giving me problems.
var dataListener = {
data : "",
onStartRequest: function(request, context){},
onStopRequest: function(request, context, status){
instream.close();
outstream.close();
listener.finished(this.data);
|
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...
|
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...
| |
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |