tags:

views:

44

answers:

3

How to get that div id="left" has height equal like divs right_up and right_down together ?

    <div style="width: 1050px;">
    <div id="left" style="width: 80%;height:80%;min-height: 80%;float: left; background-color: blueviolet;">a</div>
    <div id="right_up" style="width: 20%;height:40%;min-height: 40%; float: left; background-color: yellow;">
        <p>some text using paragraphs</p><p>some text</p>
        <ul>
            <li>some text using lists</li>
            <li>some text</li>
        </ul>
    </div>
    <div id="right_down" style="width: 20%;min-height: 40%;height:40%; float: left; background-color: aqua; margin-left: 80%;">
        <p>some text using paragraphs</p><p>some text</p>
        <ul>
            <li>some text using lists</li>
            <li>some text</li>
        </ul>
    </div>
</div>

+1  A: 

to me works removing

margin-left: 80%;

from div id="right_down"

Dalen
firefox and chrome, right now i cannot test it on IE bucause i'm on a ubuntu machine
Dalen
I tried your solution in mozilla and chrome. It doesn't work .
Jane
It works for 2 other people, but not you? I'm guessing you have some other CSS that's interfering.
jnpcl
@Dalen and myself: This only works in Quirks Mode. :P
jnpcl
A: 

UPDATED
-- Fix: Using XHTML 1.0 Strict DTD
-- Fix: Background fills to height of div#wrapper
-- Broke: No longer adjusts to browser height

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<title>div-height</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />

<style type="text/css">
    div#wrapper {
        width: 1050px;
        height: 80%;
        min-height: 80%;
        background-color: blueviolet;
        overflow: auto;
    }
    div#left {
        width: 80%;
        float: left;
    }
    div#right_up, div#right_down {
        width: 20%;
        height: 40%;
        min-height: 40%;
        float: right;
    }
    div#right_up {
        background-color: yellow;
    }
    div#right_down {
        clear: right;
        background-color: aqua;
    }
    div.clearfix {
        clear: both;
    }
</style>

</head>
<body>

<div id="wrapper">
    <div id="left">a</div>
    <div id="right_up">
        <p>some text using paragraphs</p>
        <p>some text</p>
        <ul>
            <li>some text using lists</li>
            <li>some text</li>
        </ul>
    </div>
    <div id="right_down">
        <p>some text using paragraphs</p>
        <p>some text</p>
        <ul>
            <li>some text using lists</li>
            <li>some text</li>
        </ul>
    </div>
    <div class="clearfix"></div>
</div>

</body>
</html>
jnpcl
How does this .css make the div#left full height?
ghoppe
@ghoppe: no idea, the only thing I did was separate the CSS from the HTML.
jnpcl
This doesn't work
Jane
Works just fine in FF3.6.3 --> http://i55.tinypic.com/34qp6s7.jpg
jnpcl
This is what I need ! Can you give me please all html ?
Jane
That is the exact code that I'm loading into my browser.
jnpcl
Problem is when i put tags like doctype, html and head, then is different ! Do I need that tags, for load jquery and other javascript ? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
Jane
@ jnpcl Maybe I put wrong DTD ? In chrome and mozilla and chrome looks fine without doctyoe, but with doctype doesn't. In explorer doesn't look at all ok. Any help, pls ?
Jane
You're right, it doesn't work with the `DOCTYPE` set to `XHTML 1.0 Strict`. I'll try to find a fix.
jnpcl
+1  A: 

Cheat.

ghoppe