in line 17 for some reason I have a video element, I don’t remember writing it but when I try to delete it the “Handcrafted, home-made masterpiece” gets deleted that’s so weird, I think I’m missing out on something because when I delete it in vs code or in freeCodeCamp the same thing happens so I don’t think it’s a glitch there’s just something I’m not seeing.
Alright I moved the href value to the anchor element that worked but but when I delete the video element <video id="video"></video> , the Handcrafted, home-made masterpieces text disappears. I also have another question, the section with the id Features is not how I want it to be, it should be in the middle and each image to the left with the title and description next to it to the right but now each one is on a line, how can I put the images with the text next to it?
As you can see, the video element has converted into a comment, but the text in question is visible. Solving the second issue mentioned requires adding some CSS rules in your styles.css file, and changing the HTML code.
In the following example, I have changed the HTML and added a few rules that change the layout of your page. It is up to you to find the rules which suit your design preferences:
Ok I’ve removed the video element, turns out even though I didn’t have a video src it still took space for the video and when I removed it the space went away and since my navbar has a position fixed the text was stuck behind it, so I added some padding to it and it worked. As for the layout of the Features section I see what you did and that’s what I want it to look like just a little different padding and size and stuff like that so I tried changing my code a bit to make look like yours but the fast shipping section (the last one) stays the same.(The reason I have 2 buttons in line 20-25 is because the project requires an input with a type submit, but I didn’t know how make it look yellow and have it change color like I did with button). Thank you so much for helping I appreciate it a lot.
Here’s my current code:
<!DOCTYPE html>
<html lang en>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
</head>
<header id="header">
<nav id="nav-bar">
<img id="header-img" src="https://cdn.freecodecamp.org/testable-projects-fcc/images/product-landing-page-logo.png" hrel="Logo"/>
<ul>
<a class="nav-link" href="#Features">Features</a>
<a class="nav-link" href="#Video">How it works</a>
<a class="nav-link" href="#Pricing">Pricing</a>
</ul>
</header>
<form id="form" action="https://www.freecodecamp.com/email-submit">
<p id="description">Handcrafted, home-made masterpieces</p>
<input id="email" name="email" type="email" placeholder="Enter your email address"></input>
<div class="button-div">
<button id="submit" type="submit" class="button">
Get Started
</button>
</div>
<input id="submit" type="submit"></input>
</form>
<section id="Features">
<div class="Features">
<img src="https://imgs.search.brave.com/v8q5Dum6XG6k3-ipm6MtwkTMKE-yMqEPhoSUZbX5AjU/rs:fit:500:0:0/g:ce/aHR0cHM6Ly9sb2dv/bWFrZXIuZGVzaWdu/ZnJlZWxvZ29vbmxp/bmUuY29tL21lZGlh/L3Byb2R1Y3RkZXNp/Z25lci9sb2dvL3Jl/c2l6ZWQvMDAwOTIx/X0ZyZWVfaGVhbHRo/eV9vaWxfTG9nb19N/YWtlci0wMS5wbmc" class="icon">
<div class="text">
<p id="" class="title">Premuim Materials</p>
<p class="description">Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase.</p>
</div>
</div>
<div class="Features">
<img src="https://cdn-icons-png.flaticon.com/128/4947/4947193.png" class="icon">
<div class="text">
<p class="title">Fast Shipping</p>
<p class="description">We make sure you recieve your trombone as soon as we have finished making it. We also provide free returns if you are not satisfied.</p>
</div>
</div>
<div class="Features">
<img src="https://cdn-icons-png.flaticon.com/128/664/664883.png" class="icon">
</div class="text">
<p class="title">Fast Shipping</p>
<p class="description">For every purchase you make, we will ensure there are no damages or faults and we will check and test the pitch of your instrument.</p>
</div>
</div>
</section>
<div id="Video" class="video-div">
<iframe id="Video" class="vid" width="560" height="315" src="https://www.youtube.com/embed/y8Yv4pnO7qc?si=k7wMar0R_Jt_pXcd" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
<section id="Pricing">
<div class="prices" id="tenor">
<h3 class="price-header">Tenor Trombone</h3>
<p class="actual-price">600$</p>
<p class="lorem">Lorem ipsum</p>
<p class="lorem">Lorem ipsum</p>
<p class="lorem">Lorem ipsum dolor</p>
<p class="lorem">Lorem ipsum</p>
<button class="price-button">
Select
</button>
</div>
<div class="prices" id="bass">
<h3 class="price-header">Bass Trombone</h3>
<p class="actual-price">600$</p>
<p class="lorem">Lorem ipsum</p>
<p class="lorem">Lorem ipsum</p>
<p class="lorem">Lorem ipsum dolor</p>
<p class="lorem">Lorem ipsum</p>
<button class="price-button">
Select
</button>
</div>
<div class="prices" id="valve">
<h3 class="price-header">Valve Trombone</h3>
<p class="actual-price">600$</p>
<p class="lorem">Lorem ipsum</p>
<p class="lorem">Lorem ipsum</p>
<p class="lorem">Lorem ipsum dolor</p>
<p class="lorem">Lorem ipsum</p>
<button class="price-button">
Select
</button>
</div>
</section>
</html>
Ok I’m pretty much done just a couple things left, I used positions to fix the middle part, I just have to fix the video. So far I used iframe element to get the video from youtube but they want me to use the video element, how do I get a video from youtube while using the video element.
Here’s my code:
<!DOCTYPE html>
<html lang en>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
</head>
<header id="header">
<nav id="nav-bar">
<img id="header-img" src="https://cdn.freecodecamp.org/testable-projects-fcc/images/product-landing-page-logo.png" hrel="Logo"/>
<ul>
<a class="nav-link" href="#Features">Features</a>
<a class="nav-link" href="#Video">How it works</a>
<a class="nav-link" href="#Pricing">Pricing</a>
</ul>
</header>
<form id="form" action="https://www.freecodecamp.com/email-submit">
<p id="description">Handcrafted, home-made masterpieces</p>
<input id="email" name="email" type="email" placeholder="Enter your email address"></input>
<div class="button-div">
<input id="submit" type="submit" value="Get Started"></input>
</div>
</form>
<section id="mid">
<div id="Features" class="Features">
<img src="https://imgs.search.brave.com/v8q5Dum6XG6k3-ipm6MtwkTMKE-yMqEPhoSUZbX5AjU/rs:fit:500:0:0/g:ce/aHR0cHM6Ly9sb2dv/bWFrZXIuZGVzaWdu/ZnJlZWxvZ29vbmxp/bmUuY29tL21lZGlh/L3Byb2R1Y3RkZXNp/Z25lci9sb2dvL3Jl/c2l6ZWQvMDAwOTIx/X0ZyZWVfaGVhbHRo/eV9vaWxfTG9nb19N/YWtlci0wMS5wbmc" class="icon">
<p class="title">Premuim Materials</p>
<p class="description">Our trombones use the shiniest brass which is sourced locally. This will increase the longevity of your purchase.</p>
</div>
<div class="Features">
<img src="https://cdn-icons-png.flaticon.com/128/4947/4947193.png" class="icon">
<p class="title">Fast Shipping</p>
<p class="description">We make sure you recieve your trombone as soon as we have finished making it. We also provide free returns if you are not satisfied.</p>
</div>
<div class="Features">
<img src="https://cdn-icons-png.flaticon.com/128/664/664883.png" class="icon">
<p class="title">Fast Shipping</p>
<p class="description">For every purchase you make, we will ensure there are no damages or faults and we will check and test the pitch of your instrument.</p>
</div>
</section>
<div id="Video" class="video-div">
<iframe id="Video" class="vid" width="560" height="315" src="https://www.youtube.com/embed/y8Yv4pnO7qc?si=k7wMar0R_Jt_pXcd" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
<section id="Pricing">
<div class="prices" id="tenor">
<h3 class="price-header">Tenor Trombone</h3>
<p class="actual-price">600$</p>
<p class="lorem">Lorem ipsum</p>
<p class="lorem">Lorem ipsum</p>
<p class="lorem">Lorem ipsum dolor</p>
<p class="lorem">Lorem ipsum</p>
<button class="price-button">
Select
</button>
</div>
<div class="prices" id="bass">
<h3 class="price-header">Bass Trombone</h3>
<p class="actual-price">600$</p>
<p class="lorem">Lorem ipsum</p>
<p class="lorem">Lorem ipsum</p>
<p class="lorem">Lorem ipsum dolor</p>
<p class="lorem">Lorem ipsum</p>
<button class="price-button">
Select
</button>
</div>
<div class="prices" id="valve">
<h3 class="price-header">Valve Trombone</h3>
<p class="actual-price">600$</p>
<p class="lorem">Lorem ipsum</p>
<p class="lorem">Lorem ipsum</p>
<p class="lorem">Lorem ipsum dolor</p>
<p class="lorem">Lorem ipsum</p>
<button class="price-button">
Select
</button>
</div>
</section>
<nav id="footer">
<ul>
<a class="footer-link" href="">Privacy</a>
<a class="footer-link" href="">Terms</a>
<a class="footer-link" href="">Contact</a>
</ul>
<p class="footer-text">Copyright 2016, Original Trombones</p>
</html>