Stopping Video Embeds from Resizing
Use the noresize class to maintain exact dimensions for embedded videos in your Knowledge Base articles.
Updated
by River Sloane
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, they often come with responsive sizing—meaning they'll expand to fill whatever space is available. 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:
- Get your video embed code from YouTube, Vimeo, or another video platform
- Locate the iframe element in the embed code
- Add
class="noresize"
to the iframe tag before the width and height attributes - Insert the video by embed code as normal
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?
Making Video Embeds Responsive