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
Help with 2 column Layout
Old 11-17-2009, 02:31 PM Help with 2 column Layout
WebTraffic's Avatar
Extreme Talker

Posts: 225
Name: Brandon
Trades: 0
http://hvacdirect.us/

I can't figure out how to fix this. This is the first time I have actually tried using floats in CSS. I have always positioned absolutely inside relative, however the problem with this is that whenever I add content it goes over the bottom of the page.

Please look at the source of this page and tell me where/where not to use floats, where I should clear them, and why my content is passing my footer.

Thanks in advance,
Brandon
__________________

Please login or register to view this content. Registration is FREE

Coding is just like a woman. If you don't do something exactly right, it complains.
WebTraffic is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-17-2009, 02:41 PM Re: Help with 2 column Layout
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
float BOTH columns to the left or put the right float before the left float in the document flow.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-17-2009, 03:16 PM Re: Help with 2 column Layout
WebTraffic's Avatar
Extreme Talker

Posts: 225
Name: Brandon
Trades: 0
Thanks Chris, you really know your stuff.

How would I fix the content text passing the footer?
__________________

Please login or register to view this content. Registration is FREE

Coding is just like a woman. If you don't do something exactly right, it complains.
WebTraffic is offline
Reply With Quote
View Public Profile
 
Old 11-17-2009, 03:23 PM Re: Help with 2 column Layout
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
use clear:both on the footer and/or before closing the parent container of the floated elements.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-17-2009, 03:26 PM Re: Help with 2 column Layout
WebTraffic's Avatar
Extreme Talker

Posts: 225
Name: Brandon
Trades: 0
I am already using clear:both on .footercontainer

edit: I also tried clear:both at the bottom of the content div, still no cigar.
__________________

Please login or register to view this content. Registration is FREE

Coding is just like a woman. If you don't do something exactly right, it complains.

Last edited by WebTraffic; 11-17-2009 at 03:44 PM..
WebTraffic is offline
Reply With Quote
View Public Profile
 
Old 11-17-2009, 03:42 PM Re: Help with 2 column Layout
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
add
Code:
.contentmain p:lastchild {
      clear:both;
}
to the stylesheet.

or set overflow:auto to .contentmain


That should break the floats and allow contentmain to enclose the floated elements.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-17-2009, 03:51 PM Re: Help with 2 column Layout
WebTraffic's Avatar
Extreme Talker

Posts: 225
Name: Brandon
Trades: 0
Code:
.contentmain p:lastchild {
      clear:both;
}
Didn't do anything to the page.

Adding overflow made the .contentmain scroll (the way an iframe looks)
__________________

Please login or register to view this content. Registration is FREE

Coding is just like a woman. If you don't do something exactly right, it complains.
WebTraffic is offline
Reply With Quote
View Public Profile
 
Old 11-17-2009, 04:17 PM Re: Help with 2 column Layout
WebTraffic's Avatar
Extreme Talker

Posts: 225
Name: Brandon
Trades: 0
Okay I figured out what was wrong with it. My content main div had a fixed height of 700px. I removed this and the div now stretches.

I now have another problem. If you visit the site again, you will see that there is a big space on the left that isn't filled in. I have a div that I am trying to fill in with a white background to take up this space.

the div name is .blankleftspace. I have given it a height of 100%, but it does not actually fill the area for some reason.

I'm sure this should be an easy one for you.
__________________

Please login or register to view this content. Registration is FREE

Coding is just like a woman. If you don't do something exactly right, it complains.
WebTraffic is offline
Reply With Quote
View Public Profile
 
Old 11-17-2009, 05:24 PM Re: Help with 2 column Layout
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.webmaster-talk.com/css-fo...l-browser.html
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Help with 2 column Layout
 

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 0.38937 seconds with 12 queries