Positioning a Div Layer

This is a discussion on "Positioning a Div Layer" within the Web Page Design section. This forum, and the thread "Positioning a Div Layer are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 5th, 2006, 15:47
Up'n'Coming Member
Join Date: Aug 2006
Location: California
Age: 19
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Positioning a Div Layer

I have figured out a majority of my css issues, now I have another question for my site. I would like to have a div at the bottom of my page that holds the copyright information my cliant wants to put there. look at the page here...

www.scoffshop.com/redesign/index2.html


www.scoffshop.com/redesign/content2.css


How would I get the content to expand through the rest of the page, and always have the lowest div sitting at the bottom?
Reply With Quote

  #2 (permalink)  
Old Oct 5th, 2006, 16:54
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,604
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Positioning a Div Layer

http://www.alistapart.com/articles/footers/
__________________
I've got <style> and .class
Reply With Quote
  #3 (permalink)  
Old Oct 5th, 2006, 17:24
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Positioning a Div Layer

With due respect to moojoo, this article is totally overkill. At a basic level all you need is:
Code: Select all
<div id='header'>
   header content
</div>

<div id='mainarea'>
   Central section
</div>

<div id='footer'>
   Copyright, etc
</div>
Footer will always be at the bottom below everything else without any css required. At least as far as positioning is concerned.
Reply With Quote
  #4 (permalink)  
Old Oct 5th, 2006, 18:38
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,604
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Positioning a Div Layer

Yeah but from what I gathered he wanted bottom of the viewport regardless of content. if I misunderstood then woops!
__________________
I've got <style> and .class
Reply With Quote
  #5 (permalink)  
Old Oct 6th, 2006, 01:45
Up'n'Coming Member
Join Date: Aug 2006
Location: California
Age: 19
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning a Div Layer

The main problem is that I have a header and nav defined by pixles, then a content area defined by %. I can never really get a perfect 100% top to bottom layout nomatter how I tried. So I designed it this way. Now if I put a div at the bottom of all the content and stuff, there is an invisable space that pushes the copyright div down further than I want it to. Im learning Java scripting now from W3Schools online to help, and I think I am gonna do the scripted method to create a footer. Ill just use an external .js file or something... If you can though, could you show me why I cant have the bottom div to butt up right next to the content div?
Reply With Quote
  #6 (permalink)  
Old Oct 6th, 2006, 18:04
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Positioning a Div Layer

You are going to get a 5px gap between content and the footer because that's what you have specified with 'margin'.

Personally, I would get rid of the overflow: auto; in the #content styling.

Suggest you fill out the content with some waffle so you get a better feel for what is happening.

Do you have Firefox on Windows? If so, download and install the web developers toolbar. It's an absolute must and the 'Outline Current Element' is great for seeing exactly what's where.

If you had this, you would be ably to see, although they are not effecting the layout, that some of your nav styling is not quite right. I thought I'd sorted all that with you once!
Reply With Quote
  #7 (permalink)  
Old Oct 6th, 2006, 22:45
Up'n'Coming Member
Join Date: Aug 2006
Location: California
Age: 19
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Positioning a Div Layer

You havnt told me about the firefox program, and I didnt know that the 5px margin on the content pushed under the div... I do throw up content on and off to see the effects of the code, and it pushes perfectly. Im about ready to set up his new site now! Thanks for your advice, hopefully I will get a final result to get critiqued. Thanks a lot guys, Ill come back if I need more help!
Reply With Quote
Reply

Tags
position

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Layer Change rattlesnak Web Page Design 2 Jan 25th, 2008 12:07
help need to add a layer in php ect rubyk9 PHP Forum 1 Sep 1st, 2007 22:58
Layer positioning leosuth Web Page Design 2 Feb 11th, 2007 13:17
Positioning the layer (Div tag) compatible mrunclesam Web Page Design 12 Dec 18th, 2006 11:43
Hidding a layer? Jorgerb Flash & Multimedia Forum 7 Apr 10th, 2005 08:48


All times are GMT. The time now is 04:41.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43