Jump to content

<div align> or something. help. simple and easy but im lost lol


Minimeallolla

Recommended Posts

say if I had a black page with a background or something simple and it had no content except for a link called "about us"

and I wanted that link to be located at the bottom left side of the page but since it has no content its stuck up the top unless <br> or <p> is introduced.

how could this be done without spamming <br /><p><br /> untill im happy with its location and if content is added it gets boosted down further with a massive gap ><

Link to comment
Share on other sites

Try This

 

Play around with the margin-top: -7.5em;

 

Credit goes to Cameron Adams

http://www.last-child.com/forcing-the-footer-to-always-be-at-the-bottom-of-a-page/

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
html { height: 100%;}
body {
height: 100%;
background-color: #000000;
margin: 0px;
padding: 0px;
}
#content { position: relative; min-height: 100%;}
* html #content { height: 100%;}
#bnav {
position: relative;
margin-top: -7.5em;
color: #FFFFFF;
}
-->
</style>
</head>

<body>
<div id="content"></div>
<div id="bnav">About Us </div>
</body>
</html>

Link to comment
Share on other sites

if this link is in a ul or ol, which it should be.....you could easily create a style rule on the ul/ol like so:

 

ul {margin-top: 600px;}

 

You cna play around with the pixels, even use percentages.

Cool thanks for the tip, after playing with this, I have found this a very useful techique for future projects

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.