...

View Full Version : How do I place text at the bottom of a page???



trev777
04-09-2011, 08:37 AM
Hi,
Can someone please tell me how to align text to the bottom of a page. For example in some sites, at the bottom it will say that this site was created by "the Author's name". I triend using the absbottom value of the align property but when I looked up on w3schools.com they said that the align property is deprecated. So what can I do now??? because I want to put my name at the bottom of my webpage I have designed....

oesxyl
04-09-2011, 08:44 AM
Hi,
Can someone please tell me how to align text to the bottom of a page. For example in some sites, at the bottom it will say that this site was created by "the Author's name". I triend using the absbottom value of the align property but when I looked up on w3schools.com they said that the align property is deprecated. So what can I do now??? because I want to put my name at the bottom of my webpage I have designed....
align and w3schools are both deprecated, :)
can you post a link to that site or to a test page?

best regards

bullant
04-09-2011, 10:45 AM
w3schools isn't deprecated.

Anyway, something like this maybe?



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
html,body{
height: 100%;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
#wrapper {
height: 100%;
width: 80%;
border: 1px solid red;
margin: 0px auto 0px auto;
position: relative;
}
#footer {
width: 100%;
position: absolute;
left: 0px;
bottom: 0px;
border: 1px solid green;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
<h1>Hello world</h1>
</div>
<div id="content">
<p>Some content</p>
</div>
<div id="footer">
<div>This website built by me.</div>
</div>
</div>
</body>
</html>

trev777
04-10-2011, 10:07 AM
Here is the link to the page I saw it on. http://www.w3schools.com/TAGS/att_p_align.asp

trev777
04-10-2011, 10:11 AM
Thank you!:thumbsup:

bullant
04-10-2011, 10:53 AM
no problem :)

safeguardcloth
04-10-2011, 12:00 PM
nice! thanks

SB65
04-10-2011, 01:49 PM
This'll work if your content and header take up less than 100% of the viewport height. If that isn't the case then the footer will be on top of the content.

Have a look here (http://ryanfait.com/sticky-footer/) for a "sticky footer" approach that avoids this.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum