I have to do a horizontal website. Each section are fullscreen and I've put an anchor to each section to navigate with links, but I tried everything to get a javascript to work to do a horizontal smooth scrolling and but I can't.
Here is the HTML:
<body>
<header class="section black">
<a href="#mission">MISSION DE L'ÉCOLE</a>
<div class="logo"></div>
</header>
<section class="section gray" id="mission">
<p>
second section
</p>
</section>
</body>
And my CSS:
* {
margin: 0;
}
body {
width: 2000px;
position: absolute;
top:0px;
left:0px;
bottom:0px;
}
.section {
margin: 0px;
bottom: 0px;
width: 100vw;
float: left;
height: 100vh;
}
.black {
background-color: #000000;
}
.gray {
background-color: #838B8B;
}
Here is a exemple: https://jsfiddle.net/mnn94crj/10/