我的div完美對齊。我試圖在中心div中添加一個圖像,但只要我添加圖像divs消失,圖像不顯示。 我遇到了添加圖片的問題,請有人幫忙。爲什麼我的圖片沒有顯示我的代碼有什麼問題?未在div內顯示圖像
<style>
.div_parent{
display:inline;
background-image: url('../images/image.jpg') top center no-repeat;"
}
.div_center {
width:300px;
float:left;
border-color:black;
border-style:solid;
border-width:3px;
height :700px
}
.div_right
{
background-color:#edeeef;
border-color:black;
border-style:solid;
border-width:3px;
width: 150px;
float:left;
height:100%
}
.div_left
{
background-color:#edeeef;
border-color:black;
border-style:solid;
border-width:3px;
width: 150px;
float:left;
height:100%
}
</style>
<div class="div_parent">
<div class="div_left">
<br /><br /><br /><br /><br /><br />
\t \t \t \t \t \t \t <FONT size="3" style="font-family:sans-serif ; color:red; text-align:center;" > <STRONG>Welcome to the Reporting Portal! </STRONG> </font><br />
\t \t \t \t \t \t \t <br />
\t \t \t \t \t \t <FONT size="2" style="font-family:sans-serif; text-align: left;"> \t
\t \t \t \t \t Reports on this site are available as view-only or as an Excel download. </font>
</div>
<div class="div_center">
</div>
<div class="div_right">
<br /><br /><br /><br /><br /><br />
<FONT size="3" style="font-family:sans-serif ; color:red; text-align:center;" > <STRONG> We're Here to Help! </STRONG> </font><br /><br />
\t \t \t \t \t \t \t
<FONT size="2" style="font-family:sans-serif; text-align:left;"> \t
We're friendly and available to chat. Reach out to us anytime and we'll happily answer your questions.</br><br />
Supervisors should submit requests including specific fields and search criteria to us at Report Manager</a></font>
</div>
</div>
如何做你想讓他們一致?相同的高度?一個div在另一個下方,寬度對於兩者來說都很小,並將它們左移? – KujAslani
我想讓它們對齊1 ---- 2 ----- 3兩邊各一個應該像15px一樣,中間一個應該是最寬的。 – CrazyCoder