|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
table inside cell of another table
html ------ Code:
<table id="main" border="1" cellpadding="0"> <tr> <td id="left"> <table border="1" cellpadding="0" id="tbl1"> <tr><td id="cell1"></td></tr> <tr><td id="cell2"></td></tr> </table> </td> <td id="middle"></td> <td id="right"></td> </tr> </table> css ----- Code:
#main{width:100%;} /*main table*/
#left{vertical-align:top;width:35px;height:100%;}
#tbl1{width:100%;height:100%;} /*nested table streched to occupy #left*/
#cell1{height:100px; background-position:top left;
background-repeat:no-repeat; background-image:url(images/picr.png)} /*height in pixels*/
#cell2{background-repeat:repeat-y; background-position:top left;
background-image:url(images/back.png)}
#middle{height:200px;}
#right{width:35px;}
i'm putting a fixed size picture as background inside #cell1 and i put another tiled background into #cell2. the thing is that despite i fix height:100% for #tbl1, the table doesn't strech to occupy #left completly. i checked this with seting #left's background to red and #tbl1's to yellow... what i see is that #left cell colored completly in red while #tbl1 is not... the pictures says it all: ![]() |
|
#2
|
|||
|
|||
|
RE: table inside cell of another table
i'll start fresh (just forget everything above this post)
i wrote another test code and picture along with it explaining the problem... ![]() Code:
<table id="maintable" border="1" cellpadding="0" cellspacing="2" width="50%"> <tr><td id="parent" width="150"> <table id="nested" border="1" cellpadding="0" cellspacing="2" height="100%"> <tr><td id="topcell" height="80" width="100"></td></tr> <tr><td id="bottomcell"> </td></tr> </table> </td> <td height="300">right cell</td></tr> </table> css ---- Code:
#parent{background-color:#f00;vertical-align:top}
#topcell{background-color:#00f;}
#bottomcell{background-color:#0f0;}
yellow line on picture is what i'm trying to achieve |
|
#3
|
|||
|
|||
|
RE: table inside cell of another table
ok i give up
going to use absolute positioning thank you to all of you who tried to help |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > table inside cell of another table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|