View Single Post
  #12 (permalink)  
Old Feb 5th, 2008, 13:28
Rakuli's Avatar
Rakuli Rakuli is offline
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: When is it ok to use Absolute Positioning ??

To stop the text strecthing all the way across the screen you can use

Code: Select all
#main p
{
    width: 50%;
}
That will mean all <p> elements inside of the main div will take up 50% of the horizontal space.

As for the navigation in the top panel, yes you want to put it inside the #head div. If you want it to be along the bottom of the top div, give the #head a position: relative and use the following on a div inside the head with the id of #navigation.

Code: Select all
#navigation
{
    position: absolute;
    bottom: 0px;
    left: 0px;
}
Alternatively, if you are placing an image in your head area and want the navigation to appear underneath it, you only have to place the div after the <img without any position specified.
Reply With Quote