HighDots Forums  

heigth of divs

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss heigth of divs in the Cascading Style Sheets forum.



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

Default heigth of divs - 05-10-2004 , 09:20 PM






Hi,

My container div should contain all the contents on the page, but it
does not appear to have the height of the complete page.
See page:

http://afstuderen.archytas.nl/verslag.php

In the end of the page, mozilla makes the white div longer than the
container. MSIE will leave some content away and cuts the page earlier.
Does anyone have an idea why this will happen?

Thanks in advance,

Roderik

Reply With Quote
  #2  
Old   
Els
 
Posts: n/a

Default Re: heigth of divs - 05-11-2004 , 04:54 AM






Roderik wrote:

Quote:
Hi,

My container div should contain all the contents on the page, but it
does not appear to have the height of the complete page.
See page:

http://afstuderen.archytas.nl/verslag.php

In the end of the page, mozilla makes the white div longer than the
container. MSIE will leave some content away and cuts the page earlier.
Does anyone have an idea why this will happen?
You have given the #divContents a relative position, with
top:100px. This will put the div 100px lower than its
original position, both at the top and at the bottom.
To keep it inside it's box, use margin-top:100px instead of
position:relative and top:100px, or, add a margin-bottom of
100px (200px if you would use top:200px) to the div.

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -



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

Default Re: heigth of divs - 05-11-2004 , 06:50 AM



Els wrote:
Quote:
Roderik wrote:

Hi,

My container div should contain all the contents on the page, but it
does not appear to have the height of the complete page.
See page:

http://afstuderen.archytas.nl/verslag.php

In the end of the page, mozilla makes the white div longer than the
container. MSIE will leave some content away and cuts the page earlier.
Does anyone have an idea why this will happen?


You have given the #divContents a relative position, with top:100px.
This will put the div 100px lower than its original position, both at
the top and at the bottom.
To keep it inside it's box, use margin-top:100px instead of
position:relative and top:100px, or, add a margin-bottom of 100px (200px
if you would use top:200px) to the div.

Thanks.
Now another problem. In internet explorer the background of the
container is brown, in Mozilla the background is all black.
Probably the container has no height in Mozilla, any idea how I can
solve this, so the background of the container (with full height) is
brown in Mozilla as well?

Roderik


Reply With Quote
  #4  
Old   
Els
 
Posts: n/a

Default Re: heigth of divs - 05-11-2004 , 07:05 AM



Roderik wrote:

Quote:
Els wrote:

Roderik wrote:

http://afstuderen.archytas.nl/verslag.php

Now another problem. In internet explorer the background of the
container is brown, in Mozilla the background is all black.
Probably the container has no height in Mozilla, any idea how I can
solve this, so the background of the container (with full height) is
brown in Mozilla as well?
By adding a div or br (div is better, cause you can style
it) with clear:both just before the end of the container
div. That makes IE stretch that div past the 'clearing div'.

btw: hoe ontvangt iemand koffie via internet? ;-)(het staat
er nog twee keer ook)

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -



Reply With Quote
  #5  
Old   
John Bokma
 
Posts: n/a

Default Re: heigth of divs - 05-11-2004 , 10:06 AM



Els wrote:

Quote:
btw: hoe ontvangt iemand koffie via internet? ;-)(het staat er nog twee
keer ook)
They use a VPM

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced Perl programmer available: http://castleamber.com/


Reply With Quote
  #6  
Old   
Els
 
Posts: n/a

Default Re: heigth of divs - 05-11-2004 , 11:15 AM



John Bokma wrote:

Quote:
Els wrote:

btw: hoe ontvangt iemand koffie via internet? ;-)(het staat er nog
twee keer ook)

They use a VPM
I give up. What's a VPM?
(heb trouwens inmiddels het artikel nader bekeken, Roderik,
dus ik snap het nu - hoewel ik het eerst nog moet zien
werken irl ;-))

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -



Reply With Quote
  #7  
Old   
AT
 
Posts: n/a

Default Re: heigth of divs - 05-13-2004 , 02:45 AM



Els <els.aNOSPAM (AT) tiscali (DOT) nl> wrote

Quote:
You have given the #divContents a relative position, with
top:100px. This will put the div 100px lower than its
original position, both at the top and at the bottom.
To keep it inside it's box, use margin-top:100px instead of
position:relative and top:100px, or, add a margin-bottom of
100px (200px if you would use top:200px) to the div.
Thanks Els... Your solution helped me to solve a totally different
problem of mine..

Regards,
Rithish.


Reply With Quote
  #8  
Old   
Els
 
Posts: n/a

Default Re: heigth of divs - 05-13-2004 , 03:45 AM



Rithish wrote:
Quote:
Els <els.aNOSPAM (AT) tiscali (DOT) nl> wrote


You have given the #divContents a relative position, with
top:100px. This will put the div 100px lower than its
original position, both at the top and at the bottom.
To keep it inside it's box, use margin-top:100px instead of
position:relative and top:100px, or, add a margin-bottom of
100px (200px if you would use top:200px) to the div.

Thanks Els... Your solution helped me to solve a totally different
problem of mine..
Care to say what it was?
(curiosity only kills cats, not me ;-) )

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -



Reply With Quote
  #9  
Old   
AT
 
Posts: n/a

Default Re: heigth of divs - 05-15-2004 , 02:02 AM



Els <els.aNOSPAM (AT) tiscali (DOT) nl> wrote

Quote:
Rithish wrote:
Els <els.aNOSPAM (AT) tiscali (DOT) nl> wrote


You have given the #divContents a relative position, with
top:100px. This will put the div 100px lower than its
original position, both at the top and at the bottom.
To keep it inside it's box, use margin-top:100px instead of
position:relative and top:100px, or, add a margin-bottom of
100px (200px if you would use top:200px) to the div.

Thanks Els... Your solution helped me to solve a totally different
problem of mine..

Care to say what it was?
(curiosity only kills cats, not me ;-) )
Sure Els, why not?? If curiosity were to kill more than cats, then
most people out here would be dead by now !! ;D


http://groups.google.co.in/groups?q=... e.com&rnum=3



Regards,
Rithish.


Reply With Quote
  #10  
Old   
Els
 
Posts: n/a

Default Re: heigth of divs - 05-15-2004 , 03:28 AM



Rithish wrote:

Quote:
Thanks Els... Your solution helped me to solve a totally different
problem of mine..

Care to say what it was?
(curiosity only kills cats, not me ;-) )

Sure Els, why not?? If curiosity were to kill more than cats, then
most people out here would be dead by now !! ;D

http://groups.google.co.in/groups?q=... e.com&rnum=3
I remember seeing that message and subsequent thread, but I
found it rather complicated. Glad that such a simple thing
as my solution helped solve that. ;-)

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -



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 - 2009, Jelsoft Enterprises Ltd.