Title: AMP Custom css
Last modified: July 27, 2025

---

# AMP Custom css

 *  Resolved [Selim](https://wordpress.org/support/users/devxpe/)
 * (@devxpe)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/amp-custom-css-2/)
 * I want change .img-cont height : 100vh !important
   but cannot effect my changes
   how can I do this changes using with transitional mode
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Famp-custom-css-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [Selim](https://wordpress.org/support/users/devxpe/)
 * (@devxpe)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/amp-custom-css-2/#post-18573160)
 * I use code snippet. I cannot inject any code into function.php because theme 
   owner is encrypt theme
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/amp-custom-css-2/#post-18574283)
 * Hello [@devxpe](https://wordpress.org/support/users/devxpe/)
 * Thank you for contacting us.
 * To add custom CSS to your theme, please navigate to **Admin-> Appearance > Customize
   > Additional CSS** in your WordPress dashboard. You can input your styles in 
   the provided field.
 * As a best practice, we recommend avoiding the `!important` declaration in your
   CSS. Instead, using a more specific selector is the preferred method for overriding
   styles, as it improves code maintainability.`
 * for example
 *     ```
       html[amp] .img-cont { 
         height: 100vh;
       }
       ```
   
 * Please let us know if you require any further assistance.
 *  Thread Starter [Selim](https://wordpress.org/support/users/devxpe/)
 * (@devxpe)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/amp-custom-css-2/#post-18574804)
 * [@milindmore22](https://wordpress.org/support/users/milindmore22/) Thank your
   for your assist!
 * I applied your suggestion but didn’t work. Help me please
    -  This reply was modified 8 months, 2 weeks ago by [Selim](https://wordpress.org/support/users/devxpe/).
    -  This reply was modified 8 months, 2 weeks ago by [Selim](https://wordpress.org/support/users/devxpe/).
 *  Thread Starter [Selim](https://wordpress.org/support/users/devxpe/)
 * (@devxpe)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/amp-custom-css-2/#post-18574835)
 * [https://prnt.sc/rtExKZ27yuf4](https://prnt.sc/rtExKZ27yuf4)
   [https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages)
 * I tried this also but didnt work
 * this is what I have see
    -  This reply was modified 8 months, 2 weeks ago by [Selim](https://wordpress.org/support/users/devxpe/).
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/amp-custom-css-2/#post-18576289)
 * Hello [@devxpe](https://wordpress.org/support/users/devxpe/)
 * As we checked, we didn’t see CSS being added on your site, can you please confirm
   that you have added it additionally please clear any cache that you are using?
 *  Thread Starter [Selim](https://wordpress.org/support/users/devxpe/)
 * (@devxpe)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/amp-custom-css-2/#post-18576355)
 * It didn’t work I used fastest cache but still don’t work
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/amp-custom-css-2/#post-18581130)
 * Hello [@devxpe](https://wordpress.org/support/users/devxpe/)
 * Thank you for trying the code snippet. Can you please share your site health 
   information using [this form](https://forms.gle/3jxrtLM9VFAnL3jS8) so we can 
   check which theme you are using for AMP and provide you with better solutions?
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [7 months ago](https://wordpress.org/support/topic/amp-custom-css-2/#post-18637444)
 * [@devxpe](https://wordpress.org/support/users/devxpe/) As we didn’t receive a
   response I’ll mark this as resolved. Feel free to open a [new support topic](https://wordpress.org/support/plugin/amp/#new-post)
   if you require any further assistance.

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

The topic ‘AMP Custom css’ 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/)

 * 8 replies
 * 2 participants
 * Last reply from: [Milind More](https://wordpress.org/support/users/milindmore22/)
 * Last activity: [7 months ago](https://wordpress.org/support/topic/amp-custom-css-2/#post-18637444)
 * Status: resolved