div cssレイアウトがテーブル効果

1158 ワード

<div style="border:solid 1px #000; width:200px; height:100px;">
	<div style="float:left; width:50%; height:100px;">
       <div style="width:100%;height:50%;"> 1 </div>
          <div style="width:100%;height:50%;">
            <div style="float:left; width:90%;height:100%; background-color:#36C; position:relative; "></div>
            <div style="float:right; width:5px;height:100%; display:block; background-color:#0F0; position:relative;">g</div>
       </div>
  	</div> 
  <div style="float:right; width:50%; height:100px; ">
         <div style="width:100%;height:70%;"> 1 </div>
          <div style="width:100%;height:30%;">
            <div style="float:left; width:90%;height:100%; background-color:#36C; position:relative; "></div>
            <div style="float:right; width:5px;height:100%; display:block; background-color:#0F0; position:relative;">g</div>
       </div>
  
  </div>
</div>