2012-12-27 90 views
0

確切的div標籤應該放在右側,但這隻在firefox中放置在左側。 我的頁面看起來很好,在任何其他瀏覽器,但在Firefox頁面看起來目前存在的我的代碼是頁面顯示問題

<div style="width: 400px; height: 280px; float:left; margin-left: 15px;margin-top: 3px"> 

    <div class="slider-wrap"> 
     <div id="main-photo-slider" class="csw"> 
      <div class="panelContainer"> 

       <div class="panel" title="Panel 1"> 
        <div class="wrapper"> 
         <img src="image/forslider/slider1.jpg" alt="" style="border-style: solid; height: 266px; width: 392px;"/> 
        </div> 
       </div> 
       <div class="panel" title="Panel 2"> 
        <div class="wrapper"> 
         <img src="image/forslider/slider2.jpg" alt="" style="border-style: solid; height: 266px; width: 392px;"/> 

        </div> 
       </div>  
       <div class="panel" title="Panel 3"> 
        <div class="wrapper"> 
         <img src="image/forslider/slider3.jpg" alt="" style="border-style: solid; height: 266px; width: 392px;"/> 
        </div> 
       </div> 
       <div class="panel" title="Panel 4"> 
        <div class="wrapper"> 
         <img src="image/forslider/slider4.jpg" alt="" style="border-style: solid; height: 266px; width: 392px;"/> 

        </div> 
       </div> 
       <div class="panel" title="Panel 5"> 
        <div class="wrapper"> 
         <img src="image/forslider/slider5.jpg" alt="" style="border-style: solid; height: 266px; width: 392px;"/> 

        </div> 
       </div> 
       <div class="panel" title="Panel 6"> 
        <div class="wrapper"> 
         <img src="image/forslider/slider6.jpg" alt="" style="border-style: solid; height: 266px; width: 392px;"/> 
        </div> 
       </div> 

      </div> 
     </div> 
    </div> 
</div> 

div標籤必須放置在右側。

+0

更改爲float:right;使該bug的工作示例,並上傳到某個地方。 – Webars

回答

0

嘗試從float:left;在第一個div

0

嘗試這樣:

<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<title>align</title> 
<style type="text/css"> 
body { 
    margin: 0px; 
    padding: 0px; 
} 
#right { 
    text-align: left; 
    width: 200px; 
    position:absolute; 
    right:1%; 
    background-color: blue; 
} 
</style> 
</head> 
<body> 
    <div id="right">Some Text</div>  
</body> 
</html>