2016-12-14 117 views
-4

我試圖在屏幕左側放置一個div,我也試圖使它適用於任何屏幕分辨率和瀏覽器。可以告訴我我做錯了什麼嗎?

這裏是我下面的代碼: -

#Biography { 
 
    background: #ffffff ; 
 
    text-align: center ; 
 
    text-transform: uppercase ; 
 
    color: #fff ; 
 
    padding: 5em 0; 
 
    width: 100%; 
 
    font-family: 'Conv_Lato-Regular',Sans-Serif; 
 
    margin: 0; 
 
} 
 

 
#info { 
 
    left: -10px; 
 
    float: left; 
 
    top: -80px; 
 
    position: relative; 
 
    color: #000; 
 
}
<div id="Biography"> 
 

 
    <div class="container"> 
 
     <div class="tittle"> 
 
    
 
     </div> 
 

 
     <div id="info"> 
 
      <div class="col-md-8"> 
 
       <div class=" wow bounceInDown" data-wow-delay="0.5s"> 
 
        <div class="view view-fifth" style="height: 20%"> 
 
         <img src="images/Dan.jpeg" alt="" style="height:80%; width:100%"> 
 
         <h4> NAME</h4> 
 
         <h5> sean</h5> 
 
         <h4> OCCUPATION</h4> 
 
         <h5> Computer Programmer,Software Developer,Student</h5> 
 
     
 
        </div> 
 
       </div> 
 
      </div> 
 
    
 
     </div>

的問題是,#info DIV不完全左側。我不知道我做錯了什麼。

+0

這是定位在我的屏幕的左側。你在看什麼? – sol

+0

請澄清您的具體問題或添加其他詳細信息,以突出顯示您的需要。正如目前所寫,很難確切地說出你在問什麼。 –

+0

info div並不完全在左邊 – slim

回答

0

在這種情況下,您需要使用'position:absolute'而不是'position:relative'來完全位於左側。

#info { 
position: absolute; 
left: 0px; 
top: 0px;  
color: #000; 

}

相關問題