WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Making embedded video larger on Single Post (2 posts)

  1. Flameblade
    Member
    Posted 1 year ago #

    I currently have my blog set up so on the main page the sidebar is on the right alongside the main blog. Like this:

    Screen 1

    However, when you click on the link to the Single Post, I've moved the sidebar down so the post is larger.

    Screen 2

    My question is how to make it so the video in the Single Post version is larger compared to the one on the main page.

    Here is my code:

    In header.php I have this inside the body tag:

    <body<?php if ( is_single() ) {
    echo ' class="widescreen" '; } ?>>

    This sets the 'widescreen' class if it's a Single Post

    Then in style.css I have this:

    .video-embed {
    text-align: center;
    width: 660px;
    }

    .widescreen .video-embed {
    width: 900px;
    }

    And then in the post I have this:

    <div class="video-embed"> [embed width=660px] *VIDEO URL* [/embed] </div>

    Please help me with how to make the embed width circumstantially larger.
    I've tried setting the 'embed width' value to 100% to see if it would fill the space in the 'video-embed' class, but that doesn't work.

  2. Flameblade
    Member
    Posted 1 year ago #

    I figured it out. I put the video embed into an iframe tag and setting the width to 100% worked.

Topic Closed

This topic has been closed to new replies.

About this Topic