Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Responsive Slider Plugin-css, Slider troubles

Hey there, I'm on the last lesson for the section, but the slider won't display the images, it still shows the two buttons below where the images would be, I was wondering if there is anything else that may cause this besides the examples in the video. Here is the code as well, though its mostly the places with wmuslider that I've been working on.

<style type="text/css">
    .wmuSlider {
        position: relative;
        overflow: hidden;
        height:310px;
    }
    .wmuSlider .wmuSliderWrapper {
        display: none;
    }
    .wmuSlider .wmuSliderWrapper article {
        position: relative;
        height:310px;
    }
    .wmuSliderPagination {
        z-index: 2;
        position: absolute;
        left: 48%;
        bottom: 10px;
    }
    .wmuSliderPagination li {
        float: left;
        margin: 0 5px 0 0;
        list-style-type: none;
    }
    .wmuSliderPagination a {
        display: block;
        text-indent: -9999px;
        width: 10px;
        height: 10px;
        background: #4FB69F;
        border-radius: 5px;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
    }
    .wmuSliderPagination a.wmuActive {
        background: #349C79;
    }
        @media screen and (max-width: 650px) {
            .wmuSlider {
                display:none;
            }
        }
</style>

Also the other section: <script src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.wmuSlider.min.js"></script> <script src="external/matchmedia.js"></script> <script src="picturefill.js"></script>

<script src="jquery.fitvids.js"></script>
 <script src="jquery.fittext.js"></script>

<script>

      $("#featured-video").fitVids();
      setTimeout(function(){
        $(".fittext").fitText(2.2);
      }, 2);

    var options = {navigationControl: false, animation: "slide"};
    $(".wmuSlider").wmuSlider(options);
</script>

Thanks.

Can you post your HTML too?

4 Answers

I think I may have been experiencing the same issue as you. I removed this part of the code from the CSS and it seemed to fix it.

.wmuSlider .wmuSliderWrapper {
    display: none;
}

Try changing the display from none to block

``` .wmuSlider .wmuSliderWrapper { display: block; }

It worked for me.

Here you go the index.html:

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Smells Like Bakin' Cupcake Company</title>
<link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
<link rel="stylesheet" href="css/grid.css" type="text/css" media="screen">
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
<link href='http://fonts.googleapis.com/css?family=Nunito:400,300,700' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale = 1.0">
<style type="text/css">
    .wmuSlider {
        position: relative;
        overflow: hidden;
        height:310px;
    }
    .wmuSlider .wmuSliderWrapper {
        display: none;
    }
    .wmuSlider .wmuSliderWrapper article {
        position: relative;
        height:310px;
    }
    .wmuSliderPagination {
        z-index: 2;
        position: absolute;
        left: 48%;
        bottom: 10px;
    }
    .wmuSliderPagination li {
        float: left;
        margin: 0 5px 0 0;
        list-style-type: none;
    }
    .wmuSliderPagination a {
        display: block;
        text-indent: -9999px;
        width: 10px;
        height: 10px;
        background: #4FB69F;
        border-radius: 5px;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
    }
    .wmuSliderPagination a.wmuActive {
        background: #349C79;
    }
        @media screen and (max-width: 650px) {
            .wmuSlider {
                display:none;
            }
        }
</style>

</head>

<body>

<div class="container clearfix">
    <div id="logo" class="grid_4">

        <object data="img/logo.svg" type="image/svg+xml" class="logo">
            <!--[if lte IE 8 ]-->
              <img src="img/logo.gif" alt="Smells Like Bakin">
            <!--![endif]-->
        </object>

    </div>
    <div id="nav" class="grid_8 omega">
        <ul>
            <li class="about"><a href="#">About</a></li>
            <li class="pricing"><a href="#">Cupcakes & Prices</a></li>
            <li class="locations"><a href="#">Locations</a></li>
            <li class="contact"><a href="#">Contact Us</a></li>
        </ul>
    </div>

<!-- Intro Images -->

<div id="intro-slider" class="wmuSlider grid_12 omega">
    <div class="wmuSliderWrapper">
    <article id="intro-cupcakes" class="grid_12 omega">

        <div class="intro grid_9">
            <h1 class="fittext">Opposites really do attract, especially in our kitchen! We combine unexpected flavors that melt together to create ironically delicious desserts. </h1>
            <p><a href="pricing.html" class="btn">Browse Our Cupcakes</a></p>
        </div>

        <div class="intro-img grid_3 omega">
            <object data="img/you-bake-me-blush.svg" type="image/svg+xml">
              <a href="you-bake-me-blush.svg">
                <!--[if lte IE 8 ]-->
                  <img src="img/you-bake-me-blush.gif" alt="You Bake Me Blush">
                <!--![endif]-->
              </a>
            </object>
        </div>
    </article>


    <article id="intro-locations" class="grid_12 omega">

        <div class="intro grid_8">
            <h1 class="fittext">We're kicking taste buds in to high gear from the west to the east coast with our featured avacodo chocolate cupcake.</h1>
            <p><a href="locations.html" class="btn">View Our Locations</a></p>
        </div>

        <div class="intro-img grid_4 omega">
            <object data="img/love-at-first-bite.svg" type="image/svg+xml">
              <a href="love-at-first-bite.svg">
                <!--[if lte IE 8 ]-->
                  <img src="img/love-at-first-bite.gif" alt="Love at First Bite">
                <!--![endif]-->
              </a>
            </object>
        </div>
    </article>
    </div>
</div>
</div>

<!-- End Intro Images --> <div id="featured-cupcake" class="grid_7"> <h2>Cupcake of the Week</h2> <p>This week’s featured cupcake is the <a href="#">Avocado Chocolate cupcake</a>. It’s flavors will kick your taste buds into fiesta mode!</p>

        <div id="featured-video">
            <iframe src="http://player.vimeo.com/video/50610288?title=0&amp;byline=0&amp;portrait=0" width="400" height="275" frameborder="0"></iframe>
        </div>

    </div>

    <div id="new-cupcakes" class="grid_5 omega">
            <h2>Fresh Out the Oven</h2>
            <p>Our newest cupcakes are <a href="#">Bacon Me Crazy</a> and <a href="#">Jalapeño So Spicy</a>. </p>

            <div data-picture data-alt="Bacon Me Crazy">
                <div data-src="external/imgs/bacon-small.jpg"></div>
                <div data-src="external/imgs/bacon-medium.jpg"     data-media="(min-width: 400px)"></div>
                <div data-src="external/imgs/bacon-large.jpg"      data-media="(min-width: 800px)"></div>
                <div data-src="external/imgs/bacon-extralarge.jpg" data-media="(min-width: 1000px)"></div>
                <!-- Fallback content for non-JS browsers. Same img src as the initial, unqualified source element. -->
                <noscript>
                    <img src="external/imgs/bacon-small.jpg" alt="Bacon Me Crazy">
                </noscript>
            </div>


            <div data-picture data-alt="Spicy Lime">
                <div data-src="external/imgs/lime-small.jpg"></div>
                <div data-src="external/imgs/lime-medium.jpg"     data-media="(min-width: 400px)"></div>
                <div data-src="external/imgs/lime-large.jpg"      data-media="(min-width: 800px)"></div>
                <div data-src="external/imgs/lime-extralarge.jpg" data-media="(min-width: 1000px)"></div>
                <!-- Fallback content for non-JS browsers. Same img src as the initial, unqualified source element. -->
                <noscript>
                    <img src="external/imgs/lime-small.jpg" alt="Spicy Lime">
                </noscript>
            </div>

    </div>

        <div id="about" class="grid_7">
            <h2>Inside the Kitchen</h2>
            <p>Smells Like Bakin’ started out in the garage of the husband wife duo Allison &amp; Joseph. Allison is the baker, and Joseph found a way for them to make a business out of her tasty treats. Flash forward to today and they have a successful store front, catering business and cupcake truck. </p>
            <p><a href="#" class="btn-small">Read More</a></p>
        </div>


    <div class="grid_5 omega">
        <h2>Get Bakin’ with Us</h2>

        <div id="contact">
            <p>Call us: <span>1-800-CUP-CAKE</span><br>
            Email us: <a href="#">bakeon@smellslikebakin.com</a></p>
        </div>

        <p>We announce all of our new flavors first through Facebook &amp; Twitter, and even take requests!</p>     

        <object data="img/facebook.svg" type="image/svg+xml">
          <a href="facebook.svg">
            <!--[if lte IE 8 ]-->
              <img src="img/facebook.gif" alt="Facebook">
            <!--![endif]-->
          </a>
        </object>

        <object data="img/twitter.svg" type="image/svg+xml">
            <!--[if lte IE 8 ]-->
              <img src="img/twitter.gif" alt="Twitter">
            <!--![endif]-->
        </object>
    </div>

    <div id="copyright" class="grid_12">
        <p>© 2012 Smells Like Bakin' Cupcake Company. All Rights Reserved.</p>
    </div>

</div>

<script src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.wmuSlider.min.js"></script>
<script src="external/matchmedia.js"></script>
<script src="picturefill.js"></script>

<script src="jquery.fitvids.js"></script>
 <script src="jquery.fittext.js"></script>

<script>

      $("#featured-video").fitVids();
      setTimeout(function(){
        $(".fittext").fitText(2.2);
      }, 2);

    var options = {navigationControl: false, animation: "slide"};
    $(".wmuSlider").wmuSlider(options);
</script>

</body> </html>

I had the same issue. Commenting out the display CSS seems to fix it as Ian has mentioned.

I'm not sure why on the video it still works because if you display something as none then you would expect it not to be displayed!