开发者

TinySlideShow; FireFox Problem

开发者 https://www.devze.com 2023-03-29 04:17 出处:网络
I have a problem with my TinySlider when I look at it in FireFox. The problem is that the image is half way inside the slider area and half way out to the left. It\'s pretty annoying and when I fixed

I have a problem with my TinySlider when I look at it in FireFox. The problem is that the image is half way inside the slider area and half way out to the left. It's pretty annoying and when I fixed it in firefox, it broke in the other browsers.

Here's the Slider HTML code:

    <div id="FrontPageSlideshow">
    <ul id="slideshow">
            <li>
                <h3>TinySlideshow v1</h3>
                <span>assets/imgs/photos/1.jpg</span>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ut urna. Mauris nulla. Donec nec mauris. Proin nulla dolor, bibendum et, dapibus in, euismod ut, felis.</p>
                <img class="thumber" src="assets/imgs/thumbnails/1.jpg" alt="" />
            </li>
            <li>
                <h3>Sea Turtle</h3>
                <span>assets/imgs/photos/2.jpg</span>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ut urna. Mauris nulla. Donec nec mauris. Proin nulla dolor, bibendum et, dapibus in, euismod ut, felis.</p>
                <img class="thumber" src="assets/imgs/thumbnails/2.jpg" alt="" />
            </li>
            <li>
开发者_StackOverflow            <h3>Red Coral</h3>
                <span>assets/imgs/photos/3.jpg</span>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ut urna. Mauris nulla. Donec nec mauris. Proin nulla dolor, bibendum et, dapibus in, euismod ut, felis.</p>
                <img class="thumber" src="assets/imgs/thumbnails/3.jpg" alt="" />
            </li>
            <li>
                <h3>Coral Reef</h3>
                <span>assets/imgs/photos/4.jpg</span>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ut urna. Mauris nulla. Donec nec mauris. Proin nulla dolor, bibendum et, dapibus in, euismod ut, felis.</p>
                <img class="thumber" src="assets/imgs/thumbnails/4.jpg" alt="" />
            </li>
            <li>
                <h3>Blue Fish</h3>
                <span>assets/imgs/photos/5.jpg</span>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ut urna. Mauris nulla. Donec nec mauris. Proin nulla dolor, bibendum et, dapibus in, euismod ut, felis.</p>
                <img class="thumber" src="assets/imgs/thumbnails/5.jpg" alt="" />
            </li>
            <li>
                <h3>TinySlideshow v.2</h3>
                <span>assets/imgs/photos/6.jpg</span>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ut urna. Mauris nulla. Donec nec mauris. Proin nulla dolor, bibendum et, dapibus in, euismod ut, felis.</p>
                <img class="thumber" src="assets/imgs/thumbnails/6.jpg" alt="" />
            </li>
            <li>
                <h3>Small Fish</h3>
                <span>assets/imgs/photos/8.jpg</span>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ut urna. Mauris nulla. Donec nec mauris. Proin nulla dolor, bibendum et, dapibus in, euismod ut, felis.</p>
                <img class="thumber" src="assets/imgs/thumbnails/8.jpg" alt="" />
            </li>
        </ul>
        <div id="wrapper">
            <div id="fullsize">
                <div id="imgprev" class="imgnav" title="Previous Image"></div>
                <div id="imglink"></div>
                <div id="imgnext" class="imgnav" title="Next Image"></div>
                <div id="image"></div>
                <div id="information">
                    <h3></h3>
                    <p></p>
                </div>
            </div>
            <div id="thumbnails">
                <div id="slideleft" title="Slide Left"></div>
                <div id="slidearea">
                    <div id="slider"></div>
                </div>
                <div id="slideright" title="Slide Right"></div>
            </div>
        </div>
    <script type="text/javascript" src="js/compressed.js"></script>
    <script type="text/javascript">
        $('slideshow').style.display='none';
        $('wrapper').style.display='block';
        var slideshow=new TINY.slideshow("slideshow");
        window.onload=function(){
            slideshow.auto=true;
            slideshow.speed=5;
            slideshow.link="linkhover";
            slideshow.info="information";
            slideshow.thumbs="slider";
            slideshow.left="slideleft";
            slideshow.right="slideright";
            slideshow.scrollSpeed=4;
            slideshow.spacing=5;
            slideshow.active="#fff";
            slideshow.init("slideshow","image","imgprev","imgnext","imglink");
        }
    </script>
  </div>
  </div>

Here's the CSS Of the slider:

#slideshow {list-style:none; color:#fff}
#slideshow span {display:none}
#wrapper {width:506px; margin:0px 0px 30px 30px; display:none}
#wrapper * {margin:0; padding:0}
#fullsize {position:relative; width:500px; height:300px; padding:2px; border:1px solid #ccc; background:#000}
#information {position:absolute; bottom:0; width:500px; height:0; background:#000; color:#fff; overflow:hidden; z-index:200; opacity:.7; filter:alpha(opacity=70)}
#information h3 {padding:4px 8px 3px; font-size:14px}
#information p {padding:0 8px 8px}
#image {width:auto;}
#image img {position:absolute; z-index:25; width:auto}
.imgnav {position:absolute; width:25%; height:306px; cursor:pointer; z-index:150}
#imgprev {left:0; background:url(../assets/imgs/images/left.gif) left center no-repeat}
#imgnext {right:0; background:url(../assets/imgs/images/right.gif) right center no-repeat}
#imglink {position:absolute; height:306px; width:100%; z-index:100; opacity:.4; filter:alpha(opacity=40)}
.linkhover {background:url(../assets/imgs/images/link.gif) center center no-repeat}
#thumbnails {margin-top:15px}
#slideleft {float:left; width:20px; height:81px; background:url(../assets/imgs/images/scroll-left.gif) center center no-repeat; background-color:#222}
#slideleft:hover {background-color:#333}
#slideright {float:right; width:20px; height:81px; background:#222 url(../assets/imgs/images/scroll-right.gif) center center no-repeat}
#slideright:hover {background-color:#333}
#slidearea {float:left; position:relative; width:456px; margin-left:5px; height:81px; overflow:hidden}
#slider {position:absolute; left:0; height:50px}
#slider img {cursor:pointer; border:1px solid #666; padding:2px}


#image img {position:absolute; z-index:25; width:auto}

This might be your problem. I think you're telling your images to position themselves absolutely within the #image div. But you haven't given them "left:x;" or "top:y;" coordinates yet.

You could try this:

#image img {position:absolute; left:0; top:0; z-index:25; width:auto}

It might force your pictures to align top and left in the parent div. If that doesn't work, then your parent div (#image) is out of alignment and you need to keep working upwards (ie: #fullsize or #wrapper).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号