無論我輸入的邊距是多少,文本「步驟1」都不是以圖像爲中心。我沒有任何地方上傳atm,但繼承人一個屏幕抓取: http://i.imgur.com/fWrQp.png故障排列分區
我想文本與圖像的中心對齊。
有什麼建議嗎?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css" media="screen">
/*<![CDATA[*/
<!--
div.basic{
margin-left: auto ;
margin-right: auto ;
border-style:solid;
width:750px;
}
div.top-level {
/*background-color: #FBEC5D;*/
border-style:solid;
border-color:#0000FF;
margin: 20px 20px 0px 20px;
background: url(light_pink_bg.gif) repeat-y 9px;
}
div.content{
background-color: #EEEEEE;
border-style: dotted;
margin: 5px 5px 5px 48px;
}
.arrow_down
{
background: url(arrow_down.gif) no-repeat 32px 0;
height: 17px;
}
.top-header
{
display: inline;
margin: 0px 0px 30px 25px;
}
.top-text
{
display: inline;
margin: 0px 0px 50px 0px;
}
.step-number
{
display: inline;
height:100%;
}
.active_cnt
{
background: url(light_pink_bg.gif) repeat-y 9px;
}
-->
/*]]>*/
</style>
<title></title>
</head>
<body>
<div class="basic">
<div class="top-level">
<div class="step-number">
<img src="1.png" alt ="1" height="45px" width="45px" />
</div>
<div class="top-text">Step 1</div>
<div class="content">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. <br />
Curabitur a odio lacus. Nam porttitor odio nec quam suscipit rutrum. <br />
Etiam velit felis, bibendum et tincidunt et, porta eget neque. <br />
Proin id sapien nec risus congue malesuada vitae ut lorem.<br />
Proin diam eros, porttitor id rutrum quis, tempus hendrerit nisl.
</p>
</div>
</div>
<div class="arrow_down">
</div>
</div>
</body>
</html>
我不明白。你在說左邊有1和粉紅下箭頭的圖像嗎? – Catfish 2010-02-19 18:49:46