Skip to main content
Support

Stopping Video Embeds from Resizing

Use the noresize class to maintain exact dimensions for embedded videos in your Knowledge Base articles.

River Sloane
Updated by River Sloane
1 min read

Embedded videos can sometimes take over your Knowledge Base articles by automatically resizing to fill available space πŸͺ

Here's how to keep your video embeds at exactly the size you want using our simple CSS class.

Why Control Video Size?

When you embed videos from platforms like YouTube or Vimeo, your Knowledge Base automatically resizes them to fill the width of the article. Sometimes that's not what you want for your articles.

The noresize class lets you maintain precise control over your embedded video dimensions without any complicated CSS or coding.

Adding the noresize Class

Here's how to keep your video embeds at a fixed size:

  1. Get your video embed code from YouTube, Vimeo, or another video platform
  2. Locate the iframe element in the embed code
  3. Add class="noresize" to the iframe tag, and set the width and height attributes to the size you want
  4. Insert the video by embed code as normal
The class goes in the embed code, so it can't be added to a video you insert by its URL. A fixed-size video still can't be wider than the article: anything wider gets capped at the article's width.

Example Code

<iframe class="noresize" width="280" height="157" src="VIDEO-URL" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>

What did you think of this doc?

Previous Making Video Embeds Responsive Next How to Add Extra Spacing

Get in touch