CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 18th, 2003, 02:03 AM
Tekka's Avatar
Tekka Tekka is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Australia
Posts: 18 Tekka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m
Reputation Power: 0
Copyright with CSS

Hi,
I'm having a bit of trouble :?

I've got a title, content, footer design that is giving me pain. You see the title is a set height, that is fine, but the content isn't, it all depends on the page.

Now the thing is I would like a bit of copyright text to sit right at the bottom of the page on every page, I can do this with:

bottom: 0px;
position: absolute;

The only problem is if the content text gets too big (and it will) and flows down the page the footer stays right at the edge of the page, sitting in the middle of the new extended content, I've tried it without the position: absolute; and it works, but if the content is small it sits right at the edge of the content again in the middle of the page, its a damned if I do, damned if I don't.

I'd rather I didn't have to give content a set height as I'm trying to cater to a wide range of resolutions and I don't like scroll bars showing up if they aren't needed.

I'm not sure if I'm writing this correctly, is its truly incomprehensible I'm sorry :?

Reply With Quote
  #2  
Old June 18th, 2003, 02:38 AM
Phil_work Phil_work is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Canberra, Australia
Posts: 317 Phil_work User rank is Corporal (100 - 500 Reputation Level)Phil_work User rank is Corporal (100 - 500 Reputation Level)Phil_work User rank is Corporal (100 - 500 Reputation Level)Phil_work User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 19 h 42 m 18 sec
Reputation Power: 7
can you paste your code?

Are you using CSS positioning elsewhere on the pge?

Reply With Quote
  #3  
Old June 18th, 2003, 03:02 AM
MJEggertson MJEggertson is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2002
Location: Seattle WA
Posts: 863 MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 sec
Reputation Power: 8
Basically, if you have long content like that, you need to create a series of containing blocks that all have absolute positions.

So, you need to create a pseudo frameset by having a content block whose bottom is set to the position of the copyright container's top attribute:
Code:
#content {
  position: absolute;
  top: 0;
  bottom: 1em;
  left: 0;
  right: 0;
  overflow: auto;
}
#copyright {
  position: absolute;
  bottom: 0;
  height: 1em;
  left: 0;
  right: 0;
}

Reply With Quote
  #4  
Old June 18th, 2003, 04:40 AM
Tekka's Avatar
Tekka Tekka is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Australia
Posts: 18 Tekka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m
Reputation Power: 0
Hi,
My current code is:

BODY {
background:#FFFFFF;
height:100%;
margin:0px;
width:100%;
padding:0px;
min-width:500px;
}

#title{
background-image: url("../images/bgtop.jpg");
background-repeat:repeat-x;
width:100%;
min-width:500px;
height:150px;
padding:0px;
top:0px;
}

#title_menu{
background:#FFFFFF;
position: absolute;
right:52px;
top:90px;
vertical-align: text-bottom;
width:260px;
}

#title_right{
position: absolute;
right:0px;
top:0px;
width:52px;
}

#content{
width:auto;
padding:0px 10px 0px 10px;
min-width:500px;
}

#footer{
bottom:0px;
position: absolute;
}

MJEggertson,
I tried the code you posted but it didn't seam to want to work, the copyright bit still flowed over the content :?

Reply With Quote
  #5  
Old June 18th, 2003, 07:49 AM
Phil_work Phil_work is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Canberra, Australia
Posts: 317 Phil_work User rank is Corporal (100 - 500 Reputation Level)Phil_work User rank is Corporal (100 - 500 Reputation Level)Phil_work User rank is Corporal (100 - 500 Reputation Level)Phil_work User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 19 h 42 m 18 sec
Reputation Power: 7
http://www.alistapart.com/stories/flexiblelayouts/

I have used this story for a similar thing, Using Container DIVs and nesting DIVs inside with Relative and Absolute positioning.

The story explains how to create a three column layout in CSS with a bottom area.

The script mentioned in the article determines the size of the content div and then sets the bottom area to the bottom of that..

Give it a try..

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Copyright with CSS


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway