HighDots Forums  

simple css problem - which "height" to set for container

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss simple css problem - which "height" to set for container in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jtulip22
 
Posts: n/a

Default simple css problem - which "height" to set for container - 07-01-2006 , 02:16 AM






Hi,

i got a simple CSS layout with only 6 classes.

The layout is ok but it get messed up when the "maincontent" height is
greater thant the "container" div. Please have a look at my code ! The page has
to be short when there is little content , and has to expand when there is a
lot of content (so i cannot only set the height to 1000px).

Have a look with Firefox at http://www.sas.ulaval.ca/temp/css.html

Thanks for your help,

J-P


Reply With Quote
  #2  
Old   
jojo **Adobe Community Expert**
 
Posts: n/a

Default Re: simple css problem - which "height" to set for container - 07-01-2006 , 06:58 AM






Hi

You shouldn't set a height on a div unless you are very sure you won't
run into this kind of problem. You should allow the container to
collapse to the content height.

--
Cheers jojo
Adobe Community Expert for Dreamweaver 8
----------------------------------------------------
http://www.webade.co.uk
http://www.ukcsstraining.co.uk/
----------------------------------------------------
Extending Knowledge, Daily.
http://www.communityMX.com/
Free 10 day trial
http://www.communitymx.com/joincmx.cfm
----------------------------------------------------

Reply With Quote
  #3  
Old   
jtulip22
 
Posts: n/a

Default Re: simple css problem - which "height" to set forcontainer - 07-01-2006 , 12:18 PM



Yes, thanks for you answer.

But if, i dont set a height, my "container" div, will have 1 pixel height
(wont expand). Only the maincontent div will expand, but not my design.
Although my layout is quite simple, I know there is something wrong with my
code, but i still haven't found the answer....
my page, includind the css, is here : http://www.sas.ulaval.ca/temp/css.html


Reply With Quote
  #4  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: simple css problem - which "height" to set for container - 07-01-2006 , 12:40 PM



Quote:
But if, i dont set a height, my "container" div, will have 1 pixel height
(wont expand).
Not so. The container will expand to wrap its contents, unless you have
used floats within, and then all you have to do is to clear the float before
closing the container.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"jtulip22" <jtulip22 (AT) hotmail (DOT) com> wrote

Quote:
Yes, thanks for you answer.

But if, i dont set a height, my "container" div, will have 1 pixel height
(wont expand). Only the maincontent div will expand, but not my design.
Although my layout is quite simple, I know there is something wrong with
my
code, but i still haven't found the answer....
my page, includind the css, is here :
http://www.sas.ulaval.ca/temp/css.html




Reply With Quote
  #5  
Old   
Gary White
 
Posts: n/a

Default Re: simple css problem - which "height" to set for container - 07-01-2006 , 12:40 PM



On Sat, 1 Jul 2006 16:18:02 +0000 (UTC), "jtulip22"
<jtulip22 (AT) hotmail (DOT) com> wrote:

Quote:
But if, i dont set a height, my "container" div, will have 1 pixel height
(wont expand). Only the maincontent div will expand, but not my design.
Although my layout is quite simple, I know there is something wrong with my
code, but i still haven't found the answer....

Read this: http://www.complexspiral.com/publica...aining-floats/

Gary


Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.