tags:

views:

28

answers:

1

I'm trying to create a 2 column layout w/ a divder inbetween the columns. My problem is w/ the divider I wish to make. I have markup like the following:

<div style="display:table">

    <!--Left Column-->
    <div class = "cell" style="min-width:200px;">            
       ...content
    </div>

    <!--Divider Column-->
    <div class="cell vr">            
        <div class="t"></div>
        <div class="b"></div>
    </div>

    <!--Right Column-->
    <div class="cell" style="width:100%;">            
       ...content
    </div>

</div>

CSS:

div.cell  { display:table-cell; overflow:hidden;vertical-align:top;}
    /*Vertical Rule*/
    .vr    {background:url(Img/vGradient.png) repeat-y; width:6px; position:relative;}  /*Vertical Rule Gradient*/
    .vr .t {background:url(Img/vGradientT.png) repeat-x; width:6px; height:50px; position:absolute; top:0;} /*Top Of Rule*/
    .vr .b {background:url(Img/vGradientB.png) repeat-x; width:6px; height:50px; position:absolute; bottom:0;} /*Bottom Of Rule*/

So I'm trying to get the middle cell to have a background image along its full height and then have the top image overlap on top of it at the top and the bottom image of the divider overlap it at the bottom of the cell.

Haven't been able to make it work though. Can this be done?

UPDATE: This works...but it forces me to assign a height rather than have the divider be as tall as the table needs to be....

<div class="cell">        
        <div class="vr" style="height:300px">
            <div class="t"></div>
            <div class="b"></div>
        </div>
    </div>
+1  A: 

try to set height for .vr class, sometimes not having height defined couses problems.

   .vr    {background:url(Img/vGradient.png) repeat-y; width:6px;  height:300px; position:relative;}  /*Vertical Rule Gradient*/ 
Dobiatowski
Yes, you are correct. Check my update. I was hoping to get it to stretch however it may not be possible w/ CSS.
you are facing the problem simmilat to "css div round corners". in google there is a lot of stuff hacking this.
Dobiatowski