Reply
height:100% issue
Old 04-05-2008, 12:25 AM height:100% issue
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
First off, here's the relevant CSS (cutting out the parts that have only to do with color etc)
Code:
body {margin:0;padding:0;height:100%;}
html{margin:0;padding:0;height:100%;}
div#header{position:relative;}
div#container{margin:0 auto;height:100%;}
div#content{float:left;width:80%;}
div#navigation{float:right;width:20%;height:100%;}
As for the trimmed down snippet of code used
HTML Code:
<body>
<div id="container">
    <div id="header">
        <h1>Contact Book</h1><hr>
    </div>
    <div id="content">
        <div class="female">
            <h2><a class="female" name="1">Jane Doe</a></h2>
        </div>
    </div>
    <div id="navigation">
        <p><a href="#1">Jane Doe</a></p>
    </div>
</div>
</body>

That's a screenshot of how the navigation pane looks, what I want is for it to be extened all the way to the bottom with everything else.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
When You Register, These Ads Go Away!
Old 04-05-2008, 04:32 AM Re: height:100% issue
chrishirst's Avatar
Super Moderator

Posts: 13,576
Location: Blackpool. UK
maybe reading the "stickies" would be a help

http://www.webmaster-talk.com/css-fo...l-browser.html

they are at the very top of the forum for a reason.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-05-2008, 11:41 AM Re: height:100% issue
Capt Quirk's Avatar
Extreme Talker

Posts: 202
Location: Flordidian
Ok, if after reading the sticky, and reading the tutorial, my div still doesn't extend fully, what is next? I thought that is why this board is here, to answer questions and help.
Capt Quirk is offline
Reply With Quote
View Public Profile
 
Old 04-05-2008, 11:59 AM Re: height:100% issue
serandfae's Avatar
Bank holdup redefined....

Posts: 4,705
Name: Tim Daily
Location: Apex, NC, US, Sol 3
Then you post a link to your code and we try to help. The stickies are there for common problems to allow us to better tackle the, uh, quirkier ones. That is, they've taken the time to research it so you don't have to, so take advantage of it.

tim
__________________
Springs hop eternal in the hearts of the eccentric....
E-GADS! (Evil Genius' Art and Design Studio) http://bellsouthpwp2.net/j/a/jam331
serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Old 04-05-2008, 12:20 PM Re: height:100% issue
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
The page fills the browser (I used that sticky to learn that) but for some reason this one div just doesn't want to extend all the way, it does extend partially below the bottom of the viewscreen but only by the amount that the toolbars take up. That's why I came here, because I am confused as to what is causing this since I thought it would go the whole way down (without the height:100% it only extends to the bottom of the content of the div and doesn't extend down to where it currently does, which is 100% of the viewscreen)
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Old 04-05-2008, 12:35 PM Re: height:100% issue
serandfae's Avatar
Bank holdup redefined....

Posts: 4,705
Name: Tim Daily
Location: Apex, NC, US, Sol 3
I would take height:100% off of html and body. It's sufficient to have it on container. Keep in mind that the divs nested within it will take up 100% height of the parent div. Do you have this uploaded somewhere to take a more in-depth look?

tim
__________________
Springs hop eternal in the hearts of the eccentric....
E-GADS! (Evil Genius' Art and Design Studio) http://bellsouthpwp2.net/j/a/jam331
serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Old 04-05-2008, 05:30 PM Re: height:100% issue
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
http://arenlor.com/test/
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Old 04-05-2008, 06:25 PM Re: height:100% issue
bakerc's Avatar
Penguins on toast

Posts: 1,811
Name: carl
Location: UK
This might not be what you need but can you not set the height of the of the Navigation to around 2100px? it should give the look you need but not sure if its the best (clean) way to do it.
__________________
adverse credit mortgage specialist, bad credit mortgage resources, credit repair and debt consolidation | debt management mortgage solutions.

Last edited by bakerc : 04-05-2008 at 06:54 PM. Reason: poss
bakerc is offline
Reply With Quote
View Public Profile Visit bakerc's homepage!
 
Old 04-07-2008, 07:17 PM Re: height:100% issue
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK
This will work with position:absolute; but I haven't seen a website without absolute positioning on 100% divs, even though its not god to have absolute positioning.
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-07-2008, 09:13 PM Re: height:100% issue
bakerc's Avatar
Penguins on toast

Posts: 1,811
Name: carl
Location: UK
The div he wants to extend to the bottom of the page if floated, I may be showing my lack of knowledge but I thought the only way to do this was to set a height as a floated div is outside normal document flow and would not react with others divs (if that makes any sense)
__________________
adverse credit mortgage specialist, bad credit mortgage resources, credit repair and debt consolidation | debt management mortgage solutions.
bakerc is offline
Reply With Quote
View Public Profile Visit bakerc's homepage!
 
Old 04-08-2008, 12:31 AM Re: height:100% issue
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
So how are you suggesting I change this?
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Old 04-08-2008, 01:01 AM Re: height:100% issue
bakerc's Avatar
Penguins on toast

Posts: 1,811
Name: carl
Location: UK
Just clicked on the link and it looks like you have sorted it
__________________
adverse credit mortgage specialist, bad credit mortgage resources, credit repair and debt consolidation | debt management mortgage solutions.
bakerc is offline
Reply With Quote
View Public Profile Visit bakerc's homepage!
 
Old 04-08-2008, 05:04 AM Re: height:100% issue
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
It's not working for me, what browser are you using?
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Old 04-08-2008, 05:38 AM Re: height:100% issue
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK
Try position:absolute; of the div you want to have 100% height. Just want to see if my theory is right
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-08-2008, 07:09 AM Re: height:100% issue
bakerc's Avatar
Penguins on toast

Posts: 1,811
Name: carl
Location: UK
Quote:
It's not working for me, what browser are you using?
IE7

Quote:
Try position:absolute; of the div you want to have 100% height. Just want to see if my theory is right
If that doesn't work, just set the height on the Navigation div (which is floated right) to the height of the page (approx 2100px) or set the background the same colour as the body background which should give the look your going for.
__________________
adverse credit mortgage specialist, bad credit mortgage resources, credit repair and debt consolidation | debt management mortgage solutions.

Last edited by bakerc : 04-08-2008 at 07:11 AM.
bakerc is offline
Reply With Quote
View Public Profile Visit bakerc's homepage!
 
Old 04-08-2008, 07:16 AM Re: height:100% issue
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK
Bad idea, what if the content of the page grows, that means he'd have to change the size for every page.
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-08-2008, 09:03 AM Re: height:100% issue
bakerc's Avatar
Penguins on toast

Posts: 1,811
Name: carl
Location: UK
If he uses the same colour for the background it wouldn't but I do know what you mean about setting the height.
How should he do this with a floated div then? like I said in a previous post I may be showing my lack of knowledge - I would be grateful if you could tell me (and the OP) a better way to do this with a floated div.
__________________
adverse credit mortgage specialist, bad credit mortgage resources, credit repair and debt consolidation | debt management mortgage solutions.
bakerc is offline
Reply With Quote
View Public Profile Visit bakerc's homepage!
 
Old 04-08-2008, 09:26 AM Re: height:100% issue
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK