jQuery Cycle plugin setting incorrect width
Hi, I am using the wonderful Cycle plugin and until now no problems. Here is what I have:
- <script type="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<scripttype="text/javascript src="http://photography.txpbuilders.com/js/jquery.cycle.all.min.js"></script>
And the initializing code:
- <!-- carousel --> <script type="text/javascript"> $(document).ready(function(){ $('#carousel').cycle({ fx: 'fade', speed: 'fast', timeout: 0, next: '#next', prev: '#prev' }); }); </script>
When the page is first loaded, the container div #carousel is set to:
- <div id="carousel" class="clearfix" style="position: relative; ">
Which is fine, and all works well. However on page reload the style is changed and this breaks my CSS:
- <div id="carousel" class="clearfix" style="position: relative; width: 640px; height: 562px; ">
I am not sure my CSS is wrong - but here it is anyway. Hope someone can help with this - thanks!
- #carousel {
- width: 960px;
- background: transparent;
- }
- #carousel .slide {
- width: 960px;
- padding: 0;
- }
- #carousel .slide {
- margin: 0;
- }
- #carousel .slide img {
- float: left;
- width: 640px;
- height: 480px;
- padding: 0;
- }
- #carousel .details {
- float: right;
- width: 200px;
- padding: 20px;
- background: #eee;
- opacity: 0.5;
- }