2009-08-06 6 views
0

CSSコード:どのように左のセルに画像を置くのですか?

#wrapper {margin:auto; width:100%;} 
.container {display: table; width:100%;} 
.row {display: table-row;} 
.cell {display: table-cell; height: 100px;} 
#fixed {width:150px;} 

HTMLコード:

<div id="wrapper"> 
<div class="container"> 
<div class="row"> 
<div class="cell" id="fixed">left cell</div> 
<div class="cell">right cell</div> 
</div> 
</div> 
</div> 

私は左のセルに画像を置くだろうか?画像が幅150ピクセル、高さ100ピクセルであるとします。

答えて

0
<div class="cell" id="fixed"><img src="path/to/image.ext" alt="my picture" style="width:100px; height:100px"></div> 

HTML Images

1

あなたはБлядьэтонето、CSSで

.row { display:table:row ; background:url('images/myImage.png') no-repeat 0px 0px; } 
HTMLで

<img src="images/myImage.png" /> 
+0

を意味している場合! –