By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,067 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

Floating

P: n/a
Hi.

Is there any way using CSS that I would position a copyright notice at the
bottom of the page, no matter how much it is scrolled, as though it were
floating.

Many Thanks,

Sam
Jul 20 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a

"Sam W" <sa********@hotmail.com> wrote in message
news:3f***********************@news.dial.pipex.com ...
Hi.

Is there any way using CSS that I would position a copyright notice at the
bottom of the page, no matter how much it is scrolled, as though it were
floating.


The following works in Mozilla Firebird and Opera but not IE6:

<style>
.footer {
position: fixed; bottom: 0; left: 0; right: 0; padding: 1em;
background-color: lightyellow; text-align: center;
}
</style>
....
<body>
<div class="footer">Copyright 2004, Xerxes Xylophones and Mallets.<br>All
rights reserved.</div>
<!--lots of content-->

BUT your document will scroll only as far down as it would without the
footer, which means that the footer will hide the end of your document. So
you'll have to make sure you have excess space at the bottom of your
content. Declaring a sufficiently large margin-bottom for the <body> tag
works, such as:

body { margin-bottom: 6em; }

Jul 20 '05 #2

P: n/a
Sam W wrote:
Is there any way using CSS that I would position a copyright notice at the
bottom of the page, no matter how much it is scrolled, as though it were
floating.


<http://steve.pugh.net/test/test62.html>
--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #3

P: n/a
Anne van Kesteren <ma**@annevankesteren.nl> wrote:
Sam W wrote:
Is there any way using CSS that I would position a copyright notice at the
bottom of the page, no matter how much it is scrolled, as though it were
floating.


<http://steve.pugh.net/test/test62.html>


The version at http://steve.pugh.net/test/test57.html and
http://steve.pugh.net/test/test57a.html works slightly better across
browsers.

And to get really nice there's also
http://steve.pugh.net/test/test57-long.html
http://steve.pugh.net/test/test57-short.html

There is no rhyme nor reason behind the numbering of my test pages.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #4

P: n/a
Steve Pugh wrote:
The version at http://steve.pugh.net/test/test57.html and
http://steve.pugh.net/test/test57a.html works slightly better across
browsers.

[snip]


I should have known that! I have been promoting that test for a couple
of weeks now :-)
--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #5

P: n/a

"Steve Pugh" <st***@pugh.net> wrote in message
news:1i********************************@4ax.com...
Anne van Kesteren <ma**@annevankesteren.nl> wrote:
Sam W wrote:
Is there any way using CSS that I would position a copyright notice at the bottom of the page, no matter how much it is scrolled, as though it were floating.


<http://steve.pugh.net/test/test62.html>


The version at http://steve.pugh.net/test/test57.html and
http://steve.pugh.net/test/test57a.html works slightly better across
browsers.

And to get really nice there's also
http://steve.pugh.net/test/test57-long.html
http://steve.pugh.net/test/test57-short.html


None of these works in Mozilla Firebird 0.7 or Opera 7.21. The wording may
not have been quite clear, but I understood from the OP that he wanted to
keep the copyright notice at the bottom of the viewport.

Jul 20 '05 #6

P: n/a
Harlan Messinger wrote:
None of these works in Mozilla Firebird 0.7 or Opera 7.21. The wording may
not have been quite clear, but I understood from the OP that he wanted to
keep the copyright notice at the bottom of the viewport.


I have probably misunderstood his question. position:fixed; is what he
is after probably.
--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #7

P: n/a
Anne van Kesteren wrote:
I have probably misunderstood his question. position:fixed; is what he
is after probably.


OMG, I just see you have posted that already. Although I think the
solutions of Steve are far better than the postion:fixed; solutions (it
works in IE), if the thread starter really wants it and he wants it to
work in IE he might want to look at this: <http://limpid.nl/lab/css/fixed/>

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #8

P: n/a
Thanks guys.

Sam

"Anne van Kesteren" <ma**@annevankesteren.nl> wrote in message
news:bt**********@reader11.wxs.nl...
Anne van Kesteren wrote:
I have probably misunderstood his question. position:fixed; is what he
is after probably.
OMG, I just see you have posted that already. Although I think the
solutions of Steve are far better than the postion:fixed; solutions (it
works in IE), if the thread starter really wants it and he wants it to
work in IE he might want to look at this:

<http://limpid.nl/lab/css/fixed/>
--
Anne van Kesteren
<http://www.annevankesteren.nl/>

Jul 20 '05 #9

P: n/a
Anne van Kesteren wrote:
Anne van Kesteren wrote:
I have probably misunderstood his question. position:fixed; is what
he is after probably.


OMG, I just see you have posted that already. Although I think the
solutions of Steve are far better than the postion:fixed; solutions
(it works in IE), if the thread starter really wants it and he wants
it to work in IE he might want to look at this:
<http://limpid.nl/lab/css/fixed/>


I looked at the above - interesting, thanks - and followed the link to:
http://annevankesteren.nl/archives/2...ed-positioning
You maybe already know about it but there's some very odd behaviour in IE6 -
try running the cursor over the links in the text. The effect is amplified
as the window narrows - thought I'd mention it, just in case...

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.

Jul 20 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.