0
Guys, I want to leave a video on the home page of the site that I’m creating with HMTL AND CSS, but when I click on some option from the sidebar menu, Serction will transition over my video, in case I leave it in the background. But what’s happening is the opposite. I left the html part of the header and iframe just below, searched on and saw that it is a toggle Function in javascript that I lack. Help me?
<body>
<div id="IframePosicao">
<iframe width="800" height="451"
src="https://www.youtube.com/embed/JMJUUHDhRcA"
frameborder="0" allow="autoplay; encrypted-media" allowfullscreen>
</iframe>
</div>
<header id="sidebar">
<h1>NT GAMES</h1>
<nav>
<ul>
<li id="link-home"><a href="#home">Home</a></li>
<li id="link-empresa"><a href="#empresa">Empresa</a></li>
<li id="link-servico"><a href="#servico">Serviços</a></li>
<li id="link-contato"><a href="#contato">Contato</a></li>
<li id="link-restrito"><a href="#restrito">Restrito</a></li>
</ul>
</nav>
</header>
css:
div#IframePosicao {
position: absolute;
overflow:auto;
top: 30%;
left: 45%;
z-index: 5;
margin-top: -155px;
margin-left: -200px;
}
header{
width: 25%;
background: #fff;
position: absolute;
float: left;
left: 0;
top: 5%;
z-index: 5;
}
Dude looks like you want your site to run on a "tabs" system. Take a look here and I think you can help https://www.w3schools.com/howto/howto_js_vertical_tabs.
– hugocsl