Title: Carousel Slide Error layout
Last modified: July 17, 2019

---

# Carousel Slide Error layout

 *  [imartingo](https://wordpress.org/support/users/imartingo/)
 * (@imartingo)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/carousel-slide-error-layout/)
 * Hello!
 * I’m developing a carousel with slides (amp-img + amp-fit-text), however it’s 
   showing a error:
    “Layout not supported: container. The element did not specify
   a layout attribute. Check [https://www.ampproject.org/docs/guides/responsive/control_layout](https://www.ampproject.org/docs/guides/responsive/control_layout)
   and the respective element documentation for details” `<amp-carousel class="i-
   amphtml-element i-amphtml-layout-container amp-carousel-slide i-amphtml-error"
   i-amphtml-layout="container"><div class="i-amphtml-scrollable-carousel-container"
   ></div><div tabindex="0" class="amp-carousel-button amp-carousel-button-prev 
   amp-disabled" role="presentation" title="Previous item in carousel" aria-disabled
   ="true"></div><div tabindex="0" class="amp-carousel-button amp-carousel-button-
   next" role="presentation" title="Next item in carousel" aria-disabled="false"
   ></div></amp-carousel>`
 * I found out that inside the carousel, it’s rendering one more slide than it’s
   supposed to:
 *     ```
       <div class="i-amphtml-slide-item">
       <amp-carousel class="i-amphtml-element i-amphtml-layout-container amp-carousel-slide i-amphtml-error" i-amphtml-layout="container">
       <div class="i-amphtml-scrollable-carousel-container"></div>
       <div tabindex="0" class="amp-carousel-button amp-carousel-button-prev amp-disabled" role="presentation" title="Previous item in carousel" aria-disabled="true"></div>
       <div tabindex="0" class="amp-carousel-button amp-carousel-button-next" role="presentation" title="Next item in carousel" aria-disabled="false">
       </div>
       </amp-carousel>
       </div>
       ```
   
 * this is my code:
 *     ```
        <amp-carousel class="carousel1" layout="responsive" height="450" width="500"  type="slides" controls loop >
                       <?php while (have_rows('repeater')) : the_row(); ?>
                           <div class="slide">
                               <amp-img src="<?php echo $img; ?>" alt="alt" width="50" height="50" layout="responsive" class="img-svg img-responsive"></amp-img>
                               <amp-fit-text layout="responsive"
                                   width="500"
                                   height="150">
                                   <p>
                                       <?php echo text; ?>
                                   </p>
                               </amp-fit-text>
                           </div>
                       <?php endwhile; ?>  
                   <amp-carousel>
       ```
   
 * Am I doing something wrong?
    Thank you in advance!

Viewing 1 replies (of 1 total)

 *  [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/carousel-slide-error-layout/#post-11743860)
 * [@imartingo](https://wordpress.org/support/users/imartingo/) From the code you
   provided there is no closing amp-carousel tag, which would result in a error.
   Can you share you site and I can check for any other errors?

Viewing 1 replies (of 1 total)

The topic ‘Carousel Slide Error layout’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/carousel-slide-error-layout/#post-11743860)
 * Status: not resolved