CSS classes moving around with window resized - html

I am making a portal for some students but every time they resize the browser window, the CSS classes move around.
I've been stuck on this for a few days now and I think I'm spending way too much time just trying to figure this part out.
I put the code in the post and I attached the background image. Is there a certain CSS rule that will make it where the CSS classes won't move when the browser moves?
Thanks!
Here's the CSS & HTML code:
.google-container {
overflow: hidden;
bottom: 2070px;
left: 350px;
padding-top: 56.25%;
position: relative;
}
.java-container {
overflow: hidden;
padding-top: 56.25%;
position: relative;
}
.java-container iframe {
border: 0;
height: 400%;
right: 400px;
position: absolute;
top: 200px;
width: 100%;
}
.iframe-container {
overflow: hidden;
padding-top: 56.25%;
position: relative;
}
.iframe-container iframe {
border: 0;
height: 100%;
left: 1538px;
position: absolute;
top: 180px;
width: 100%;
}
.sutori {
position: absolute;
bottom: 1878px;
left: 422px;
background-color: #33afff;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
padding: 20px;
width: 240px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.sutori:hover,
.sutori:focus {
background-color: #d3d3d3;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
bottom: 1825px;
left: 260px;
background-color: #d3d3d3;
min-width: 160px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {
background-color: #ddd;
}
.show {
display: block;
}
.drivebutton {
position: absolute;
bottom: 510px;
left: 1190px;
background-color: #d54b3d;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.drivebutton:hover,
.drivebutton:focus {
background-color: #d3d3d3;
}
.drivebutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.drivebutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.drivebutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.drivebutton:hover,
.drivebutton:focus {
background-color: #d3d3d3;
}
.drivebutton a:hover {
background-color: #ddd;
}
.classroombutton {
position: absolute;
bottom: 385px;
left: 1190px;
background-color: #d54b3d;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.classroombutton:hover,
.classroombutton:focus {
background-color: #d3d3d3;
}
.classroombutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.classroombutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.classroombutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.classroombutton:hover,
.classroombutton:focus {
background-color: #d3d3d3;
}
.classroombutton a:hover {
background-color: #ddd;
}
.youtubebutton {
position: absolute;
bottom: 295px;
left: 1190px;
background-color: #d54b3d;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.youtubebutton:hover,
.youtubebutton:focus {
background-color: #d3d3d3;
}
.youtubebutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.youtubebutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.youtubebutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.youtubebutton:hover,
.youtubebutton:focus {
background-color: #d3d3d3;
}
.youtubebutton a:hover {
background-color: #ddd;
}
.conbutton {
position: absolute;
bottom: 512px;
left: 816px;
background-color: #daa520;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.conbutton:hover,
.mailbutton:focus {
background-color: #d3d3d3;
}
.conbutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.conbutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.conbutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.conbutton:hover,
.mailbutton:focus {
background-color: #d3d3d3;
}
.conbutton a:hover {
background-color: #ddd;
}
.mailbutton {
position: absolute;
bottom: 600px;
left: 1190px;
background-color: #d54b3d;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.mailbutton:hover,
.mailbutton:focus {
background-color: #d3d3d3;
}
.mailbutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.mailbutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.mailbutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.mailbutton:hover,
.mailbutton:focus {
background-color: #d3d3d3;
}
.mailbutton a:hover {
background-color: #ddd;
}
.button {
position: absolute;
bottom: 450px;
left: 570px;
background-color: #33afff;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.button:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.button:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.button:hover,
.button:focus {
background-color: #000000;
}
.buttonflip {
position: absolute;
bottom: 510px;
left: 430px;
background-color: #18d71f;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.buttonflip:hover,
.buttonflip:focus {
background-color: #d3d3d3;
}
.buttonflip:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.buttonflip:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.buttonflip-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.buttonflip:hover,
.buttonflip:focus {
background-color: #d3d3d3;
}
.buttonflip a:hover {
background-color: #ddd;
}
.sketchfabbutton {
position: absolute;
bottom: 295px;
left: 1190px;
background-color: #d54b3d;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.sketchfabbutton:hover,
.sketchfabbutton:focus {
background-color: #d3d3d3;
}
.sketchfabbutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.sketchfabbutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.sketchfabbutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.sketchfabbutton:hover,
.sketchfabbutton:focus {
background-color: #d3d3d3;
}
.sketchfabbutton a:hover {
background-color: #ddd;
}
.sketchbutton {
position: absolute;
bottom: 385px;
left: 430px;
background-color: #107014;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.sketchbutton:hover,
.sketchbutton:focus {
background-color: #d3d3d3;
}
.sketchbutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.sketchbutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.sketchbutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.sketchbutton:hover,
.sketchbutton:focus {
background-color: #d3d3d3;
}
.sketchbutton a:hover {
background-color: #ddd;
}
.eastbutton {
position: absolute;
bottom: 629px;
left: 816px;
background-color: #0091b2;
border: none;
font-size: 28px;
font-family: "Arial";
color: #FFFFFF;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 20px;
width: 200px;
text-align: center;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.2s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
}
.eastbutton:hover,
.eastbutton:focus {
background-color: #d3d3d3;
}
.eastbutton:after {
content: "";
background: #000000;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px!important;
margin-top: -120%;
opacity: 0;
transition: all 0.4s
}
.eastbutton:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s
}
.eastbutton-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.eastbutton:hover,
.eastbutton:focus {
background-color: #d3d3d3;
}
.eastbutton a:hover {
background-color: #ddd;
}
body {
background-image: url("backtest2.png");
background-repeat: no-repeat;
background-position: right 400% bottom 101%;
background-size: 1920px 1000px;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>EAST Portal!</title>
<div class="iframe-container">
<iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2FEAST-at-Gentry-Public-Schools-405756842946474%2F&tabs=timeline&width=340&height=500&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true&appId"
width="340" height="500" style="border:none;overflow:hidden;" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
</div>
<body scroll="no" style="overflow: hidden">
<div class="google-container" <center>
<form method="GET" action="https://www.google.com/search">
<a href="https://www.google.com/search?safe=vss">
<img src="https://www.edigitalagency.com.au/wp-content/uploads/google-logo-png-transparent-background-large-new-800x270.png" border="0" alt="Google" width="115" height="39" align="absmiddle"></a><br>
<input type="text" name="q" size="15" maxlength="255" value="" style="width:220px;height:40px;font-size:12px;border-style:solid; border-width:1px;">
<input type="submit" name="sa" value="Search" style="width:100px;height:40px;font-size:18px; padding-top:-20;"><input type="hidden" name="safe" value="strict">
</td>
</tr>
</tbody>
</table>
</form>
</center>
</div>
<style>
p {
position: fixed;
bottom: 750px;
left: 1200px;
font-size: 34px;
font-family: "Arial";
margin-top: 5px;
}
</style>
</head>
<body>
<div class="dropdown">
<button onclick="myFunction()" class="sutori">Sutori</button>
<div id="myDropdown" class="dropdown-content">
Sutori
EAST Sutori
Photography Club
</div>
</div>
</head>
<body>
Flipgrid</button>
Gmail</button>
Google Drive</button>
Google Classroom</button>
EAST</button>
Digital Nature Museum</button>
Conference Sign-up Sheet</button>
YouTube</button>
YouTube</button>
</body>
</html>

Related

CSS: It seems that i have to click my button twice to go to another page

So, if i would click "PROJECTEN", it would allegedly bring me to the PROJECTEN page, but instead it just does the animation that i asked it to.
That is the html, now for the CSS of the Home page:
body{
background-color: black;
}
.projectenknop{
position: relative;
border-radius: 0 50px 0 50px;
border: 1px solid white;
font-family: "Bebas Neue";
font-size: 2vw;
color: #ffffff;
margin: 10% 0 0 25%;
width: 10vw;
text-align: center;
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
background-color: transparent;
}
.projectenknop:after {
content: "";
background: #f1f1f1;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px !important;
margin-top: -120%;
opacity: 0;
transition-duration: 0.8s;
}
.projectenknop:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s;
}
.overknop {
position: relative;
border-radius: 50px 0 50px 0;
border: 1px solid white;
font-family: "Bebas Neue";
font-size: 2vw;
color: #ffffff;
margin: 10% 0 0 50%;
width: 10vw;
text-align: center;
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
background-color: transparent;
}
.overknop:after {
content: "";
background: #f1f1f1;
display: block;
right: 0;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px !important;
margin-top: -120%;
opacity: 0;
transition-duration: 0.8s;
}
.overknop:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s;
}
#tekstkader{
border: 0.1px solid black;
width: 29.5vw;
height: 180vh;
margin: 13.4% 0 0 35.5%;
text-align: center;
font-family: "Bebas Neue";
color: black;
opacity: 0.7;
font-size: 1.5vw;
}
#linkprojecten:link{
color: azure;
text-decoration: none;
}
#linkprojecten:visited{
color: azure;
text-decoration: none;
}
#linkprojecten:hover{
color: azure;
text-decoration: none;
}
#linkprojecten:active{
color: azure;
text-decoration: none;
}
<div class="rij">
<div class="kol-6 kol-t-6 kol-m-6">
<button class="projectenknop"><a id="linkprojecten" href="projecten.html">PROJECTEN</a></button>
</div>
<div class="kol-6 kol-t-6 kol-m-6">
<button class="overknop">OVER</button>
</div>
</div>
<div id="tekstkader">
<br>Dit is een fanpagina over Alicha De Bevere,<br>een grafische studente in Ter Sterre.
</div>
And now the PROJECTEN HTML and CSS:
body{
background-color: black;
}
.homeknop {
position: relative;
border-radius: 0 50px 0 50px;
border: 1px solid white;
font-family: "Bebas Neue";
font-size: 2vw;
color: #ffffff;
margin: 10% 0 0 25%;
width: 10vw;
text-align: center;
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
background-color: transparent;
}
.homeknop:after {
content: "";
background: #f1f1f1;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px !important;
margin-top: -120%;
transition-duration: 0.8s;
opacity: 0;
}
.homeknop:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s;
}
.overknop {
position: relative;
border-radius: 50px 0 50px 0;
border: 1px solid white;
font-family: "Bebas Neue";
font-size: 2vw;
color: #ffffff;
margin: 10% 0 0 50%;
width: 10vw;
text-align: center;
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
background-color: transparent;
}
.overknop:after {
content: "";
background: #f1f1f1;
display: block;
right: 0;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px !important;
margin-top: -120%;
opacity: 0;
transition-duration: 0.8s;
}
.overknop:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s;
}
#linkhome:link{
color: azure;
text-decoration: none;
}
#linkhome:visited{
color: azure;
text-decoration: none;
}
#linkhome:hover{
color: azure;
text-decoration: none;
}
#linkhome:active{
color: azure;
text-decoration: none;
}
<video autoplay muted loop id="bgvideo">
<source src="BGVIDEOPROJECTEN.mp4" type="video/mp4">
</video>
<div class="rij">
<div class="kol-6 kol-t-6 kol-m-6">
<button class="homeknop"><a id="linkhome" href="index.html">HOME</a></button>
</div>
<div class="kol-6 kol-t-6 kol-m-6">
<button class="overknop">OVER</button>
</div>
</div>
So yeah, cant figure it out.
And also i wanted to make the button do the animation after i hover, but it just doesnt work. It gets buggy and is all over the place.
Try switching the order of the link and button, i.e. putting the <button> inside of the <a> instead.

My html page is shifted to the left but i can't see where the problem is

Hello I choose a template to work with, it was fine at the beginning but after some modification, I cannot see where I messed it up, the whole page is moved to the left but I don't know where is the problem.
The HTML code 👇
<!DOCTYPE html>
<html lang="en">
<head>
......stuff
</head>
<body data-spy="scroll" data-target=".navbar" data-offset="51">
<!-- Nav Bar Start -->
<div class="navbar navbar-expand-lg bg-light navbar-light">
<div class="container-fluid">
<img src="img/mylogo2.png" width="80px">
<div class="collapse navbar-collapse justify-content-between" id="navbarCollapse">
<div class="navbar-nav ml-auto">
.... nav stuff
</div>
</div>
</div>
</div>
<!-- Nav Bar End -->
<!-- Hero Start -->
<div class="hero" id="home">
<div class="container-fluid">
<div class="row align-items-center">
<div class="col-sm-12 col-md-6 mt-4">
<div class="hero-content">
<div class="hero-text">
<p>Welcome To </p>
<h1>{{ strtoupper($heros->title) }}</h1>
<h2></h2>
<div class="typed-text">
<p style="color:#ED428B;"> {{ $heros->content }}</p>
</div>
</div>
<div class="hero-btn mt-4">
<a class="btn" href="">Hire Us</a>
<a class="btn" href="#contact">Contact Us</a>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6 d-none d-md-block">
<div class="hero-image">
<img src="images/{{$heros->img}}" alt="Hero Image" width="600px" height="600px">
</div>
</div>
</div>
</div>
</div>
<!-- Hero End -->
<!-- Service Start -->
<div class="service" id="service">
<div class="container">
...
</div>
</div>
<!-- Service End -->
<!-- Banner Start -->
<div class="banner wow zoomIn" data-wow-delay="0.1s">
<div class="container">
.....
</div>
</div>
<!-- Banner End -->
<!-- Portfolio Start -->
<p>..............................</p>
<!-- Portfolio End -->
<!-- Banner Start -->
<div class="banner wow zoomIn" data-wow-delay="0.1s">
<div class="container">
....banner
</div>
</div>
<!-- Banner End -->
<!-- Price Start -->
<div class="price" id="price">
.....
</div>
<!-- Price End -->
<!-- Testimonial Start -->
<div class="testimonial wow fadeInUp" data-wow-delay="0.1s" id="review">
<div class="text-center wow zoomIn" data-wow-delay="0.1s">
.....test...stuff
</div>
</div>
<!-- Testimonial End -->
<!-- Footer Start -->
<div class="footer shape wow fadeIn" data-wow-delay="0.3s">
<div class="container-fluid">
......footer stuff
</div>
</div>
<!-- Footer End -->
<!-- Back to top button -->
<i class="fa fa-chevron-up"></i>
<!-- Pre Loader -->
<div id="loader" class="show">
<div class="loader"></div>
</div>
<!-- JavaScript Libraries -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.bundle.min.js"></script>
<script>//....some script</script>
</body>
<style>
.brands {
width: 100%;
padding-top: 90px;
padding-bottom: 90px
}
.brands_slider_container {
height: 130px;
border: solid 1px #e8e8e8;
box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1);
padding-left: 97px;
padding-right: 97px;
background: #fff
}
.brands_slider {
height: 100%;
}
.brands_item {
height: 150px;
width: 100px;
}
.brands_item img {
width: 50px;
height: 85px;
}
.brands_nav {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
padding: 5px;
cursor: pointer
}
.brands_nav i {
color: #e5e5e5;
-webkit-transition: all 200ms ease;
-moz-transition: all 200ms ease;
-ms-transition: all 200ms ease;
-o-transition: all 200ms ease;
transition: all 200ms ease
}
.brands_nav:hover i {
color: #676767
}
.brands_prev {
left: 40px;
}
.brands_next {
right: 40px
}
</style>
</html>
and the css👇
excuse me if it a lot of code but I want to host this app as soon as possible cuz I already paid for the hosting.
body {
color: #797979;
background: #ffffff;
font-family: 'Montserrat', sans-serif;
overflow-x: hidden;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #414141;
}
a {
color: #313131;
transition: .3s;
}
a:hover,
a:active,
a:focus {
color: #009FF9;
outline: none;
text-decoration: none;
}
.btn:focus,
.form-control:focus {
box-shadow: none;
}
.container-fluid {
max-width: 1366px;
}
.btn {
padding: 12px 25px;
font-size: 14px;
font-weight: 600;
letter-spacing: 1px;
color: #ffffff;
background: #009FF9;
border: 2px solid transparent;
border-radius: 0;
box-shadow: inset 0 0 0 50px #009FF9;
transition: ease-out 0.3s;
-webkit-transition: ease-out 0.3s;
-moz-transition: ease-out 0.3s;
}
.btn:hover {
color: #009FF9;
background: transparent;
box-shadow: inset 0 0 0 0 #009FF9;
border-color: #009FF9;
}
#loader {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
background: #ffffff;
opacity: 0;
visibility: hidden;
-webkit-transition: opacity .3s ease-out, visibility 0s linear .3s;
-o-transition: opacity .3s ease-out, visibility 0s linear .3s;
transition: opacity .3s ease-out, visibility 0s linear .3s;
z-index: 999;
}
#loader.show {
-webkit-transition: opacity .6s ease-out, visibility 0s linear 0s;
-o-transition: opacity .6s ease-out, visibility 0s linear 0s;
transition: opacity .6s ease-out, visibility 0s linear 0s;
visibility: visible;
opacity: 1;
}
#loader .loader {
position: relative;
width: 45px;
height: 45px;
border: 5px solid #dddddd;
border-top: 5px solid #009FF9;
border-radius: 50%;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
#-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
#keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.back-to-top {
position: fixed;
display: none;
width: 44px;
height: 44px;
padding: 8px 0;
text-align: center;
line-height: 1;
font-size: 22px;
right: 15px;
bottom: 15px;
z-index: 9;
border-radius: .3em;
}
.back-to-top i {
color: #ffffff;
}
.back-to-top:hover i {
color: #414141;
}
/*********** Nav Bar CSS **********/
.navbar {
position: relative;
transition: .5s;
z-index: 999;
}
.navbar.nav-sticky {
position: fixed;
top: 0;
width: 100%;
box-shadow: 0 2px 5px rgba(0, 0, 0, .3);
}
.navbar .navbar-brand {
margin: 0;
font-size: 45px;
line-height: 0px;
font-weight: 700;
letter-spacing: 2px;
transition: .5s;
}
.navbar .navbar-brand img {
max-width: 100%;
max-height: 40px;
}
.navbar .dropdown-menu {
margin-top: 0;
border: 0;
border-radius: 0;
background: #f8f9fa;
}
/********** Hero CSS ***********/
.hero {
position: relative;
width: 100%;
margin-bottom: 45px;
padding: 120px 0 0 0;
overflow: hidden;
background: linear-gradient(#009FF9, #ffffff), url(../img/hero-bg.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.hero .container-fluid {
padding: 0;
}
.hero .hero-image {
position: relative;
/* text-align: right; */
/* padding-right: 75px; */
padding-right: 4em;
}
.hero .hero-image img {
}
.hero .hero-content {
margin-top: -12em;
position: relative;
padding-left: 75px;
display: flex;
align-items: flex-start;
justify-content: center;
flex-direction: column;
}
.hero .hero-text p {
color: #ffffff;
font-size: 25px;
font-weight: 600;
margin-bottom: 15px;
}
.hero .hero-text h1 {
color: #ffffff;
font-size: 60px;
font-weight: 700;
letter-spacing: 3px;
margin-bottom: 15px;
}
.hero .hero-text h2 {
display: inline-block;
margin: 0;
height: 35px;
color: #ffffff;
font-size: 35px;
font-weight: 600;
}
.hero .hero-text .typed-text {
display: none;
}
.hero .hero-text .typed-cursor {
font-size: 35px;
font-weight: 300;
color: #ffffff;
}
.hero .hero-btn .btn {
margin-top: 35px;
color: #009FF9;
background: #ffffff;
box-shadow: inset 0 0 0 50px #ffffff;
border-radius: .3em;
}
.hero .hero-btn .btn:hover {
color: #ffffff;
background: transparent;
box-shadow: inset 0 0 0 0 #ffffff;
border-color: #ffffff;
}
.hero .hero-btn .btn:first-child {
margin-right: 10px;
}
/******* Section Header ********/
.section-header {
position: relative;
margin-bottom: 45px;
}
.section-header p {
display: inline-block;
margin: 0 30px;
margin-bottom: 10px;
padding-left: 15px;
position: relative;
font-size: 16px;
font-weight: 600;
letter-spacing: 1px;
text-transform: uppercase;
background: #ffffff;
}
.section-header p::before {
position: absolute;
content: "";
height: 3px;
top: 11px;
right: 0;
left: -30px;
background: #009FF9;
z-index: -1;
}
.section-header p::after {
position: absolute;
content: "";
width: 3px;
height: 3px;
top: 11px;
left: 3px;
background: #009FF9;
z-index: 1;
}
.section-header h2 {
margin: 0;
position: relative;
font-size: 45px;
font-weight: 700;
}
/********** About CSS **********/
.about {
position: relative;
width: 100%;
margin: -45px 0 45px 0;
}
.about .col-lg-6 {
padding: 0;
}
.about .section-header {
margin-bottom: 30px;
}
.about .about-img {
position: relative;
height: 100%;
}
.about .about-img img {
position: relative;
width: 100%;
height: 100%;
object-fit: cover;
}
.about .about-content {
padding: 0 60px;
}
.about .about-text p {
font-size: 16px;
}
.about .skills {
margin-bottom: 30px;
}
.about .skill-name {
margin-top: 15px;
}
.about .skill-name p {
display: inline-block;
margin-bottom: 5px;
font-size: 16px;
font-weight: 400;
}
.about .skill-name p:last-child {
float: right;
}
.about .progress {
height: 10px;
border-radius: 10px;
background: #dddddd;
}
.about .progress .progress-bar {
width: 0px;
background: #009FF9;
border-radius: 10px;
transition: 2s;
}
.about .about-text a.btn {
margin-top: 15px;
}
/******* Experience CSS ********/
.experience {
position: relative;
padding: 45px 0 15px 0;
}
.experience .timeline {
position: relative;
width: 100%;
}
.experience .timeline::after {
content: '';
position: absolute;
width: 2px;
background: #009FF9;
top: 0;
bottom: 0;
left: 50%;
margin-left: -1px;
}
.experience .timeline .timeline-item {
position: relative;
background: inherit;
width: 50%;
margin-bottom: 30px;
}
.experience .timeline .timeline-item.left {
left: 0;
padding-right: 30px;
}
.experience .timeline .timeline-item.right {
left: 50%;
padding-left: 30px;
}
.experience .timeline .timeline-item::after {
content: '';
position: absolute;
width: 16px;
height: 16px;
top: 48px;
right: -8px;
background: #ffffff;
border: 2px solid #009FF9;
border-radius: 16px;
z-index: 1;
}
.experience .timeline .timeline-item.right::after {
left: -8px;
}
.experience .timeline .timeline-item::before {
content: '';
position: absolute;
width: 0;
height: 0;
top: 46px;
right: 10px;
z-index: 1;
border: 10px solid;
border-color: transparent transparent transparent #dddddd;
}
.experience .timeline .timeline-item.right::before {
left: 10px;
border-color: transparent #dddddd transparent transparent;
}
.experience .timeline .timeline-date {
position: absolute;
width: 100%;
top: 44px;
font-size: 16px;
font-weight: 600;
color: #009FF9;
text-transform: uppercase;
letter-spacing: 1px;
z-index: 1;
}
.experience .timeline .timeline-item.left .timeline-date {
text-align: left;
left: calc(100% + 55px);
}
.experience .timeline .timeline-item.right .timeline-date {
text-align: right;
right: calc(100% + 55px);
}
.experience .timeline .timeline-text {
padding: 30px;
background: #ffffff;
position: relative;
border-right: 5px solid #dddddd;
box-shadow: 0 0 60px rgba(0, 0, 0, .08);
}
.experience .timeline .timeline-item.right .timeline-text {
border-right: none;
border-left: 5px solid #dddddd;
}
.experience .timeline .timeline-text h2 {
margin: 0 0 5px 0;
font-size: 22px;
font-weight: 600;
}
.experience .timeline .timeline-text h4 {
margin: 0 0 10px 0;
font-size: 16px;
font-style: italic;
font-weight: 400;
}
.experience .timeline .timeline-text p {
margin: 0;
font-size: 16px;
}
/********* Service CSS *********/
.service {
position: relative;
width: 100%;
padding: 45px 0 15px 0;
}
.service .service-item {
position: relative;
margin-bottom: 30px;
display: flex;
align-items: center;
box-shadow: inset 0 0 0 0 transparent;
transition: ease-out 0.5s;
}
.service .service-item:hover {
box-shadow: inset 800px 0 0 0 #009FF9;
}
.service .service-icon {
position: relative;
width: 150px;
min-height: 150px;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #009FF9;
background: #ffffff;
}
.service .service-icon i {
position: relative;
font-size: 60px;
color: #009FF9;
transition: .3s;
}
.service .service-item:hover i {
font-size: 75px;
}
.service .service-text {
position: relative;
width: calc(100% - 120px);
padding: 0 30px;
}
.service .service-text h3 {
margin-bottom: 10px;
font-size: 20px;
font-weight: 600;
transition: 1s;
}
.service .service-text p {
margin: 0;
font-size: 16px;
transition: 1s;
}
/******** Portfolio CSS ********/
.portfolio {
position: relative;
padding: 45px 0 15px 0;
}
.portfolio #portfolio-filter {
padding: 0;
margin: -15px 0 25px 0;
list-style: none;
font-size: 0;
text-align: center;
}
.portfolio #portfolio-filter li {
cursor: pointer;
display: inline-block;
margin: 5px;
padding: 6px 12px;
font-size: 14px;
font-weight: 600;
color: #ffffff;
background: #009FF9;
border: 2px solid transparent;
border-radius: 0;
box-shadow: inset 0 0 0 50px #009FF9;
transition: ease-out 0.3s;
-webkit-transition: ease-out 0.3s;
-moz-transition: ease-out 0.3s;
}
.portfolio #portfolio-filter li:hover,
.portfolio #portfolio-filter li.filter-active {
color: #009FF9;
background: transparent;
box-shadow: inset 0 0 0 0 #009FF9;
border-color: #009FF9;
}
.portfolio .portfolio-item {
position: relative;
}
.portfolio .portfolio-wrap {
position: relative;
width: 100%;
}
.portfolio .portfolio-img {
position: relative;
overflow: hidden;
}
.portfolio .portfolio-img img {
position: relative;
width: 100%;
height: 100%;
object-fit: cover;
transform: scale(1.1);
transition: .5s;
}
.portfolio .portfolio-item:hover img {
margin-left: 15px;
}
.portfolio .portfolio-text {
position: relative;
height: 60px;
width: calc(100% - 30px);
margin: -30px 15px 30px 15px;
display: flex;
align-items: center;
background: #ffffff;
box-shadow: 0 0 15px rgba(0, 0, 0, .12);
}
.portfolio .portfolio-text h3 {
width: calc(100% - 70px);
font-size: 18px;
font-weight: 600;
margin: 0 0 0 15px;
white-space: nowrap;
overflow: hidden;
}
.portfolio .portfolio-text a.btn {
width: 50px;
height: 50px;
padding: 0 0 2px 1px;
display: flex;
align-items: center;
justify-content: center;
font-size: 45px;
font-weight: 100;
border-radius: .1em;
}
.portfolio .portfolio-item:hover a.btn {
color: #009FF9;
background: transparent;
box-shadow: inset 0 0 0 0 #009FF9;
border-color: #009FF9;
}
/********* Banner CSS **********/
.banner {
position: relative;
width: 100%;
margin: 45px 0;
padding: 90px 0;
background: #009FF9;
}
.banner .container {
max-width: 750px;
text-align: center;
}
.banner .section-header {
margin-bottom: 20px;
}
.banner .section-header p {
color: #414141;
background: transparent;
}
.banner .section-header p::after {
display: none;
}
.banner .section-header h2 {
color: #ffffff;
}
.banner .section-header h2 span {
color: #414141;
font-size: 50px;
}
.banner .banner-text p {
font-size: 18px;
color: #ffffff;
}
.banner .banner-text .btn {
margin-top: 15px;
color: #009FF9;
background: #ffffff;
box-shadow: inset 0 0 0 50px #ffffff;
border-radius: .3em;
}
/********* Pricing CSS *********/
.price {
position: relative;
width: 100%;
padding: 45px 0 15px 0;
}
.price .row {
padding: 0 15px;
}
.price .col-md-4 {
padding: 0;
}
.price .price-item {
position: relative;
margin-bottom: 30px;
background: #ffffff;
}
.price .featured-item {
box-shadow: 0 0 30px rgba(0, 0, 0, .2);
z-index: 1;
border-radius: .3em;
}
.price .price-header,
.price .price-body,
.price .price-footer {
position: relative;
text-align: center;
}
.price .price-header {
padding: 45px 0 30px 0;
color: #414141;
}
.price .price-item.featured-item .price-header {
color: #009FF9;
}
.price .price-title h2 {
font-size: 25px;
font-weight: 400;
text-transform: uppercase;
}
.price .price-prices h2 {
font-size: 45px;
font-weight: 700;
margin-left: 10px;
}
.price .price-prices h2 small {
position: absolute;
font-size: 18px;
font-weight: 400;
margin-top: 9px;
margin-left: -12px;
}
.price .price-prices h2 span {
margin-left: 1px;
font-size: 18px;
font-weight: 400;
}
.price .price-item.featured-item h2 {
color: #009FF9;
}
.price .price-body {
padding: 0 0 20px 0;
}
.price .price-description ul {
margin: 0;
padding: 0;
list-style: none;
}
.price .price-description ul li {
padding: 0 0 20px 0;
}
.price .price-item .price-action {
padding-bottom: 45px;
}
.price .price-item .price-action .btn {
color: #ffffff;
background: #414141;
box-shadow: inset 0 0 0 50px #414141;
border-radius: .3em;
}
.price .price-item .price-action .btn:hover {
color: #414141;
background: transparent;
box-shadow: inset 0 0 0 0 #414141;
border-color: #414141;
}
.price .price-item.featured-item .price-action .btn {
color: #ffffff;
background: #009FF9;
box-shadow: inset 0 0 0 50px #009FF9;
border-radius: .3em;
}
/*********** Team CSS **********/
.team {
position: relative;
width: 100%;
padding: 45px 0 15px 0;
}
.team .team-item {
position: relative;
background: #ffffff;
margin-bottom: 30px;
display: flex;
align-items: center;
justify-content: flex-start;
box-shadow: inset 0 0 0 0 transparent;
transition: ease-out 0.5s;
border-radius: .3em;
}
.team .team-img {
position: relative;
width: 50%;
overflow: hidden;
border-radius: .3em;
}
.team .team-img img {
position: relative;
width: 100%;
transition: .5s;
}
.team .team-text {
position: relative;
width: 50%;
padding: 0 30px;
}
.team .team-text h2 {
color: #009FF9;
font-size: 18px;
font-weight: 600;
margin-bottom: 5px;
transition: 1s;
}
.team .team-text h4 {
font-size: 14px;
font-weight: 600;
margin-bottom: 15px;
transition: 1s;
}
.team .team-text p {
margin-bottom: 20px;
transition: 1s;
}
.team .team-social {
position: relative;
display: flex;
align-items: center;
justify-content: flex-start;
}
.team .team-social a.btn {
width: 35px;
height: 35px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: normal;
margin-right: 5px;
border-radius: .2em;
}
.team .team-item:hover {
box-shadow: inset 800px 0 0 0 #009FF9;
}
.team .team-item:hover .team-img img {
transform: scale(1.2);
}
.team .team-item:hover .team-text h2,
.team .team-item:hover .team-text h4,
.team .team-item:hover .team-text p {
color: #ffffff;
}
.team .team-item:hover .team-social a.btn {
background: #ffffff;
}
.team .team-item:hover .team-social a.btn:hover {
border-color: #ffffff;
}
/******* Testimonial CSS *******/
.testimonial {
position: relative;
margin: 45px 0;
padding: 90px 0;
background: #009FF9;
}
.testimonial .container {
max-width: 900px;
}
.testimonial .testimonial-icon {
margin-bottom: 45px;
text-align: center;
}
.testimonial .testimonial-icon i {
font-size: 60px;
color: rgba(256, 256, 256, .5);
}
.testimonial .testimonial-item {
position: relative;
margin: 0 15px;
text-align: center;
}
.testimonial .testimonial-img {
position: relative;
margin-bottom: 15px;
z-index: 1;
}
.testimonial .testimonial-item img {
margin: 0 auto;
width: 120px;
padding: 10px;
/* border: 5px dotted #ffffff; */
/* border-radius: 100px; */
}
/********* Contact CSS *********/
.contact {
position: relative;
width: 100%;
margin: 45px 0;
background: #ffffff;
}
.contact .container-fluid {
background: url(../img/mail.png) left center no-repeat;
background-size: contain;
}
.contact .contact-form {
position: relative;
padding: 90px 0 90px 45px;
background: #ffffff;
}
.contact .contact-form input {
color: #8d8d8d;
padding: 15px 0;
background: none;
border-radius: 0;
border: none;
border-bottom: 1px solid #8d8d8d;
}
.contact .contact-form textarea {
color: #5a5151;
height: 90px;
padding: 15px 0;
background: none;
border-radius: 0;
border: none;
border-bottom: 1px solid #8d8d8d;
}
.contact .contact-form .form-control::placeholder {
color: #747474;
opacity: 1;
}
.contact .contact-form .form-control:-ms-input-placeholder,
.contact .contact-form .form-control::-ms-input-placeholder {
color: #8d8d8d;
}
/*********** Blog CSS **********/
.blog {
position: relative;
width: 100%;
padding: 45px 0 15px 0;
}
.blog .blog-item {
position: relative;
margin-bottom: 30px;
}
.blog .blog-img {
position: relative;
width: 100%;
overflow: hidden;
}
.blog .blog-img img {
width: 100%;
transition: .5s;
}
.blog .blog-item:hover img {
transform: scale(1.1);
}
.blog .blog-text {
position: relative;
padding: 30px;
border-right: 1px solid rgba(0, 0, 0, .07);
border-bottom: 1px solid rgba(0, 0, 0, .07);
border-left: 1px solid rgba(0, 0, 0, .07);
}
.blog .blog-text h2 {
font-size: 25px;
font-weight: 600;
}
.blog .blog-text p {
margin-bottom: 10px;
}
.blog .blog-item a.btn {
margin-top: 10px;
padding: 8px 15px;
}
.blog .blog-item a.btn i {
margin-left: 5px;
}
.blog .blog-meta {
position: relative;
display: flex;
margin-bottom: 15px;
}
.blog .blog-meta p {
margin: 0 10px 0 0;
font-size: 13px;
}
.blog .blog-meta i {
color: #414141;
margin-right: 5px;
}
.blog .blog-meta p:last-child {
margin: 0;
}
/********* Footer CSS **********/
.footer {
position: relative;
margin-top: 45px;
/* background: #009FF9; */
}
.footer .container-fluid {
padding: 60px 0 0 0;
}
.footer .footer-info {
position: relative;
width: 100%;
text-align: center;
}
.footer .footer-info h2 {
margin-bottom: 20px;
font-size: 30px;
font-weight: 700;
color: #ffffff;
}
.footer .footer-info h3 {
margin-bottom: 25px;
font-size: 22px;
font-weight: 600;
color: #ffffff;
}
.footer .footer-menu {
width: 100%;
display: flex;
justify-content: center;
}
.footer .footer-menu p {
color: #ffffff;
font-size: 22px;
font-weight: 600;
line-height: 20px;
padding: 0 15px;
border-right: 1px solid #ffffff;
}
.footer .footer-menu p:last-child {
border: none;
}
.footer .footer-social {
position: relative;
margin-top: 15px;
}
.footer .footer-social a {
display: inline-block;
}
.footer .footer-social a i {
margin-right: 15px;
font-size: 20px;
color: #ffffff;
transition: .3s;
}
.footer .footer-social a:last-child i {
margin: 0;
}
.footer .footer-social a:hover i {
color: #414141;
}
.footer .copyright {
position: relative;
text-align: center;
margin-top: 30px;
padding-top: 25px;
padding-bottom: 25px;
}
.footer .copyright::before {
position: absolute;
content: "";
width: 50%;
height: 1px;
top: 0;
left: 25%;
background: rgba(256, 256, 256, .2);
}
enter image description here
Thanks to all, I just knew where the problem was i added this to the body
max-width: 100%;
overflow-x: hidden;
and it's solved the problem credit to this user
omma2289

My dropdown menu keeps appearing when I don't want it too

So, I got a navigation bar with dropdown menus. Whenever I move my cursor where the drop-down menu is hidden, it opens, and I need to disable that without disabling the drop-down menu as a whole. Any tips on how to do that?
If you want to go ahead and look at the latest version of my website can be found below.
Here's the link: https://p1ayerone.github.io/
And here's the CSS code:
#import url('https://fonts.googleapis.com/css2?family=Roboto:wght#300&display=swap');
:root {
--background: rgba(54, 57, 63, .85);
}
*,
*::before,
*::after {
margin: 0px;
padding: 0px;
box-sizing: inherit;
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
background: url(../../img/bg/bg.png) fixed center;
background-attachment: fixed;
background-position: center;
font-family: 'Roboto', sans-serif;
font-weight: 400;
box-sizing: border-box;
color: silver;
}
.content {
height: 200vh;
background-size: cover;
display: grid;
place-items: center;
}
/* navigation styles start here */
header {
z-index: 999;
width: 100%;
right: 0%;
top: 0%;
position: fixed;
}
.logo {
margin: 0;
color: silver;
list-style: none;
}
.img-logo {
margin-right: 15px;
padding-top: 8px;
margin-bottom: -10px;
}
.nav-toggle {
display: none;
}
.nav-toggle-label {
position: absolute;
top: 0;
left: 0;
margin-left: 1em;
height: 100%;
display: flex;
align-items: left;
margin-top: 3.5%;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
display: block;
background: white;
height: 2px;
width: 2em;
border-radius: 2px;
position: relative;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after {
content: '';
position: absolute;
}
.nav-toggle-label span::before {
bottom: 7px;
}
.nav-toggle-label span::after {
top: 7px;
}
.nav {
text-transform: uppercase;
font-size: 1.2rem;
background: var(--background);
padding-bottom: 1.7%;
}
.nav::after {
content: "";
display: table;
clear: both;
}
.nav-main {
float: right;
list-style: none;
margin-bottom: -21px;
padding-bottom: -15px;
}
.nav-main-item {
display: inline-block;
width: 12rem;
position: relative;
}
li {
list-style: none;
}
.nav-main a {
text-align: center;
padding: 1rem;
color: #eee;
text-decoration: none;
display: block;
}
.nav-main-item a:hover {
background-color: gray;
}
.nav-main-item:hover > * {
opacity: 1;
margin: 0;
}
.navi-main-item {
opacity: 0;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.more-main-item {
opacity: 0;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.nav-toggle:checked ~ nav {
transform: scale(1,1);
}
.nav-toggle:checked ~ nav a {
opacity: 1;
transition: opacity 250ms ease-in-out 250ms;
}
.destiny-intro-p {
padding-left: 100px;
font-size: 1.3rem;
}
.destiny-intro-h1 {
font-size: 3rem;
}
.body-block {
background-color: black;
color: white;
padding-bottom: 6%;
}
#media screen and (min-width: 800px) {
.nav-toggle-label {
display: none;
}
header {
z-index: 999;
width: 100%;
right: 0%;
top: 0%;
position: fixed;
}
.logo {
margin: 0;
color: silver;
list-style: none;
padding-top: 15;
}
.nav {
text-transform: uppercase;
font-size: 1.2rem;
background: var(--background);
}
.nav::after {
content: "";
display: table;
clear: both;
}
.nav-main {
float: right;
list-style: none;
}
.nav-main-item {
display: inline-block;
width: 10rem;
position: relative;
}
.nav-main a {
text-align: center;
padding: 1rem;
color: white;
text-decoration: none;
display: block;
}
.nav-main-item a:hover {
background-color: silver;
}
.nav-main-item:hover > * {
opacity: 1;
margin: 0;
}
.navi-main-item {
opacity: 0;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.Discord {
float: right;
}
.gif-Destiny {
width: 200px;
float: right;
color: silver;
}
.Zachary {
color: black;
text-decoration: none;
}
.introduction {
color: black;
}
.footer {
background-color: #1F2E4B;
color: white;
text-align: center;
font-size: 20px;
float: center;
margin-top: 100%;
}
.CbZD{
color: #00FFFF;
font-size: 30px;
}
}
.Discord {
float: right;
}
.img-Destiny {
padding-top: 0px;
width: 300px;
float: right;
color: black;
}
.Zachary {
color: black;
text-decoration: none;
}
.introduction {
color: black;
}
.footer {
background-color: #1F2E4B;
color: white;
text-align: center;
font-size: 20px;
float: center;
}
.CbZD{
color: #00FFFF;
font-size: 30px;
}
/* Videos */
.tse {
color: #07FC1B;
text-align: center;
}
/* Characters */
.img-TBG {
background-color: white;
color: black;
float: left;
width: 300px;
height: 500px;
}
/* Applications */
.silver-box {
background-color: silver;
color: black;
height: 1400px;
width: 640px;
}
/* About Me */
.abtme {
width: 50%;
margin: 0 auto;
}
/* Links */
.contact-me {
color: silver;
}
.gmail-footer {
color: silver;
}
.twitter-footer {
color: silver;
}
/* Contact */
.contact-title {
margin-top: 100px;
color: white;
text-transform: uppercase;
transition: all 4s ease-in-out;
}
.contact-title h1 {
font-size: 32px;
line-height: -10px;
}
.contact-title h2 {
font-size: 16px;
}
form {
margin-top: 50px;
transition: all 4s ease-in-out;
}
.form-control {
width: 600px;
background: var(--background);
border: none;
outline: none;
border-bottom: 1px solid gray;
color: white;
font-size: 18px;
margin-bottom: 16px;
}
input {
height: 45px;
}
form .submit {
background: #ff5722;
border-color: transparent;
color: #fff;
font-size: 20px;
font-weight: bold;
letter-spacing: 2px;
height: 50px;
margin-top: 20px;
}
form .submit:hover {
background-color: #f44336;
cursor: pointer;
}
Instead of using opacity:0 and opacity:1 to display the dropdown, you can use display:none and display:inline-block. When using opacity, it doesn't remove the element from the page, which is why the dropdown would appear when hovering in that area.
Can read more about this here https://magnusbenoni.com/difference-between-display-visibility-opacity/
.nav-main-item:hover > .navi-main-item {
display: inline-block;
margin: 0;
}
.navi-main-item {
display: none;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}

width 100% causes horizontal scrollbar

I've created a page with HTML and CSS, the problem is horizontal scrollbar is showing up although as far as I've checked there is no element with width over 100% or inappropriate padding or margin.
here is the complete HTML and CSS code: https://jsfiddle.net/m11nsbag/9/
#keyframes modalAnimation {
from {
top: 90vh;
}
to {
top: 95vh;
background-color: darkcyan;
box-shadow: 5px 5px 25px #747474;
}
}
#headerImage {
width: 100vw;
height: 100vh;
overflow: hidden;
position: fixed;
padding: 0px;
margin: 0px;
z-index: -10000000;
}
#main-nav>li {
width: 9vw;
height: 7vh;
color: #ffffff;
float: right;
text-align: center;
line-height: 7vh;
margin: 0px;
font-size: medium;
z-index: 100;
list-style-type: none;
transition: 0.25s;
}
#main-nav {
background-color: rgba(245, 255, 249, 0.5);
width: 100%;
height: 7vh;
position: fixed;
z-index: 100;
float: right;
transition: all 0.25s;
}
/*
#main-nav:hover {
background-color: rgba(0,129,129,1);
} */
#main-nav>li:hover {
background-color: rgb(232, 255, 92);
}
#wall {
background-color: #d2d2d2;
width: 100%;
height: 100vh;
z-index: -10;
}
* {
margin: 0px;
padding: 0px;
}
#main-nav>li>a {
color: #000;
text-decoration: none;
}
.modalLayout {
opacity: 0;
}
.modalLayout:target {
position: fixed;
background-color: rgba(0, 0, 0, 0.5);
width: 100vw;
height: 100vh;
opacity: 1;
transition: all 0.4s;
z-index: 200;
}
.modal {
text-align: center;
padding: 6% 1% 1.7% 1%;
width: 30vw;
height: 20vh;
margin: 30vh 35vw;
background-color: crimson;
position: fixed;
transition: all 0.4s;
z-index: 10;
border-radius: 10px;
box-shadow: 2px 2px #484848;
}
.closeBtn {
font-size: 35px;
position: absolute;
top: 25vh;
right: 33vw;
float: right;
color: #fff;
font-weight: bold;
text-decoration: none;
z-index: 1000;
cursor: pointer;
margin-right: 5px;
transition: all 0.4s;
}
.mainPageButton>div {
display: none;
}
.mainPageButton:hover>div {
display: block;
transition: all 0.25s;
}
.mainPageButton>div>div {
width: 15vw;
height: 8vh;
background-color: #d2d2d2;
color: #000;
font-size: medium;
float: top;
border-bottom: black 1px solid;
list-style-type: none;
position: relative;
line-height: 8vh;
}
.mainPageButton>div>div>a {
text-decoration: none;
color: #fff;
font-size: medium;
text-align: center;
list-style-type: none;
background-color: #d2d2d2;
padding-right: 2px;
}
.mainMenu {
position: absolute;
top: 88vh;
z-index: 0;
margin-right: 1vw;
}
.mainMenu>div {
width: 15vw;
height: 10vh;
border-bottom: black solid 2px;
margin-bottom: 3vh;
background-color: white;
transition: all .3s;
text-align: center;
line-height: 10vh;
}
.mainMenu>div:hover {
width: 17vw;
height: 12vh;
background-color: #ffcfce;
}
.mainMenu>div>a {
font-size: x-large;
color: #000;
cursor: pointer;
text-decoration: none;
}
.about {
width: 20vw;
height: 40vh;
background-color: #94ffca;
border-radius: 5px;
position: absolute;
top: 88vh;
left: 0;
float: left;
font-size: larger;
padding: 1vw;
transition: all 0.3s;
margin-left: 4px;
overflow: auto;
}
.about:hover {
transform: translate(5px);
background-color: rgba(148, 255, 202, 0.5);
}
#modalcontainer {
background-color: rgba(256, 256, 256, 0.75);
top: 80vh;
position: absolute;
width: 100vw;
height: 200%;
z-index: -10;
border-top-left-radius: 50px;
border-top-right-radius: 50px;
}
#modalswall {
width: 50vw;
height: 150vh;
background-color: #0d213c;
position: absolute;
top: 85vh;
right: 20vw;
z-index: -5;
border-radius: 8px;
box-shadow: 20px 20px 25px grey;
filter: opacity(90%);
}
.bodyModals {
background-color: #acd7ff;
top: 90vh;
width: 35vw;
height: 25vh;
right: 28vw;
position: relative;
z-index: 5;
border-radius: 10px;
transition: all .5s;
margin-bottom: 10vh;
}
.bodyModals:hover {
-webkit-animation: modalAnimation;
-webkit-animation-duration: 3s;
-webkit-animation-direction: alternate;
-webkit-animation-iteration-count: infinite;
}
.bodyModals>p {
padding: 1vw;
font-size: large;
}
#wrapper {
margin-bottom: 170vh;
position: relative;
}
#footer {
position: relative;
width: 100vw;
min-height: 25vh;
bottom: 0;
background-color: #0d213c;
}
#footer>p {
font-size: large;
text-align: center;
color: #fff;
padding: 10px 0px;
}
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
I think there maybe a padding or margin which I'm overlooking but I've been looking at it for several hours and tried almost anything.
thanks for your sincere help.
Update: I changed all the 100vw with 100% and the problem was fixed.
Vertical scrollbars are included in vw units.
So when there's a vertical scrollbar, 100vw is wider than the viewport (without scrollbars).
One suggestion is to change #modalcontainer to width:100% instead of width:100vw.
#keyframes modalAnimation {
from {
top: 90vh;
}
to {
top: 95vh;
background-color: darkcyan;
box-shadow: 5px 5px 25px #747474;
}
}
#headerImage {
width: 100vw;
height: 100vh;
overflow: hidden;
position: fixed;
padding: 0px;
margin: 0px;
z-index: -10000000;
}
#main-nav>li {
width: 9vw;
height: 7vh;
color: #ffffff;
float: right;
text-align: center;
line-height: 7vh;
margin: 0px;
font-size: medium;
z-index: 100;
list-style-type: none;
transition: 0.25s;
}
#main-nav {
background-color: rgba(245, 255, 249, 0.5);
width: 50%;
height: 7vh;
position: fixed;
z-index: 100;
float: right;
transition: all 0.25s;
}
/*
#main-nav:hover {
background-color: rgba(0,129,129,1);
} */
#main-nav>li:hover {
background-color: rgb(232, 255, 92);
}
#wall {
background-color: #d2d2d2;
width: 50%;
height: 100vh;
z-index: -10;
}
* {
margin: 0px;
padding: 0px;
}
#main-nav>li>a {
color: #000;
text-decoration: none;
}
.modalLayout {
opacity: 0;
}
.modalLayout:target {
position: fixed;
background-color: rgba(0, 0, 0, 0.5);
width: 100vw;
height: 100vh;
opacity: 1;
transition: all 0.4s;
z-index: 200;
}
.modal {
text-align: center;
padding: 6% 1% 1.7% 1%;
width: 30vw;
height: 20vh;
margin: 30vh 35vw;
background-color: crimson;
position: fixed;
transition: all 0.4s;
z-index: 10;
border-radius: 10px;
box-shadow: 2px 2px #484848;
}
.closeBtn {
font-size: 35px;
position: absolute;
top: 25vh;
right: 33vw;
float: right;
color: #fff;
font-weight: bold;
text-decoration: none;
z-index: 1000;
cursor: pointer;
margin-right: 5px;
transition: all 0.4s;
}
.mainPageButton>div {
display: none;
}
.mainPageButton:hover>div {
display: block;
transition: all 0.25s;
}
.mainPageButton>div>div {
width: 15vw;
height: 8vh;
background-color: #d2d2d2;
color: #000;
font-size: medium;
float: top;
border-bottom: black 1px solid;
list-style-type: none;
position: relative;
line-height: 8vh;
}
.mainPageButton>div>div>a {
text-decoration: none;
color: #fff;
font-size: medium;
text-align: center;
list-style-type: none;
background-color: #d2d2d2;
padding-right: 2px;
}
.mainMenu {
position: absolute;
top: 88vh;
z-index: 0;
margin-right: 1vw;
}
.mainMenu>div {
width: 15vw;
height: 10vh;
border-bottom: black solid 2px;
margin-bottom: 3vh;
background-color: white;
transition: all .3s;
text-align: center;
line-height: 10vh;
}
.mainMenu>div:hover {
width: 17vw;
height: 12vh;
background-color: #ffcfce;
}
.mainMenu>div>a {
font-size: x-large;
color: #000;
cursor: pointer;
text-decoration: none;
}
.about {
width: 20vw;
height: 40vh;
background-color: #94ffca;
border-radius: 5px;
position: absolute;
top: 88vh;
left: 0;
float: left;
font-size: larger;
padding: 1vw;
transition: all 0.3s;
margin-left: 4px;
overflow: auto;
}
.about:hover {
transform: translate(5px);
background-color: rgba(148, 255, 202, 0.5);
}
#modalcontainer {
background-color: rgba(256, 256, 256, 0.75);
top: 80vh;
position: absolute;
width: 100%;
height: 200%;
z-index: -10;
border-top-left-radius: 50px;
border-top-right-radius: 50px;
}
#modalswall {
width: 50vw;
height: 150vh;
background-color: #0d213c;
position: absolute;
top: 85vh;
right: 20vw;
z-index: -5;
border-radius: 8px;
box-shadow: 20px 20px 25px grey;
filter: opacity(90%);
}
.bodyModals {
background-color: #acd7ff;
top: 90vh;
width: 35vw;
height: 25vh;
right: 28vw;
position: relative;
z-index: 5;
border-radius: 10px;
transition: all .5s;
margin-bottom: 10vh;
}
.bodyModals:hover {
-webkit-animation: modalAnimation;
-webkit-animation-duration: 3s;
-webkit-animation-direction: alternate;
-webkit-animation-iteration-count: infinite;
}
.bodyModals>p {
padding: 1vw;
font-size: large;
}
#wrapper {
margin-bottom: 170vh;
position: relative;
}
#footer {
position: relative;
width: 50vw;
min-height: 25vh;
bottom: 0;
background-color: #0d213c;
}
#footer>p {
font-size: large;
text-align: center;
color: #fff;
padding: 10px 0px;
}
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
<ul id="main-nav">
<li class="mainPageButton">
<div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
</div>
</li>
<li>
</li>
<li>
</li>
</ul>
<img src="http://ghmahdi.ir/wp-content/uploads/header.jpg" id="headerImage">
<div id="wrapper">
<div id="aboutMe" class="modalLayout">
<div>
×
</div>
<div class="modal"></div>
</div>
<div id="contactUS" class="modalLayout">
<div>
×
</div>
<div class="modal"></div>
</div>
<div class="mainMenu">
<div> </div>
<div></div>
<div></div>
<div></div>
</div>
<div class="about"></div>
<div id="modalswall"></div>
<div class="bodyModals"> </div>
<div class="bodyModals"></div>
<div class="bodyModals"></div>
<div id="modalcontainer"> </div>
</div>
<div id="footer">
</div>
For interest, also see:
Bug 133271
viewport units in case of 'overflow:auto'

How to align buttons with html and css?

I wrote a little html page that contains some buttons. What I want to do is to have them look like this :
I'm not good at all at css, I tried some combination but what I get is to have them "below the blue line" like this :
Here is my html code :
<div class="module form-module">
<div class="flex-container">
<article class="article">
<table>
<tr>
<td>
<button>Configurations</button>
</td>
<td>
<button>Create User </button>
</td>
<td>
<button>Update User</button>
</td>
<td>
<button>Create Group</button>
</td>
<td>
<button>Update Group</button>
</td>
</tr>
</table>
</article>
</div>
</div>
You can find my css code in that plunker : https://plnkr.co/edit/sCcBBFfWRiCwGz8hs8oR?p=catalogue
Can you please help me to fix this little problem in html ?
CSS changes:
.form-module {
border-bottom: 5px solid #33b5e5;
position: relative;
background: #ffffff;
width: 100%;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
margin: 0 auto;
align: right;
}
.flex-container > * {
padding: 15px;
-webkit-flex: 1 100%;
flex: 1 100%;
}
table {
border-spacing:0px;
}
td {
padding:0px;
}
Changes expalined:
The blue line is a border, and was set on the button's parent container. It was set to top when you wanted it to be on the bottom, so that's first change.
Then you had padding, which was separating the buttons from the edges of the container, that's second change, set it to 0px.
Finally, both the table and each button had a 1px border which would separate it from the edges of the container, third change was setting those borders to 0px.
Small suggestion:
In case you're not aware: it's really helpful to use browser inspector to better understand what's going on with CSS. Also, if you don't wish to make everything from scratch, I'd recommend you have a look at Bootstrap, it's quite easy and might save you a bunch of time.
Good luck.
In case it's useful, here's the complete CSS:
body {
background: #e9e9e9;
color: #666666;
font-family: 'RobotoDraft', 'Roboto', sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
table {
border-spacing:0px;
}
td {
padding:0px;
}
/* Pen Title */
.pen-title {
padding: 50px 0;
text-align: center;
letter-spacing: 2px;
}
.pen-title h1 {
margin: 0 0 20px;
font-size: 48px;
font-weight: 300;
}
.pen-title span {
font-size: 12px;
}
.pen-title span .fa {
color: #33b5e5;
}
.pen-title span a {
color: #33b5e5;
font-weight: 600;
text-decoration: none;
}
/* Form Module */
.form-module {
position: relative;
background: #ffffff;
width: 100%;
border-bottom: 5px solid #33b5e5;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
margin: 0 auto;
align: right;
}
.form-module .toggle {
cursor: pointer;
position: absolute;
top: -0;
right: -0;
background: #33b5e5;
width: 30px;
height: 30px;
margin: -5px 0 0;
color: #ffffff;
font-size: 12px;
line-height: 30px;
text-align: center;
}
.form-module .toggle .tooltip {
position: absolute;
top: 5px;
right: -65px;
display: block;
background: rgba(0, 0, 0, 0.6);
width: auto;
padding: 5px;
font-size: 10px;
line-height: 1;
text-transform: uppercase;
}
.form-module .toggle .tooltip:before {
content: '';
position: absolute;
top: 5px;
left: -5px;
display: block;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid rgba(0, 0, 0, 0.6);
}
.form-module .form {
display: none;
padding: 40px;
}
.form-module .form:nth-child(2) {
display: block;
}
.form-module h2 {
margin: 0 0 20px;
color: #33b5e5;
font-size: 18px;
font-weight: 400;
line-height: 1;
}
.form-module table {
width: 100%
}
.form-module input {
outline: none;
width: 80%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-weight: 400;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.form-module input:focus {
border: 1px solid #33b5e5;
color: #333333;
}
.form-module button {
cursor: pointer;
background: #33b5e5;
width: 90%;
border: 0;
padding: 10px 15px;
color: #ffffff;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.form-module button:hover {
background: #178ab4;
}
.form-module select {
cursor: pointer;
width: 85%;
height:80%;
padding: 10px 15px;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.flag button {
background: white;
color: #178ab4;
}
.flag button:hover {
background: white;
border: 20px;
border-color: #178ab4;
}
.flag {
cursor: pointer;
background: white;
width: 100%;
border: 0;
padding: 10px 15px;
border-color: #178ab4;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.flag a {
cursor: pointer;
background: white;
width: 100%;
border: 0;
color: #33b5e5;
border-color: #178ab4;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.flag a :hover {
background: white;
}
.form-module .cta {
background: #f2f2f2;
width: 100%;
padding: 15px 40px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
text-align: center;
}
.form-module .cta a {
color: #333333;
text-decoration: none;
}
.flex-container {
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
align: right;
}
.flex-container > * {
padding: 0px;
-webkit-flex: 1 100%;
flex: 1 100%;
}
.article {
text-align: left;
}
.detail button {
width: 120px
}
.detail table {
border-collapse: separate;
border-spacing: 5px 10px;
width: 100%
}
.search table {
border-collapse: separate;
border-spacing: 5px 10px;
width: 70%
}
.search button {
width: 120px
}
.search input {
outline: none;
width: 90%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-weight: 400;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.search select {
cursor: pointer;
width: 90%;
padding: 10px 15px;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.resultSearch table {
border-collapse: separate;
border-spacing: 5px 10px;
width: 80%
}
.dropbtn {
outline: none;
border:1;
width: 80%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-size: 16px;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
}
#myInput {
border-box: box-sizing;
background-image: url('searchicon.png');
background-position: 14px 12px;
background-repeat: no-repeat;
font-size: 16px;
outline: none;
width: 100%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f6f6f6;
min-width: 230px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {background-color: #ddd}
.show {display:block;}
#searchbox
{
width: 35px;
}
#media all and (min-width: 768px) {
.nav {text-align:left;-webkit-flex: 1 auto;flex:1 auto;-webkit-order:1;order:1;}
.article {-webkit-flex:5 0px;flex:5 0px;-webkit-order:2;order:2;}
footer {-webkit-order:3;order:3;}
}
.newUser button {
width: 120px
}
.newUser table {
border-collapse: separate;
border-spacing: 5px 10px;
width: 90%
}
.return table{
border-collapse: separate;
border-spacing: 5px 10px;
width: 90%;
}
.returnCheckBox input {
align: left;
width:0%;
}
.invoiceListTable table {
border-collapse: separate;
border-spacing: 5px 10px;
width: 90%
}
.sessionInfo table {
border-collapse: separate;
border-spacing: 5px 10px;
width: 100%;
align: right;
}
.sessionInfo {
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
align: right;
}
.sessionInfo > * {
padding: 15px;
-webkit-flex: 1 100%;
flex: 1 100%;
align: right;
}
.sessionInfo {
position: relative;
background: #ffffff;
width: 20%;
border-top: 5px solid #33b5e5;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
margin: 0 auto;
align: right;
}
.sessionInfo .toggle {
cursor: pointer;
position: absolute;
top: -0;
right: -0;
background: #33b5e5;
width: 30px;
height: 30px;
margin: -5px 0 0;
color: #ffffff;
font-size: 12px;
line-height: 30px;
text-align: center;
}
.sessionInfo .toggle .tooltip {
position: absolute;
top: 5px;
right: -65px;
display: block;
background: rgba(0, 0, 0, 0.6);
width: auto;
padding: 5px;
font-size: 10px;
line-height: 1;
text-transform: uppercase;
}
.sessionInfo .toggle .tooltip:before {
content: '';
position: absolute;
top: 5px;
left: -5px;
display: block;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid rgba(0, 0, 0, 0.6);
}
.form-module .form {
display: none;
padding: 40px;
align:right;
}
UPDATE:
You mentioned the buttons should be outside and above the form-module, so the html needs to be changed and not just the css. We removed the flex-container div which was nested inside form-module div and placed it after this container is closed. Since the buttons were getting their layout properties from .form-module's style, it was necessary to create a new class "buttons". Basically now form-module and buttons are in different containers and with separated style properties.
To understand how container blocks work:
http://www.w3schools.com/html/html_blocks.asp
html:
<div class="flex-container buttons">
<article class="article">
<table>
<tr>
<td>
<button>Configurations</button>
</td>
<td>
<button>Create User </button>
</td>
<td>
<button>Update User</button>
</td>
<td>
<button>Create Group</button>
</td>
<td>
<button>Update Group</button>
</td>
</tr>
</table>
</article>
</div>
<div class="module form-module">
</div>
changed css:
body {
background: #e9e9e9;
color: #666666;
font-family: 'RobotoDraft', 'Roboto', sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.buttons table {
width: 100%;
border-spacing:0px;
}
.buttons td {
padding:0px;
}
.buttons input {
outline: none;
width: 80%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-weight: 400;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.buttons input:focus {
border: 1px solid #33b5e5;
color: #333333;
}
.buttons button {
cursor: pointer;
background: #33b5e5;
width: 90%;
border: 0;
padding: 10px 15px;
color: #ffffff;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.buttons button:hover {
background: #178ab4;
}
.buttons select {
cursor: pointer;
width: 85%;
height:80%;
padding: 10px 15px;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
complete css:
body {
background: #e9e9e9;
color: #666666;
font-family: 'RobotoDraft', 'Roboto', sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.buttons table {
width: 100%;
border-spacing:0px;
}
.buttons td {
padding:0px;
}
.buttons input {
outline: none;
width: 80%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-weight: 400;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.buttons input:focus {
border: 1px solid #33b5e5;
color: #333333;
}
.buttons button {
cursor: pointer;
background: #33b5e5;
width: 90%;
border: 0;
padding: 10px 15px;
color: #ffffff;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.buttons button:hover {
background: #178ab4;
}
.buttons select {
cursor: pointer;
width: 85%;
height:80%;
padding: 10px 15px;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
/* Pen Title */
.pen-title {
padding: 50px 0;
text-align: center;
letter-spacing: 2px;
}
.pen-title h1 {
margin: 0 0 20px;
font-size: 48px;
font-weight: 300;
}
.pen-title span {
font-size: 12px;
}
.pen-title span .fa {
color: #33b5e5;
}
.pen-title span a {
color: #33b5e5;
font-weight: 600;
text-decoration: none;
}
/* Form Module */
.form-module {
position: relative;
background: #ffffff;
width: 100%;
border-top: 5px solid #33b5e5;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
margin: 0 auto;
align: right;
}
.form-module .toggle {
cursor: pointer;
position: absolute;
top: -0;
right: -0;
background: #33b5e5;
width: 30px;
height: 30px;
margin: -5px 0 0;
color: #ffffff;
font-size: 12px;
line-height: 30px;
text-align: center;
}
.form-module .toggle .tooltip {
position: absolute;
top: 5px;
right: -65px;
display: block;
background: rgba(0, 0, 0, 0.6);
width: auto;
padding: 5px;
font-size: 10px;
line-height: 1;
text-transform: uppercase;
}
.form-module .toggle .tooltip:before {
content: '';
position: absolute;
top: 5px;
left: -5px;
display: block;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid rgba(0, 0, 0, 0.6);
}
.form-module .form {
display: none;
padding: 40px;
}
.form-module .form:nth-child(2) {
display: block;
}
.form-module h2 {
margin: 0 0 20px;
color: #33b5e5;
font-size: 18px;
font-weight: 400;
line-height: 1;
}
.form-module table {
width: 100%
}
.form-module input {
outline: none;
width: 80%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-weight: 400;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.form-module input:focus {
border: 1px solid #33b5e5;
color: #333333;
}
.form-module button {
cursor: pointer;
background: #33b5e5;
width: 90%;
border: 0;
padding: 10px 15px;
color: #ffffff;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.form-module button:hover {
background: #178ab4;
}
.form-module select {
cursor: pointer;
width: 85%;
height:80%;
padding: 10px 15px;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.flag button {
background: white;
color: #178ab4;
}
.flag button:hover {
background: white;
border: 20px;
border-color: #178ab4;
}
.flag {
cursor: pointer;
background: white;
width: 100%;
border: 0;
padding: 10px 15px;
border-color: #178ab4;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.flag a {
cursor: pointer;
background: white;
width: 100%;
border: 0;
color: #33b5e5;
border-color: #178ab4;
-webkit-transition: 0.3s ease;
transition: 0.3s ease;
}
.flag a :hover {
background: white;
}
.form-module .cta {
background: #f2f2f2;
width: 100%;
padding: 15px 40px;
box-sizing: border-box;
color: #666666;
font-size: 12px;
text-align: center;
}
.form-module .cta a {
color: #333333;
text-decoration: none;
}
.flex-container {
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
align: right;
}
.flex-container > * {
padding: 0px;
-webkit-flex: 1 100%;
flex: 1 100%;
}
.dropbtn {
outline: none;
border:1;
width: 80%;
border: 1px solid #d9d9d9;
padding: 10px 15px;
font-size: 16px;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f6f6f6;
min-width: 230px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {background-color: #ddd}
.show {display:block;}
ul{
list-style-type:none;
width:500px;
}
li{
width:33%;
text-align:center;
float:left;
border-bottom:2px solid #33b5e5;
}
Maybe instead of a 'table' use a 'list' html element like ul or li.
plunker
New HTML:
<div class="module form-module">
<div class="flex-container">
<article class="article">
<ul>
<li>
<button>Configurations</button>
</li>
<li>
<button>Create User </button>
</li>
<li>
<button>Update User</button>
</li>
</ul>
</article>
</div>
</div>
and add the following CSS:
ul{
list-style-type:none;
width:500px;
}
li{
width:33%;
text-align:center;
float:left;
border-bottom:2px solid #33b5e5;
}