473,769 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

fixed positioning..

don't know if I'll succeed, have spent a lot of time already trying to
figure this out: I would like to position a footer (co. name, address,
etc..) at the bottom of browser page, in such a way that it's always at
the bottom no matter how high the screen is ('clientHeight' in browser
model) and that stays there when user scrolls.. in the "official" CSS
specif's (http://www.w3.org/TR/REC-CSS2/visure...ed-positioning)
I found this:

BODY { height: 8.5in } /* Required for percentage heights below */
#footer {
position: fixed;
width: 100%;
height: 100px;
top: auto;
right: 0;
bottom: 0;
left: 0;
}

I changed it to this, to fit my needs
BODY {height: 600px}
#footer {position:fixed ; bottom:20px; left:150px}

and I have to say it works beautifully; only problem is: IT DOESN'T WORK
IN IE!! it only works in Netscape.. help please.. why does this not
work in IE?? (and this is not indicated in the w3c.org site I mentioned
above where I got this from..) thank you.........

Frances Del Rio

Jul 20 '05 #1
1 2459
Frances Del Rio wrote:
I would like to position a footer ... at the bottom of browser page,
in such a way that it's always at the bottom no matter how high the
screen is and that stays there when user scrolls.
Note, that for web pages, the screen height is irrelevant. It is the
viewport height that is important. This may be what you meant, but
viewport is the correct term, and useful to know for future reference.
in the "official" CSS
specif's (http://www.w3.org/TR/REC-CSS2/visure...ed-positioning)
I found this:
Good, the spec is always a good place to start.

BODY { height: 8.5in } /* Required for percentage heights below */
#footer {
position: fixed;
...
}

I changed it to this, to fit my needs
BODY {height: 600px}
#footer {position:fixed ; bottom:20px; left:150px}

and I have to say it works beautifully; only problem is: IT DOESN'T WORK
IN IE!!
In general, IE only really supports CSS1. but even then, not fully.
Fixed positioning is a CSS2 property, which it does not support, and
will not likely do so any time this century.
it only works in Netscape..
It also works in Mozilla (which Netscape is based on), Opera, Safari and
several more less popular user agents.
help please.. why does this not
work in IE?? (and this is not indicated in the w3c.org site I mentioned
above where I got this from.


W3 does not publish, at least in their specifications, which browsers do
and do not implement features of their specifications. They do publish
test case results, but in general, browser support charts are done by
third parties.

In order to do what you wish, you will have to fake it using absolute
positioning. The simplest method is to use something like this
<div id="content">
<p>insert content here</p>
</div>
</div>
<div id="footer">
<p>...</p>
</div>

body { height: 100%; overflow: scroll; }
#content { margin-bottom: 3em; }
#footer { position: absolute; bottom: 0; left: 0; height: 3em;
background: white none; color: black; }

This is a very simple example, and you may get additional problems later
on. But it's a good start, and while learning it's easier to keep
everything simple. Unfortunately, IE also does not support setting both
'top' and 'bottom' together, or 'left' and 'right' together, so you
cannot successfully use this:

#content { position: absolute; top: 0; bottom: 3em; overflow scroll; }

The #content with the bottom margin is so that the content can scroll
up above the footer, so that the footer does not overlap. You need to
set a non-transparent background on the footer so the main content does
not show through while it is underneath.

--
Lachlan Hunt
http://www.lachy.id.au/

Please direct all spam to ab***@127.0.0.1
Thank you.
Jul 20 '05 #2

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

Similar topics

9
17709
by: Paul Trautwein | last post by:
I'm trying to get an image to float in a window despite scrolling. I've gotten it to work on my Mac using IE 5.2, Netscape, and Safari, but it goes wonky when I test it on a PC. (testing with IE only at the moment.) Positioning is wrong, and it doesn't float at all. Here's a test page: http://www.bdiusa.com/mirrors/test.html I've tested the code using the CSS Validator on the W3 site - and it said it's okay.
6
5408
by: Mason A. Clark | last post by:
Masters: On two or three-column layouts, one column often has a list of links. Scrolling the page hides them. I'm aware there's supposed to be the ability to fix the column (frame-like). I have some bits of such code but haven't yet made it work well. Question: Why have I never seen an example on the web? Not that I've seen everything, but I've seen numerous pages
10
2441
by: CMAR | last post by:
Mason C. posted an here an innovative technique for using Javascript and CSS to accomplished fixed positioning that works with IE. Does anyone have the URL of his homepage? Thanks, CMA
25
36368
by: Michael Schuerig | last post by:
I'm trying to do something seemingly very simple, but it's brought me close to crushing my head on the keyboard. All I want is a table where the head row is fixed and the body columns below are scrollable (with the ordinary scrollbars, no less). Whatever I try, the columns in the head and the body aren't aligned; the widths are computed independently which gives a completely ragged look. Michael --
3
1973
by: Axel Siebenwirth | last post by:
Hi, I would really love to get some help from you since I am starting to become completely desperate with something quite simple... I am trying to transfer a fixed-positioning-implementation for IE from a tutorial page (http://limpid.nl/lab/css/fixed/header-and-left-sidebar) to my site: http://www.refugio-thueringen.de/dev/dev.html. Everything works fine with FF and also it works with IE but only on the tutorial site not in my...
5
4212
by: msubodh | last post by:
I have been able to piece together the following code to created a fixed div so that it stays in place even when scrolling (and does it smoothly as opposed to other approaches that have jerky transitions.) I only need this to work on IE 6 so I dont mind if my solution is IE specific. The problem I have is with the DOCTYPE. I have to deal with html page that is autogenerated but I have control over the body. So I can add the stylesheet...
31
3107
by: Sarita | last post by:
Hello, this might sound stupid, but I got a really nice homepage template which unfortunately is a 3-Column Fixed Width CSS format. Now I don't have any content for the right column and would like the middle column just to use up that space instead. Any way this is possible? Thanks for your help, it is highly appreciated!
2
2207
by: soulmach | last post by:
Hello forum friends. I performed a search on this topic, but I couldn't find anything useful. I wasn't really sure what to search. First I'll state what I am trying to do. I recently agreed to make a site for a friend. It's good practice for me. The site will have (among other things) a biography. I told him to look at Zen Garden and find some layouts, and I'd see what I can do. His favorite layout for Biography is: ...
9
2574
by: Mr Prister | last post by:
I've tried to create a sidebar that uses the fixed positioning property. However after looking through various tutorials and how to's of the web I can't find a bugger wrong with my code. This is good i hear you say.... well no its not. The problem is that the frigging sidebar isn't fixed! You maybe able to tell but this is pissing me off to say the least. So i'm praying that someone with much superior CSS knowledge then I can solve the...
0
9422
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
10035
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...
0
9851
tracyyun
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8863
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...
1
7403
isladogs
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5293
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
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2811
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.