2013-12-07 22 views
0

我真的很感激,如果有人可以看看hindilyricsall.blogspot.com,並可以找出爲什麼導航欄下方的傳送帶中的下一個箭頭沒有對齊,並在轉盤下方移動? 相關代碼:部落格對齊問題在一個blogspot模板

<div id='carousel'> 
<div id='previous_button'/> 
<div class='container'> 
<script> 
document.write(&quot; &lt;script src=\&quot;/feeds/posts/default?max-results=&quot;+numposts1+&quot;&amp;orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts\&quot;&gt;&lt;\/script&gt;&quot;); 
</script> 
</div> 
    <div id='next_button'/> 
    <div style='clear:both;'/> 

</div> 

的CSS:

#carousel{width:100%;height:240px;position:relative;display:block;} 
#carousel .container{position:relative;left:25px;margin-right:25px;width:930px;height:240px;overflow:hidden} 
#carousel #previous_button{position:absolute;width:25px;height:240px;background:url(http://3.bp.blogspot.com/-SFH7pfuPOg4/UAVZimY-OuI/AAAAAAAAHqE/MOKZ4nE0EFM/s1600/prev.png) center;z-index:100;cursor:pointer;} 
#carousel #next_button{position:absolute;right:0;width:25px;height:240px;background:url(http://4.bp.blogspot.com/-pFR58sZNzCo/UAVZh9I72lI/AAAAAAAAHp8/JTIiHJfsqHA/s1600/next.png) center;z-index:100;cursor:pointer;} 
#carousel #next_button:hover,#carousel #previous_button:hover{filter:alpha(opacity=70);opacity:.7} 
#carousel ul li:hover{background:#111} 
#carousel ul{width:100000px;position:relative;margin-top:10px} 
#carousel ul li{background:#272727;display:inline;float:left;text-align:center;font:12px Oswald;line-height:1.3em;width:130px;height:200px;margin:0 1px 6px 9px;padding:8px 5px 6px;border:1px solid #323232;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;} 
#carousel ul li a.slider_title{color:#ccc;display:block;margin-top:6px} 
#carousel ul li a.slider_title:hover{color:#fec700} 

回答

1

如果這個代碼添加到你的CSS文件

#carousel .container { 
    float:left; 
} 

箭頭將與caroussel

+0

謝謝!這樣做了。 –

0

有對齊是HTML結構的一些問題,但通過添加float:留給.container應該修復你的p roblem

由於div是塊級元素並佔用整個空間,因此箭頭將進入下一行。

.container { 
    float:left; 
} 
+0

你能告訴html結構有什麼問題嗎? –

+0

.carousel是相對定位的,因此通過放置箭頭和容器絕對可以實現解決方案或者您可以採用浮動方法將這些元素浮動到左側。 –

+0

是和內聯JS和內聯樣式也被使用。它很好,如果你可以將它們分開並保存在文件中。 –