• Google Chrome. Windows 10.

    Alrighty. I’m learning through trial by fire here (so please excuse any funky code). Googling my problems away, remembering my past coding classes as I go. I’m having trouble with this in particular.

    I’ve embedded a video into a page. https://45.79.7.4/~alexsaen/bestplaceaward/ this one here. As you might see, to the left and right of my video, it’s white. Below that in the “call to action” section, the background image remains. See my funky code below.

    <section id="Header Video"
    	<br />
    	<br />
    	<br />
    	<div style="margin: 0px auto; text-align: center; width: 800px; height: 450px">
    		<iframe width="800" height="450" src="https://www.youtube.com/embed/xJrem36Fbz8" frameborder="10" allowfullscreen></iframe>
    	</div>
    </section>

    The page breaks are so it doesn’t sit under the red menu bar. I suspect the problem is that I set the div to have it’s own style with “<div style =” but I’m unsure. If you can help me, I’d appreciate it.

    Thank you for any help you can provide.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter cliffn

    (@cliffn)

    The surrounding code.

    * Template Name: Homepage Lookalike
     * @package brandco
     */
    
    get_header(); ?>
    
    <main id="SiteMain" role="main">
    
    <section id="Header Video"
    	<br />
    	<br />
    	<br />
    	<div style="margin: 0px auto; text-align: center; width: 800px; height: 450px">
    		<iframe width="800" height="450" src="https://www.youtube.com/embed/xJrem36Fbz8" frameborder="10" allowfullscreen></iframe>
    	</div>
    </section>
    
    <section id="Section__CTA1">
    	<div class="PageContainer">
    		<!-- <ul class="GridThrees"> -->
    
    			<?php if( have_rows('call_to_actions') ): ?>
    				<?php $counter = 1; ?>
    			<?php while( have_rows('call_to_actions') ): the_row(); 
    
    				// vars
    				$title = get_sub_field('title');
    				$image = get_sub_field('picture');
    				$link = get_sub_field('link');
    				$hyperlink = get_sub_field('hyperlink');
    				$text = get_sub_field('introduction_text');
    				$button = get_sub_field('button_label');
    				?>
    				<?php if($counter % 2 == 0): ?>
    				<li class="ctaright">
    				<?php else: ?>
    				<li class="ctaleft">
    				<?php endif ?>
    					<a href="<?php echo $link ?>">
    
    					<div class="QuickLink__image"><img src="<?php echo $image; ?>"></div>
    
    					<div class="content">
    						<div class="QuickLink__title"><?php echo $title; ?></div>
    						<div><?php echo $text ?></div>
    						<div class="readmore"><?php echo $button ?></div>
    					</div>
    
    					</a>
    				</li>
    				<?php $counter++; ?>
    			<?php endwhile; ?>
    			<?php endif; ?>
    
    		<!-- </ul> -->
    	</div>
    </section>
    Thread Starter cliffn

    (@cliffn)

    Okay, so that link isn’t going to work because unfortunately I broke the website. Sorry. If you can help without seeing the actual problem on the website, that would be great. I’ll try to get the website working again.

    *Edit*Disregard this, I only broke the admin side.

    *Edit 2*Disregard that as well. Both sides were broken, but they got fixed. I think I’m in over my head.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Embedded Video removes Background Image in it's section.’ is closed to new replies.