Div aligning issue in a blogspot template

201 views Asked by At

I would really appreciate if someone can have a look at hindilyricsall.blogspot.com and can find out why the next arrow in the carousel below the navbar is not aligned and is shifted below the carousel? Related code:

<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>

The 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}
2

There are 2 answers

0
web-tiki On BEST ANSWER

If you add this code to your css file

#carousel .container {
    float:left;
}

The arrow will be aligned with the caroussel

4
Anil Namde On

There are some issues with HTML structuring but by adding float:left to .container should fix your problem

Arrow is coming on next line as div is block level element and takes entire space.

.container {
    float:left;
}