Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
A div layer that always sits at the bottom of another
Old 01-16-2008, 07:02 AM A div layer that always sits at the bottom of another
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
Hi,

I want to build a section of may page that's like this:



It all sits in a div layer called #mainarea, in between #toparea and #footer.

I want the #partners layer to always sit at the bottom of the #mainarea layer, whether or not the #sidebar layer is longer or shorter than #pagecontent. However, I want it no lower than the lowest point of the sidebar layer if the sidebar is longer.

I've been fiddling about with this all morning, can anyone help? More importantly, I hope you can understand what I'm on about!

Thanks in advance,

Scott.

Last edited by tuestunim; 01-16-2008 at 07:09 AM..
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
 
Register now for full access!
Old 01-16-2008, 07:51 AM Re: A div layer that always sits at the bottom of another
Webmaster Talker

Latest Blog Post:
Sopa, pipa, acta & tpp?
Posts: 749
Name: Barry O' Brien
Location: Ireland
Trades: 0
You need to set layers to float left and right, use z indexs, set your bottom layers postition as relative or inherit and also use a contanier to contain your layers.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
audiomad is offline
Reply With Quote
View Public Profile Visit audiomad's homepage!
 
Old 01-16-2008, 08:04 AM Re: A div layer that always sits at the bottom of another
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
I have a container, it's #mainarea. I don't want to used z-indexes as I don't want the layers to ever overlap.

At the moment I've got the #pagecontent and #partners floating left and the #sidebar floating right.

For now I've added a clear:right to the #partnersites in order to keep it away from the #pagecontent layer but obviously that's not what I'm after in the end.
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
Old 01-16-2008, 08:52 AM Re: A div layer that always sits at the bottom of another
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
I'm not a designer, but I have that tiny little voice in my head telling me to look for position:relative and bottom:XX px

Maybe it could resolve your issue.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-16-2008, 09:49 AM Re: A div layer that always sits at the bottom of another
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
Cheers, that does it but now I'm left with an ugly white space at the bottom of the page. Anyone know how to get rid of that?
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
Old 01-16-2008, 09:55 AM Re: A div layer that always sits at the bottom of another
Robert_Jr's Avatar
Super Talker

Posts: 115
Name: Robert Mancelita, Jr.
Trades: 0
It has to do something with Xhtml.
__________________
[
Please login or register to view this content. Registration is FREE
]
Robert_Jr is offline
Reply With Quote
View Public Profile
 
Old 01-16-2008, 10:19 AM Re: A div layer that always sits at the bottom of another
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
Ahh come on, don't be so cryptic! If I wanted clues I'd have done a crossword!

I basically want to hide the bottom 130px or so of my page.

Last edited by tuestunim; 01-16-2008 at 10:21 AM..
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
Old 01-16-2008, 11:09 AM Re: A div layer that always sits at the bottom of another
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
I'd say that if the div is aligned at the bottom, it's on purpose that there is a blank gap up him...

Can you give us a link, or post the code.
It's hard to visualize without it...
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-16-2008, 11:13 AM Re: A div layer that always sits at the bottom of another
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
Please see http://www.lsi-gifts.co.uk/v1

Thanks for your help.
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
Old 01-16-2008, 11:45 AM Re: A div layer that always sits at the bottom of another
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Try to remove the "position:relative" and "z-index:-1" in the #mainarea section.
It revealed the content of your page to me.

I did it on firefox. I can not check them on ie as I'm working under linux.
So, I don't know how it would render in IE.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-16-2008, 11:52 AM Re: A div layer that always sits at the bottom of another
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
Yeah I added that just before posting the link then got called away. I added it as the background image was overlapping the footer on shorter pages (not that I have any shorter pages at the moment but always best to try and sort out any issues before they become a problem).

Any ideas on the white space at the bottom?
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
Old 01-16-2008, 12:20 PM Re: A div layer that always sits at the bottom of another
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Yep...
In #mainarea still, the "margin:10px 0px -130px;" is the culprit.

It tells the browser that the footer should be placed 130px higher than the bottom of the container.

Try margin:10px 0px -40px;
Looks better for me.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-16-2008, 02:54 PM Re: A div layer that always sits at the bottom of another
Webmaster Talker

Latest Blog Post:
Sopa, pipa, acta & tpp?
Posts: 749
Name: Barry O' Brien
Location: Ireland
Trades: 0
#margin:0; should do it
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
audiomad is offline
Reply With Quote
View Public Profile Visit audiomad's homepage!
 
Reply     « Reply to A div layer that always sits at the bottom of another
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.33186 seconds with 12 queries