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
Container height screws up when set to auto
Old 01-20-2008, 02:02 AM Container height screws up when set to auto
mr.aliks's Avatar
Average Talker

Posts: 27
Trades: 0
---> http://alloraweb.net/portfolio/Jeremy%20E/security/

This is my second page I coded today and I'm having the same problem. Everything looks right, except when I change the height from 917px to auto, the container just disappears.

I have the similar problem on my other site...why is this happening? What am I doing wrong?

Thanks
mr.aliks is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-20-2008, 06:57 AM Re: Container height screws up when set to auto
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
except when I change the height from 917px to auto, the container just disappears.
As it would if it has no content.

auto height means as much height as you need to hold the content, and floated elements take up no height inside a container (apart from in IE and it's wannabe cousin Opera of course )

You will need to use a clearing element after the last floated element to "break" the float and restore the document flow. This will let the container height function as expected.
__________________
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?

Last edited by chrishirst; 01-20-2008 at 07:00 AM..
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-20-2008, 05:09 PM Re: Container height screws up when set to auto
mr.aliks's Avatar
Average Talker

Posts: 27
Trades: 0
could you explain that to me a little more? I'm just a novice at css, so i'm not quite following you.
mr.aliks is offline
Reply With Quote
View Public Profile
 
Old 01-21-2008, 11:11 PM Re: Container height screws up when set to auto
Novice Talker

Posts: 8
Name: Jason
Trades: 0
I am having the same problem, I would love to have more clarification here, css is new to me and I just can' get a grip on this container business.

Not to imped on your post, but here is a link to what I am working on:

< removed URL. PM finda if you need to see it >

Last edited by chrishirst; 01-22-2008 at 05:18 AM..
finda is offline
Reply With Quote
View Public Profile
 
Old 01-21-2008, 11:15 PM Re: Container height screws up when set to auto
mr.aliks's Avatar
Average Talker

Posts: 27
Trades: 0
I got it figured out now. Basically I removed some unneeded "float:left" parameters and it would start to display the background. I fixed some other issues as well along the way. You wont see the fixed files in the link i provided though.
mr.aliks is offline
Reply With Quote
View Public Profile
 
Old 01-21-2008, 11:30 PM Re: Container height screws up when set to auto
Novice Talker

Posts: 8
Name: Jason
Trades: 0
so you just set a div at auto and placed layers over this and it automatically expanded? you just had to set some of your floats right? That doesn't seem to help me, it expands correctly when I type something in, just won't expand with images!
finda is offline
Reply With Quote
View Public Profile
 
Old 01-27-2008, 04:53 PM Re: Container height screws up when set to auto
mr.aliks's Avatar
Average Talker

Posts: 27
Trades: 0
Quote:
Originally Posted by finda View Post
so you just set a div at auto and placed layers over this and it automatically expanded? you just had to set some of your floats right? That doesn't seem to help me, it expands correctly when I type something in, just won't expand with images!
Take a look at what I've changed here (you can read my comments in the css file):
http://alloraweb.net/portfolio/Jeremy%20E/realestate/


Here is a copy of what I've had before (the one with problems when you set the height to auto):
http://alloraweb.net/portfolio/Jerem...telemarketing/
__________________

Please login or register to view this content. Registration is FREE
mr.aliks is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Container height screws up when set to auto
 

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