Title: Jetpack adding inline CSS to slider
Last modified: February 10, 2022

---

# Jetpack adding inline CSS to slider

 *  Resolved [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/jetpack-adding-inline-css-to-slider/)
 * Hi,
 * I am having trouble with the Jetpack slider added via the Gutenberg block editor.
   When the slider loads on a portrait tablet its width is 100% of the viewport.
   When the tablet is rotated 90 degrees to landscape, the slider remains at the
   same width as the portrait width, adding white space either side of the slider.
 * From inspecting the code, it seems Jetpack is adding inline CSS to the ul > li
   elements which contain the slider images. Specifically I believe the issue is
   a ‘width: XXXXpx’ property being added, where the ‘XXXXpx’ width is always the
   width of the viewport. I think to resolve the issue I need the width to be set
   to ‘100%’.
 * Does anyone know any way I can disable inline CSS on the Jetpack slider? That
   way I could add the CSS rules via my own stylesheet. I have tried using !important
   to override the inline CSS but to no avail 🙁
    I have also disabled Site Accelerator
   and Lazy Loading in the Jetpack settings.
 * Thanks,
    Chris
    -  This topic was modified 4 years, 4 months ago by [cpthomas1990](https://wordpress.org/support/users/lechuck/).
    -  This topic was modified 4 years, 4 months ago by [cpthomas1990](https://wordpress.org/support/users/lechuck/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [deathlynotes](https://wordpress.org/support/users/deathlynotes/)
 * (@deathlynotes)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/jetpack-adding-inline-css-to-slider/#post-15351742)
 * Hi [@lechuck](https://wordpress.org/support/users/lechuck/)
 * Could you share the code you are using, please?
 * Could you please post your site URL here so that we can have a look?
 * If you want it to remain private, you can also contact us [via this contact form](https://jetpack.com/contact-support/?rel=support&hpi=1).
   If you choose to reach out directly, please include a link to this thread.
 * Thanks!
 *  Thread Starter [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/jetpack-adding-inline-css-to-slider/#post-15358071)
 * Hi Michelle,
 * Thank you for your response. I will have to message you privately as the project
   is not live yet.
 * Thank you
 *  [MadHatter (a11n)](https://wordpress.org/support/users/madhattersez/)
 * (@madhattersez)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/jetpack-adding-inline-css-to-slider/#post-15368492)
 * Thanks for that!
 * I’ll go ahead and close out this thread and we will respond to your ticket from
   here.
 * Have a safe rest of the week.
 *  Thread Starter [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * (@lechuck)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/jetpack-adding-inline-css-to-slider/#post-15380954)
 * Just to follow up on this, using either of the below CSS rules fixed the issue
   for me. Tested on iPad and iPhone – the slider images now scale up and down no
   problem.
 *     ```
       ul.wp-block-jetpack-slideshow_swiper-wrapper[style],
       li.wp-block-jetpack-slideshow_slide {
           width: 100vw !important;
       }
   
       .wp-block-jetpack-slideshow .wp-block-jetpack-slideshow_slide figure .wp-block-jetpack-slideshow_image {
           width: 100vw !important;
       }
       ```
   
 * Thanks,
    Chris
    -  This reply was modified 4 years, 3 months ago by [cpthomas1990](https://wordpress.org/support/users/lechuck/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Jetpack adding inline CSS to slider’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

 * [inline css](https://wordpress.org/support/topic-tag/inline-css/)

 * 4 replies
 * 3 participants
 * Last reply from: [cpthomas1990](https://wordpress.org/support/users/lechuck/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/jetpack-adding-inline-css-to-slider/#post-15380954)
 * Status: resolved