-4

I have this layout created in css: http://snag.gy/sJy7w.jpg

The menu div on the left will not stretch. The green area should be filled with the menu but it won't.

JSfiddle: jsfiddle.net/DMkXF

The 'menu div' on the left should stretch vertically with the 'content div'

Tetsujin no Oni
  • 7,300
  • 2
  • 29
  • 46
  • What do you mean filled with the menu? Do you mean you want the green area to wider? If so what area would you like it to be exactly? – wuno Jun 13 '14 at 15:51
  • 2
    Can you provide a [JSFiddle](http://jsfiddle.net/)? An image and some CSS is useless and we can't tell which element has which class. – Andy Jun 13 '14 at 15:52
  • What are you trying to do ? – enguerranws Jun 13 '14 at 15:52
  • The 'menu div' on the left should stretch vertically with the 'content div'. – Babak Zahedi Jun 13 '14 at 15:53
  • JSfiddle won't work because I've got a lot of php in it. – Babak Zahedi Jun 13 '14 at 15:57
  • Get the HTML from the rendered page - `View Source` ;-) – Nick R Jun 13 '14 at 16:02
  • This is useful: http://jsfiddle.net/DMkXF/ ? – Babak Zahedi Jun 13 '14 at 16:03
  • http://jsfiddle.net/DMkXF/2/ if you add `html, body { height:100% }` , `.menu { height:100%; }` and `.container { height:100% }` it should work. – Nick R Jun 13 '14 at 16:10
  • yes true, it will work, but the problem is the container height becomes too much which will put a scrollbar on the screen. I want the menu to stretch with the content div, which will never go further than the bottom of the page. I'm sorry I'm a bit vague at explaining .. – Babak Zahedi Jun 13 '14 at 16:11
  • And it works, but if I put for example 10 tables on one page, the last tables won't show because the content div is not stretching.. @NickR – Babak Zahedi Jun 13 '14 at 16:52

1 Answers1

0

check this out...i was trying this and this shows as you want, that your content is aligned with your menu as a i understand with your explanation..

<div class="container">
<table>
    <div class="header">header</div>

    <tr>
        <td>
            <div class="menu">menu</div>            
        </td>
        <td>
            <div class="content">content goes here</div>         
        </td>
    </tr>
</table>    
</div>

define a teble for me is a good way to develop and define areas...i hope helped you

MickyScion
  • 526
  • 2
  • 14