A footer

C

Craig

Is there a correct way, without frames, or using table heights or anything,
to get a footer at the bottom of a screen if the page isn't bigger than a
screen height, and if it is, then the footer should be at the bottom of the
page. If the page only takes up 50% of the screen, then the footer must be
at the bottom of the screen.
 
S

Spartanicus

Craig said:
Is there a correct way, without frames, or using table heights or anything,
to get a footer at the bottom of a screen if the page isn't bigger than a
screen height, and if it is, then the footer should be at the bottom of the
page. If the page only takes up 50% of the screen, then the footer must be
at the bottom of the screen.

The correct way is to stop wanting that, allow the footer to flow
beneath the content.

Btw "page" = the whole content, use "viewport" to refer to a window's
size, "screen" = the entire display area.
 
J

Jan Faerber

Craig said:
Is there a correct way, without frames, or using table heights or
anything, to get a footer at the bottom of a screen if the page isn't
bigger than a screen height, and if it is, then the footer should be at
the bottom of the page. If the page only takes up 50% of the screen, then
the footer must be at the bottom of the screen.

not any browser shows this:
<div style="position:absolute(or relative);botton:10px;">
 
J

Jan Faerber

<div style="position:absolute(or relative);botton:10px;">
.... sorry ... bottom
 
M

Matt Jones

Craig said:
Is there a correct way, without frames, or using table heights or anything,
to get a footer at the bottom of a screen if the page isn't bigger than a
screen height, and if it is, then the footer should be at the bottom of the
page. If the page only takes up 50% of the screen, then the footer must be
at the bottom of the screen.

Take a look at this article at A List Apart:
http://www.alistapart.com/articles/footers/

Matt
 
E

Eric B. Bednarz

Craig said:
Is there a correct way, without frames, or using table heights or anything,
to get a footer at the bottom of a screen

No. Define 'correct' first, and why the techniques you do not wish to
employ (especially 'or anything') do not apply.
if the page isn't bigger than a
screen height, and if it is, then the footer should be at the bottom of the
page. If the page only takes up 50% of the screen, then the footer must be
at the bottom of the screen.

Well, with no particular benefit that meets at least my eye, you could
do so with div soup and css, if that's the objective:

<http://sandbox.bednarz.nl/css/height/footer.html>
 
D

David Dorward

<posted & mailed>

Jan said:
... sorry ... bottom

Well... (a) with absolute positioning it will be at the bottom of the
containing block - which is not "The screen if the page is shorter then the
screen and the page if the page is longer then the screen" and (b) relative
positioning would move it 10 pixels from where it would be if it wasn't
positioned at all.

So neither of those do what the OP wanted (and B doesn't even come close).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top