On my site, there is a menu hamburger icon and a title. I've been trying to align them so they on the same row, but I can't figure out how. I've tried wrapping inside a div and I've also tried display:inline-block. Does anybody know how to align the text and hamburger icon.
#import url(http://fonts.googleapis.com/css?family=Raleway:500);
*,
*:before,
*:after {
box-sizing: border-box;
}
.menu-wrapper {
position: relative;
width: 250px;
height: 250px;
margin-top: 60px;
margin-left: 30px;
}
.menu {
position: relative;
width: 36px;
height: 6px;
background-color: #707070;
user-select: none;
transition: all 0.25s ease-in-out;
cursor: pointer;
margin: 5px;
color: #707070;
-webkit-perspective: 1000;
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
-webkit-tap-highlight-color: transparent;
}
.menu label {
cursor: pointer;
position: absolute;
font-family: 'Raleway', sans-serif;
font-size: 40px;
line-height: 30px;
top: -12px;
left: 48px;
}
.menu:hover > ul.nav-links,
.menu.open > ul.nav-links {
transition: all 0.25s ease-in-out;
opacity: 1;
width: 180px;
transform: translateX(15px);
pointer-events: auto;
}
.menu:after,
.menu:before {
content: "";
position: absolute;
width: 36px;
height: 6px;
background-color: #707070;
transition: all 0.25s ease-in-out;
}
.menu:after {
top: 12px;
}
.menu:before {
top: -12px;
}
.menu:hover,
.menu.open {
background-color: transparent;
}
.menu:hover::after,
.menu:hover::before,
.menu.open::after,
.menu.open::before {
transition: all 0.3s ease-in-out;
width: 18px;
}
.menu:hover::after,
.menu.open::after {
transform: translate(3px, -7px) rotate(405deg);
}
.menu:hover::before,
.menu.open::before {
transform: translate(12px, 17px) rotate(-405deg);
}
.menu ul.nav-links {
margin: 0;
padding: 36px 0 0 0;
opacity: 0;
transform: translateX(-15px);
transition: all 0.25s ease-in-out;
position: absolute;
width: 0;
height: 0;
pointer-events: none;
}
.menu ul.nav-links li {
width: 100%;
padding: 4px 8px;
list-style-type: none;
font-family: 'Raleway', sans-serif;
font-size: 25px;
text-transform: uppercase;
transition: all 0.25s ease-in-out;
border-left: 2px solid #707070;
}
.menu ul.nav-links li:hover,
.menu ul.nav-links li.active {
color: #707070;
border-left: 2px solid #707070;
}
#import url('https://fonts.googleapis.com/css?family=Fjalla+One');
#import url('https://fonts.googleapis.com/css?family=Roboto');
#import url('https://fonts.googleapis.com/css?family=Oswald');
#import url('https://fonts.googleapis.com/css?family=Quicksand');
header {
background: #fff;
height: 145px;
position: fixed;
top: 0;
transition: top 0.2s ease-in-out;
width: 100%;
border-bottom: 5px solid;
border-bottom-color: #bcbcbc;
}
.nav-up {
top: -145px;
}
body,
html {
margin: 0;
padding: 0;
}
video.home {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
z-index: -100;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
div.vid {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
z-index: -100;
}
footer {
background: #222020;
height: 50px;
position: fixed;
bottom: 0;
margin-bottom: 0.5em;
margin-bottom: 0.5em;
margin-left: 0.5em;
margin-right: 0.5em;
width: 99%;
}
p.copyright {
color: white;
text-transform: uppercase;
font-size: 15px;
font-family: 'Roboto', sans-serif;
}
div.footer {
float: left;
margin-left: 2em;
}
h1 {
text-align: center;
font-family: 'Fjalla One', sans-serif;
color: #666;
}
p {
color: black;
font-family: 'Oswald', sans-serif;
}
a.contact {
text-decoration: none;
color: white;
background-color: #36a2dc;
padding: 20px;
padding-left: 10px;
border-radius: 5%;
cursor: pointer;
outline: none;
height: 100px;
width: 200px;
font-family: 'Quicksand', sans-serif;
}
i.icon {
padding: 8px;
}
div.contact {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
}
ul.social {
display: block;
margin: 5% 0;
list-style-type: none;
text-align: center;
margin-top: 0px;
}
ul.social li {
font-size: 1em;
display: inline;
padding: 0 2%;
}
ul.social li a {
color: #707070;
}
ul.social li.dribble a:hover {
color: #e040a9;
}
ul.social li.twitter a:hover {
color: #258fc9;
}
ul.social li.behance a:hover {
color: #212121;
}
ul.social li.googleplus a:hover {
color: #e73710;
}
ul.social li.github a:hover {
color: #171515;
}
/*=================HEADER=====================================*/
a {
text-decoration: none;
color: #707070;
}
a:hover {
color: #898e8e;
}
a:active {
color: white;
}
div.head {
margin-top: 10px;
}
/*=========================================================== */
.container {
max-width: 960px;
margin: 0 auto;
}
/* ============================================================
SECTIONS
============================================================ */
section.module:last-child {
margin-bottom: 0;
}
section.module h2 {
margin-bottom: 40px;
font-family: 'Fjalla One', sans-serif;
font-size: 30px;
color: #515151;
text-align: center;
}
section.module p {
margin-bottom: 40px;
font-size: 16px;
font-weight: 300;
color: #515151;
text-align: center;
}
section.module p:last-child {
margin-bottom: 0;
}
section.module.content {
padding: 40px 0;
}
section.module.parallax {
height: 600px;
background-position: 50% 50%;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
section.module.parallax h1 {
color: rgba(255, 255, 255, 0.8);
font-size: 48px;
line-height: 600px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
section.module.parallax-1 {
background-image: url("https://static.pexels.com/photos/34578/pexels-photo.jpg");
}
section.module.parallax-2 {
background-image: url("https://d2lm6fxwu08ot6.cloudfront.net/img-thumbs/960w/UQ9AB8NRV9.jpg");
}
section.module.parallax-3 {
background-image: url("https://d2lm6fxwu08ot6.cloudfront.net/img-thumbs/960w/2UXCQG5Q7W.jpg");
}
#media all and (min-width: 600px) {
section.module h2 {
font-size: 42px;
}
section.module p {
font-size: 20px;
}
section.module.parallax h1 {
font-size: 96px;
}
}
#media all and (min-width: 960px) {
section.module.parallax h1 {
font-size: 160px;
}
}
<header class="nav-down">
<!-- Open on hover menú -->
<div class="menu-wrapper">
<div class="menu">
<ul class="nav-links">
<li>Home
</li>
<li>About
</li>
<li>Portfolio
</li>
<li class="active">Projects
</li>
<li>Contact
</li>
</ul>
</div>
</div>
<div class="">
<h1>William Chen</h1>
<ul class="social">
<li class="dribble"><i class="fa fa-dribbble fa-3x"></i>
</li>
<li class="twitter"><i class="fa fa-twitter fa-3x"></i>
</li>
<li class="behance"><i class="fa fa-behance fa-3x"></i>
</li>
<li class="googleplus"><i class="fa fa-google-plus fa-3x"></i>
</li>
<li class="github"><i class="fa fa-github fa-3x"></i>
</li>
</ul>
</div>
</header>
Here is a JsFiddle with some changes: https://jsfiddle.net/m5b2f0gc/1/
One thing I did is changed the .menu margin, and then I created a new ID called "william" to help move the margin left.
.menu {
position: relative;
width: 36px;
height: 6px;
background-color: #707070;
user-select: none;
transition: all 0.25s ease-in-out;
cursor: pointer;
margin: 20px;
color: #707070;
-webkit-perspective: 1000;
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
-webkit-tap-highlight-color: transparent;
}
#william {
margin-left: 150px;
}
Lots of comments here...but none of them are suggesting the seemingly easiest option.
Wrap both of the elements in question in a div (or not, it works without parent div so long as your widths for both menu-wrapper and head are <= 100% combined).
Add the following both the .menu-wrapper and the .head class:
.menu-wrapper, .head {
float:left;
}
That will get them on the same row. Then you can use padding/line heights to get them aligned more beautifully.
I think this code does what you want:
#import url(http://fonts.googleapis.com/css?family=Raleway:500);
*,
*:before,
*:after {
box-sizing: border-box;
}
.menu-wrapper {
position: relative;
width: 250px;
height: 250px;
margin-top: 60px;
margin-left: 30px;
text-align: justify;
}
.menu {
position: relative;
width: 36px;
height: 6px;
background-color: #707070;
user-select: none;
transition: all 0.25s ease-in-out;
cursor: pointer;
margin: 5px;
color: #707070;
-webkit-perspective: 1000;
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
-webkit-tap-highlight-color: transparent;
}
.menu label {
cursor: pointer;
position: absolute;
font-family: 'Raleway', sans-serif;
font-size: 40px;
line-height: 30px;
top: -12px;
left: 48px;
}
.menu:hover > ul.nav-links,
.menu.open > ul.nav-links {
transition: all 0.25s ease-in-out;
opacity: 1;
width: 180px;
transform: translateX(15px);
pointer-events: auto;
}
.menu:after,
.menu:before {
content: "";
position: absolute;
width: 36px;
height: 6px;
background-color: #707070;
transition: all 0.25s ease-in-out;
}
.menu:after {
top: 12px;
}
.menu:before {
top: -12px;
}
.menu:hover,
.menu.open {
background-color: transparent;
}
.menu:hover::after,
.menu:hover::before,
.menu.open::after,
.menu.open::before {
transition: all 0.3s ease-in-out;
width: 18px;
}
.menu:hover::after,
.menu.open::after {
transform: translate(3px, -7px) rotate(405deg);
}
.menu:hover::before,
.menu.open::before {
transform: translate(12px, 17px) rotate(-405deg);
}
.menu ul.nav-links {
margin: 0;
padding: 36px 0 0 0;
opacity: 0;
transform: translateX(-15px);
transition: all 0.25s ease-in-out;
position: absolute;
width: 0;
height: 0;
pointer-events: none;
}
.menu ul.nav-links li {
width: 100%;
padding: 4px 8px;
list-style-type: none;
font-family: 'Raleway', sans-serif;
font-size: 25px;
text-transform: uppercase;
transition: all 0.25s ease-in-out;
border-left: 2px solid #707070;
}
.menu ul.nav-links li:hover,
.menu ul.nav-links li.active {
color: #707070;
border-left: 2px solid #707070;
}
#import url('https://fonts.googleapis.com/css?family=Fjalla+One');
#import url('https://fonts.googleapis.com/css?family=Roboto');
#import url('https://fonts.googleapis.com/css?family=Oswald');
#import url('https://fonts.googleapis.com/css?family=Quicksand');
header {
background: #fff;
height: 145px;
position: fixed;
top: 0;
transition: top 0.2s ease-in-out;
width: 100%;
border-bottom: 5px solid;
border-bottom-color: #bcbcbc;
}
.nav-up {
top: -145px;
}
body,
html {
margin: 0;
padding: 0;
}
video.home {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
z-index: -100;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
div.vid {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
z-index: -100;
}
footer {
background: #222020;
height: 50px;
position: fixed;
bottom: 0;
margin-bottom: 0.5em;
margin-bottom: 0.5em;
margin-left: 0.5em;
margin-right: 0.5em;
width: 99%;
}
p.copyright {
color: white;
text-transform: uppercase;
font-size: 15px;
font-family: 'Roboto', sans-serif;
}
div.footer {
float: left;
margin-left: 2em;
}
h1 {
text-align: center;
font-family: 'Fjalla One', sans-serif;
color: #666;
margin-bottom: -80px;
}
p {
color: black;
font-family: 'Oswald', sans-serif;
}
a.contact {
text-decoration: none;
color: white;
background-color: #36a2dc;
padding: 20px;
padding-left: 10px;
border-radius: 5%;
cursor: pointer;
outline: none;
height: 100px;
width: 200px;
font-family: 'Quicksand', sans-serif;
}
i.icon {
padding: 8px;
}
div.contact {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
}
ul.social {
display: block;
margin: 5% 0;
list-style-type: none;
text-align: center;
margin-top: 0px;
}
ul.social li {
font-size: 1em;
display: inline;
padding: 0 2%;
}
ul.social li a {
color: #707070;
}
ul.social li.dribble a:hover {
color: #e040a9;
}
ul.social li.twitter a:hover {
color: #258fc9;
}
ul.social li.behance a:hover {
color: #212121;
}
ul.social li.googleplus a:hover {
color: #e73710;
}
ul.social li.github a:hover {
color: #171515;
}
/*=================HEADER=====================================*/
a {
text-decoration: none;
color: #707070;
}
a:hover {
color: #898e8e;
}
a:active {
color: white;
}
div.head {
margin-top: 10px;
}
/*=========================================================== */
.container {
max-width: 960px;
margin: 0 auto;
}
/* ============================================================
SECTIONS
============================================================ */
section.module:last-child {
margin-bottom: 0;
}
section.module h2 {
margin-bottom: 40px;
font-family: 'Fjalla One', sans-serif;
font-size: 30px;
color: #515151;
text-align: center;
}
section.module p {
margin-bottom: 40px;
font-size: 16px;
font-weight: 300;
color: #515151;
text-align: center;
}
section.module p:last-child {
margin-bottom: 0;
}
section.module.content {
padding: 40px 0;
}
section.module.parallax {
height: 600px;
background-position: 50% 50%;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
section.module.parallax h1 {
color: rgba(255, 255, 255, 0.8);
font-size: 48px;
line-height: 600px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
section.module.parallax-1 {
background-image: url("https://static.pexels.com/photos/34578/pexels-photo.jpg");
}
section.module.parallax-2 {
background-image: url("https://d2lm6fxwu08ot6.cloudfront.net/img-thumbs/960w/UQ9AB8NRV9.jpg");
}
section.module.parallax-3 {
background-image: url("https://d2lm6fxwu08ot6.cloudfront.net/img-thumbs/960w/2UXCQG5Q7W.jpg");
}
#media all and (min-width: 600px) {
section.module h2 {
font-size: 42px;
}
section.module p {
font-size: 20px;
}
section.module.parallax h1 {
font-size: 96px;
}
}
#media all and (min-width: 960px) {
section.module.parallax h1 {
font-size: 160px;
}
}
<h1>William Chen</h1>
<div class="menu-wrapper">
<div class="menu">
<ul class="nav-links">
<li>Home
</li>
<li>About
</li>
<li>Portfolio
</li>
<li class="active">Projects
</li>
<li>Contact
</li>
</ul>
</div>
</div>
<div class="head">
<ul class="social">
<li class="dribble"><i class="fa fa-dribbble fa-3x"></i>
</li>
<li class="twitter"><i class="fa fa-twitter fa-3x"></i>
</li>
<li class="behance"><i class="fa fa-behance fa-3x"></i>
</li>
<li class="googleplus"><i class="fa fa-google-plus fa-3x"></i>
</li>
<li class="github"><i class="fa fa-github fa-3x"></i>
</li>
</ul>
</div>
JSFiddle: https://jsfiddle.net/wvyxe5rp/2/
What I did is move the h1 element on top and then add this line:
margin-bottom: -80px;
inside the css of h1.
Related
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
Ok so I have a problem with my navbar on mobile. It is hidden and it displays only when I press the bar (toggler). The problem is: if I press on the screen when the navbar isn't displayed it still goes to the links, even if I can't see the li's.
I want to keep the same navbar but I don't want to acces the links when it is closed.
If its possible please tell me how to solve it and the problems of my navbar
This is my code:
.banner {
margin: 0px;
position: relative;
width: 100%;
height: 100vh;
background-size: cover;
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.6)), url(../img/pozabackground-home2.jpg);
background-position: center;
box-shadow: 1px 2px 4px 0px #00000075 !important;
background-attachment: fixed;
}
.navigatie {
background-color: transparent;
width: 100%;
position: fixed;
z-index: 99;
margin: 0px;
padding: 0px;
}
.logo {
float: left;
padding: 8px;
margin-left: 40px;
margin-top: 8px;
}
.navbar-brand {
color: white !important;
}
.navbar-brand img {
width: auto;
height: 100px;
margin: -32px 0px -25px 0px;
}
nav ul {
float: right;
list-style-type: none;
padding-top: 5px;
margin-right: 20px;
}
nav ul li {
float: left;
}
nav ul li:not(:first-child) {
margin-left: 48px;
}
nav ul li:last-child {
margin-right: 24px;
}
nav ul li a {
display: inline-block;
outline: none;
color: #fff;
text-transform: uppercase;
text-decoration: none;
font-size: 13px;
letter-spacing: 1.1px;
font-weight: 600;
}
nav ul li a:hover {
color: #fff;
text-decoration: underline;
}
/* FUNDAL JS */
.fundal {
background: #104f47 !important;
box-shadow: 1px 2px 4px 0px #00000075 !important;
}
.fundal .nav-btn {
background-color: #104f47;
border-radius: 50%;
box-shadow: 1px 2px 4px 0px #00000075;
}
.fundal .nav-btn i {
background: #fff;
border-radius: 2px;
}
#nav:checked+.nav-btn {
transform: rotate(45deg);
background-color: #104f47;
}
#nav:checked+.nav-btn i {
background: #fff;
transition: transform 0.2s ease;
}
#nav:checked+.nav-btn i:nth-child(1) {
transform: translateY(6px) rotate(180deg);
}
#nav:checked+.nav-btn i:nth-child(2) {
opacity: 0;
}
#nav:checked+.nav-btn i:nth-child(3) {
transform: translateY(-6px) rotate(90deg);
}
#nav:checked~.nav-wrapper {
z-index: 9990;
opacity: 1;
}
#nav:checked~.nav-wrapper ul li a {
opacity: 1;
transform: translateX(0);
}
.hidden {
display: none;
}
/* MEDIA SCREEN PTR TLF */
#media only screen and (max-width: 991px) {
.navigatie {
background-color: transparent;
width: 100%;
position: absolute;
;
z-index: 99;
margin: 0px;
padding: 0px;
}
.navbar-brand img {
height: 100px;
margin: -20px 0px 0px 0px;
}
.nav-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background: #fff;
opacity: 0;
transition: all 0.2s ease;
}
.nav-wrapper ul {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 100%;
}
.nav-wrapper ul li {
display: block;
float: none;
width: 100%;
text-align: right;
padding-top: 10px;
margin-bottom: 10px;
}
.nav-wrapper ul li:nth-child(1) a {
transition-delay: 0.2s;
}
.nav-wrapper ul li:nth-child(2) a {
transition-delay: 0.3s;
}
.nav-wrapper ul li:nth-child(3) a {
transition-delay: 0.4s;
}
.nav-wrapper ul li:nth-child(4) a {
transition-delay: 0.5s;
}
.nav-wrapper ul li:not(:first-child) {
margin-left: 0;
}
.nav-wrapper ul li a {
padding: 10px 24px;
opacity: 0;
color: #000;
font-size: 14px;
font-weight: 600;
letter-spacing: 1.2px;
transform: translateX(-20px);
transition: all 0.2s ease;
}
.nav-btn {
position: fixed;
right: 30px;
top: 28px;
display: block;
width: 48px;
height: 46px;
cursor: pointer;
z-index: 9999;
border-radius: 50%;
}
.nav-btn i {
display: block;
width: 20px;
height: 2px;
background: #fff;
border-radius: 2px;
margin-left: 14px;
}
.nav-btn i:nth-child(1) {
margin-top: 16px;
}
.nav-btn i:nth-child(2) {
margin-top: 4px;
opacity: 1;
}
.nav-btn i:nth-child(3) {
margin-top: 4px;
}
}
/* SCRIS DE LA BANNER */
.title {
position: absolute;
top: 47%;
left: 35%;
text-align: left;
transform: translate(-50%, -50%);
}
.title h1 {
color: #fff;
font-family: poppins;
font-size: 50px;
color: #f5f6f8;
padding-bottom: 20px;
}
.button button {
display: inline-block;
font-size: 12px;
text-transform: uppercase;
text-align: center;
padding: 13px 20px;
border: none;
color: white;
font-family: montserrat;
text-decoration: none;
transition: 0.6s ease;
background-color: #104f47;
box-shadow: 1px 2px 4px 0px #00000075;
outline: none;
}
.button button:hover {
background-color: #104f47;
color: white;
}
<div class="navigatie">
<nav>
<input type="checkbox" id="nav" class="hidden">
<label for="nav" class="nav-btn">
<i></i>
<i></i>
<i></i>
</label>
<div class="logo">
<a class="navbar-brand" href="index.php"><img src="./img/logoinainte.png"></a>
</div>
<div class="nav-wrapper">
<ul>
<li>Acasa</li>
<li>Despre</li>
<li>Servicii</li>
<li>Tarife</li>
<li>Contact</li>
</ul>
</div>
</nav>
</div>
<section class="banner">
<div class="container">
<div class="title">
<h1>Aspect curat <br>și îmbunătățit al <br>locuinței tale</h1>
<div class="button">
<button type="button">Sună acum!</button>
</div>
</div>
</div>
</section>
Could you tell me what is the problem?
You are using opacity. With opacity the element becomes invisible but it is still there. You have to set its display to none. And when the button is clicked you have to set its display to block.
.nav-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background: #fff;
display:none;
transition: all 0.2s ease;
}
#nav:checked ~ .nav-wrapper {
z-index: 9990;
display:block
}
My menu works but only when I hover and not click. It does not show up on mobile devices it only shows up as services but not clickable.
here is the code.
I believe I am missing something to make the dropdown box clickable ect.
/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
body {
background: #fff4e9;
color: #444;
font-family: "Open Sans", sans-serif;
}
a {
color: #993300;
transition: 0.5s;
}
a:hover,
a:active,
a:focus {
color: #993300;
outline: none;
text-decoration: none;
}
p {
padding: 0;
margin: 0 0 30px 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: "Montserrat", sans-serif;
font-weight: 400;
margin: 0 0 20px 0;
padding: 0;
}
/* Back to top button */
.back-to-top {
position: fixed;
display: none;
background: #993300;
color: #fff;
padding: 6px 12px 9px 12px;
font-size: 16px;
border-radius: 2px;
right: 15px;
bottom: 15px;
transition: background 0.5s;
}
.back-to-top:focus {
background: #993300;
color: #fff;
outline: none;
}
.back-to-top:hover {
background: #993300;
color: #fff;
}
/*--------------------------------------------------------------
# Top Bar
--------------------------------------------------------------*/
#topbar {
background: #fff4e9;
padding: 10px 0;
border-bottom: 1px solid #eee;
font-size: 14px;
}
#topbar .contact-info a {
line-height: 1;
color: #555;
}
#topbar .contact-info a:hover {
color: #993300;
}
#topbar .contact-info i {
color: #993300;
padding: 4px;
}
#topbar .contact-info .fa-phone {
padding-left: 20px;
margin-left: 20px;
border-left: 1px solid #e9e9e9;
}
#topbar .social-links a {
color: #555;
padding: 4px 12px;
display: inline-block;
line-height: 1px;
border-left: 1px solid #e9e9e9;
}
#topbar .social-links a:hover {
color: #993300;
}
#topbar .social-links a:first-child {
border-left: 0;
}
/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
#header {
padding: 20px 0;
height: 84px;
transition: all 0.5s;
z-index: 997;
background: #fff4e9;
box-shadow: 0px 6px 9px 0px rgba(0, 0, 0, 0.06);
}
#header #logo h1 {
font-size: 42px;
margin: 0;
padding: 0;
line-height: 1;
font-family: "Montserrat", sans-serif;
font-weight: 700;
}
#header #logo h1 a {
color: #993300;
line-height: 1;
display: inline-block;
}
#header #logo h1 a span {
color: #993300;
}
#header #logo img {
padding: 0;
margin: 0;
}
/*--------------------------------------------------------------
# Intro Section
--------------------------------------------------------------*/
#intro {
width: 100%;
height: 60vh;
position: relative;
background: url("../img/intro-carousel/1.jpg") no-repeat;
background-size: cover;
}
#intro .intro-content {
position: absolute;
bottom: 0;
top: 0;
left: 0;
right: 0;
z-index: 10;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
text-align: center;
}
#intro .intro-content h2 {
color: #993300;
margin-bottom: 30px;
font-size: 64px;
font-weight: 700;
}
#intro .intro-content h2 span {
color: #993300;
text-decoration: underline;
}
#intro .intro-content .btn-get-started,
#intro .intro-content .btn-projects {
font-family: "Raleway", sans-serif;
font-size: 15px;
font-weight: bold;
letter-spacing: 1px;
display: inline-block;
padding: 10px 32px;
border-radius: 2px;
transition: 0.5s;
margin: 10px;
color: #fff;
}
#intro .intro-content .btn-get-started {
background: #993300;
border: 2px solid #993300;
}
#intro .intro-content .btn-get-started:hover {
background: none;
color: #993300;
}
#intro .intro-content .btn-projects {
background: #993300;
border: 2px solid #993300;
}
#intro .intro-content .btn-projects:hover {
background: none;
color: #993300;
}
#intro #intro-carousel {
z-index: 8;
}
#intro #intro-carousel::before {
content: '';
background-color: );
position: absolute;
height: 100%;
width: 100%;
top: 0;
right: 0;
left: 0;
bottom: 0;
z-index: 7;
}
#intro #intro-carousel .item {
width: 100%;
height: 60vh;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
transition-property: opacity;
}
/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Nav Menu Essentials */
.nav-menu,
.nav-menu * {
margin: 0;
padding: 0;
list-style: none;
}
.nav-menu>li>.dropdown-menu {
background-color: #fff4e9;
}
.nav-menu>li>.dropdown-item {
background-color: #fff4e9;
}
.dropdown-menu>li>a:hover {
background-color: #fff4e9;
background-image: none;
}
.nav-menu ul {
position: absolute;
display: none;
top: 100%;
left: 0;
z-index: 99;
}
.nav-menu li {
position: relative;
white-space: nowrap;
}
.nav-menu>li {
float: left;
}
.nav-menu li:hover>ul,
.nav-menu li.sfHover>ul {
display: block;
}
.nav-menu ul ul {
top: 0;
left: 100%;
}
.nav-menu ul li {
min-width: 180px;
}
/* Nav Menu Arrows */
.sf-arrows .sf-with-ul {
padding-right: 22px;
}
.sf-arrows .sf-with-ul:after {
content: "\f107";
position: absolute;
right: 8px;
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
}
.sf-arrows ul .sf-with-ul:after {
content: "\f105";
}
/* Nav Meu Container */
#nav-menu-container {
float: right;
margin: 0;
}
/* Nav Meu Styling */
.nav-menu a {
padding: 10px 8px;
text-decoration: none;
display: inline-block;
color: #555;
font-family: "Raleway", sans-serif;
font-weight: 700;
font-size: 14px;
outline: none;
}
.nav-menu li:hover>a,
.nav-menu .menu-active>a {
color: #993300;
}
.nav-menu>li {
margin-left: 10px;
}
.nav-menu ul {
margin: 4px 0 0 0;
padding: 10px;
box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
background: #fff;
}
.nav-menu ul li {
transition: 0.3s;
}
.nav-menu ul li a {
padding: 10px;
color: #333;
transition: 0.3s;
display: block;
font-size: 13px;
text-transform: none;
}
.nav-menu ul li:hover>a {
color: #993300;
}
.nav-menu ul ul {
margin: 0;
}
/* Mobile Nav Toggle */
#mobile-nav-toggle {
position: fixed;
right: 0;
top: 0;
z-index: 999;
margin: 20px 20px 0 0;
border: 0;
background: none;
font-size: 24px;
display: none;
transition: all 0.4s;
outline: none;
cursor: pointer;
}
#mobile-nav-toggle i {
color: #555;
}
/* Mobile Nav Styling */
#mobile-nav {
position: fixed;
top: 0;
padding-top: 18px;
bottom: 0;
z-index: 998;
background: rgba(52, 59, 64, 0.9);
left: -260px;
width: 260px;
overflow-y: auto;
transition: 0.4s;
}
#mobile-nav ul {
padding: 0;
margin: 0;
list-style: none;
}
#mobile-nav ul li {
position: relative;
}
#mobile-nav ul li a {
color: #fff;
font-size: 16px;
overflow: hidden;
padding: 10px 22px 10px 15px;
position: relative;
text-decoration: none;
width: 100%;
display: block;
outline: none;
}
#mobile-nav ul li a:hover {
color: #fff;
}
#mobile-nav ul li li {
padding-left: 30px;
}
#mobile-nav ul .menu-has-children i {
position: absolute;
right: 0;
z-index: 99;
padding: 15px;
cursor: pointer;
color: #fff;
}
#mobile-nav ul .menu-has-children i.fa-chevron-up {
color: #993300;
}
#mobile-nav ul .menu-item-active {
color: #993300;
}
#mobile-body-overly {
width: 100%;
height: 100%;
z-index: 997;
top: 0;
left: 0;
position: fixed;
background: rgba(52, 59, 64, 0.9);
display: none;
}
/* Mobile Nav body classes */
body.mobile-nav-active {
overflow: hidden;
}
body.mobile-nav-active #mobile-nav {
left: 0;
}
body.mobile-nav-active #mobile-nav-toggle {
color: #fff;
}
/*--------------------------------------------------------------
# Sections
--------------------------------------------------------------*/
/* Sections Header
--------------------------------*/
.section-header {
margin-bottom: 30px;
}
.section-header h2 {
font-size: 32px;
color: #993300;
text-transform: uppercase;
font-weight: 700;
position: relative;
padding-bottom: 20px;
}
.section-header h3 {
font-size: 26px;
color: #993300;
text-transform: uppercase;
font-weight: 700;
position: relative;
padding-bottom: 20px;
}
.section-header h2::before {
content: '';
position: absolute;
display: block;
width: 50px;
height: 3px;
background: #993300;
bottom: 0;
left: 0;
}
.section-header h3::before {
content: '';
position: absolute;
display: block;
width: 50px;
height: 3px;
background: #993300;
bottom: 0;
left: 0;
}
.section-header p {
padding: 0;
margin: 0;
}
/* About Section
--------------------------------*/
#about {
padding: 60px 0 30px 0;
}
#about .about-img {
overflow: hidden;
}
#about .about-img img {
margin-left: -15px;
max-width: 100%;
}
#about .content h2 {
color: #993300;
font-weight: 700;
font-size: 36px;
font-family: "Raleway", sans-serif;
}
#about .content h3 {
color: #555;
font-weight: 300;
font-size: 18px;
line-height: 26px;
font-style: italic;
}
#about .content p {
line-height: 26px;
}
#about .content p:last-child {
margin-bottom: 0;
}
#about .content i {
font-size: 20px;
padding-right: 4px;
color: #993300;
}
#about .content ul {
list-style: none;
padding: 0;
}
#about .content ul li {
padding-bottom: 10px;
}
/* Services Section
--------------------------------*/
#services {
padding: 30px 0 0 0;
}
#services .box {
padding: 40px;
margin-bottom: 40px;
box-shadow: 10px 10px 15px rgba(73, 78, 92, 0.1);
background: #fff4e9;
transition: 0.4s;
}
#services .box:hover {
box-shadow: 0px 0px 30px rgba(73, 78, 92, 0.15);
transform: translateY(-10px);
-webkit-transform: translateY(-10px);
-moz-transform: translateY(-10px);
}
#services .box .icon {
float: left;
}
#services .box .icon i {
color: #444;
font-size: 64px;
transition: 0.5s;
line-height: 0;
margin-top: 34px;
}
#services .box .icon i:before {
background: #993300;
background: linear-gradient(45deg, #993300 0%, #993300 100%);
background-clip: border-box;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
#services .box h4 {
margin-left: 100px;
font-weight: 700;
margin-bottom: 15px;
font-size: 22px;
}
#services .box h4 a {
color: #444;
}
#services .box p {
font-size: 14px;
margin-left: 100px;
margin-bottom: 0;
line-height: 24px;
}
/* Clients Section
--------------------------------*/
#clients {
padding: 30px 0;
}
#clients img {
max-width: 100%;
opacity: 0.5;
transition: 0.3s;
padding: 15px 0;
}
#clients img:hover {
opacity: 1;
}
#clients .owl-nav,
#clients .owl-dots {
margin-top: 5px;
text-align: center;
}
#clients .owl-dot {
display: inline-block;
margin: 0 5px;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #ddd;
}
#clients .owl-dot.active {
background-color: #993300;
}
/* Our Portfolio Section
--------------------------------*/
#portfolio {
background: #fff4e9;
padding: 30px 0;
}
#portfolio .portfolio-overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 1;
transition: all ease-in-out 0.4s;
}
#portfolio .portfolio-item {
overflow: hidden;
position: relative;
padding: 0;
vertical-align: middle;
text-align: center;
}
#portfolio .portfolio-item h2 {
color: #ffffff;
font-size: 24px;
margin: 0;
text-transform: capitalize;
font-weight: 700;
}
#portfolio .portfolio-item img {
transition: all ease-in-out 0.4s;
width: 100%;
}
#portfolio .portfolio-item:hover img {
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
#portfolio .portfolio-item:hover .portfolio-overlay {
opacity: 1;
background: rgba(0, 0, 0, 0.7);
}
#portfolio .portfolio-info {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
/* Testimonials Section
--------------------------------*/
#testimonials {
padding: 30px 0;
}
#testimonials .testimonial-item {
box-sizing: content-box;
padding: 30px 30px 0 30px;
margin: 30px 15px;
text-align: center;
min-height: 350px;
box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.08);
}
#testimonials .testimonial-item .testimonial-img {
width: 90px;
border-radius: 50%;
border: 4px solid #fff;
margin: 0 auto;
}
#testimonials .testimonial-item h3 {
font-size: 18px;
font-weight: bold;
margin: 10px 0 5px 0;
color: #111;
}
#testimonials .testimonial-item h4 {
font-size: 14px;
color: #999;
margin: 0;
}
#testimonials .testimonial-item .quote-sign-left {
margin-top: -15px;
padding-right: 10px;
display: inline-block;
width: 37px;
}
#testimonials .testimonial-item .quote-sign-right {
margin-bottom: -15px;
padding-left: 10px;
display: inline-block;
max-width: 100%;
width: 37px;
}
#testimonials .testimonial-item p {
font-style: italic;
margin: 0 auto 15px auto;
}
#testimonials .owl-nav,
#testimonials .owl-dots {
margin-top: 5px;
text-align: center;
}
#testimonials .owl-dot {
display: inline-block;
margin: 0 5px;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #ddd;
}
#testimonials .owl-dot.active {
background-color: #993300;
}
/* Call To Action Section
--------------------------------*/
#call-to-action {
background: #081e5b;
background-size: cover;
padding: 40px 0;
}
#call-to-action .cta-title {
color: #fff;
font-size: 28px;
font-weight: 700;
}
#call-to-action .cta-text {
color: #fff;
}
#call-to-action .cta-btn {
font-family: "Montserrat", sans-serif;
font-weight: 700;
font-size: 16px;
letter-spacing: 1px;
display: inline-block;
padding: 8px 26px;
border-radius: 3px;
transition: 0.5s;
margin: 10px;
border: 3px solid #fff;
color: #fff;
}
#call-to-action .cta-btn:hover {
background: #993300;
border: 3px solid #993300;
}
/* Our Team Section
--------------------------------*/
#team {
background: #fff;
padding: 30px 0 0 0;
}
#team .member {
text-align: center;
margin-bottom: 20px;
}
#team .member .pic {
overflow: hidden;
text-align: center;
}
#team .member .pic img {
max-width: 100%;
}
#team .member .details {
background: #993300;
color: #fff;
padding: 15px;
border-radius: 0 0 3px 3px;
}
#team .member h4 {
font-weight: 700;
margin-bottom: 2px;
font-size: 18px;
}
#team .member span {
font-style: italic;
display: block;
font-size: 13px;
}
#team .member .social {
margin-top: 5px;
}
#team .member .social a {
color: #fff;
}
#team .member .social i {
font-size: 16px;
margin: 0 2px;
}
/* Contact Section
--------------------------------*/
#contact {
padding: 30px 0;
}
#contact .contact-info {
margin-bottom: 20px;
text-align: center;
}
#contact .contact-info i {
font-size: 48px;
display: inline-block;
margin-bottom: 10px;
color: #993300;
}
#contact .contact-info address,
#contact .contact-info p {
margin-bottom: 0;
color: #000;
}
#contact .contact-info h3 {
font-size: 18px;
margin-bottom: 15px;
font-weight: bold;
text-transform: uppercase;
color: #999;
}
#contact .contact-info a {
color: #000;
}
#contact .contact-info a:hover {
color: #993300;
}
#contact .contact-address,
#contact .contact-phone,
#contact .contact-email {
margin-bottom: 20px;
}
#contact #google-map {
height: 290px;
margin-bottom: 20px;
}
#contact .form #sendmessage {
color: #993300;
border: 1px solid #993300;
display: none;
text-align: center;
padding: 15px;
font-weight: 600;
margin-bottom: 15px;
}
#contact .form #errormessage {
color: red;
display: none;
border: 1px solid red;
text-align: center;
padding: 15px;
font-weight: 600;
margin-bottom: 15px;
}
#contact .form #sendmessage.show,
#contact .form #errormessage.show,
#contact .form .show {
display: block;
}
#contact .form .validation {
color: red;
display: none;
margin: 0 0 20px;
font-weight: 400;
font-size: 13px;
}
#contact .form input,
#contact .form textarea {
padding: 10px 14px;
border-radius: 0;
box-shadow: none;
font-size: 15px;
}
#contact .form button[type="submit"] {
background: #993300;
border: 0;
border-radius: 3px;
padding: 10px 30px;
color: #fff;
transition: 0.4s;
cursor: pointer;
}
#contact .form button[type="submit"]:hover {
background: #2dc899;
}
/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
#footer {
background: #fff4e9;
padding: 0 0 30px 0;
font-size: 14px;
}
#footer .copyright {
text-align: center;
padding-top: 30px;
}
#footer .credits {
text-align: center;
font-size: 13px;
color: #555;
}
#footer .credits a {
color: #993300;
}
#media (min-width: 768px) {
#contact .contact-address,
#contact .contact-phone,
#contact .contact-email {
padding: 20px 0;
}
#contact .contact-phone {
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
}
}
#media (min-width: 769px) {
#call-to-action .cta-btn-container {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
-ms-flex-pack: end;
justify-content: flex-end;
}
}
#media (max-width: 768px) {
.back-to-top {
bottom: 15px;
}
#header {
padding: 20px 0;
height: 74px;
}
#header #logo h1 {
font-size: 34px;
}
#header #logo img {
max-height: 40px;
}
#nav-menu-container {
display: none;
}
#mobile-nav-toggle {
display: inline;
}
#about .about-img {
height: auto;
}
#about .about-img img {
margin-left: 0;
padding-bottom: 30px;
}
}
#media (max-width: 767px) {
#intro .intro-content h2 {
font-size: 34px;
}
#services .box .box {
margin-bottom: 20px;
}
#services .box .icon {
float: none;
text-align: center;
padding-bottom: 15px;
}
#services .box h4,
#services .box p {
margin-left: 0;
text-align: center;
}
#testimonials .testimonial-item {
margin: 30px 10px;
}
}
#media (max-width: 576px) {
#contact #google-map {
margin-top: 20px;
}
}
#thumbnails {
display: block;
margin-bottom: 10px;
}
#thumbnails ul li {
float: left;
margin-right: 12px;
margin-left: 12px;
margin-bottom: 12px;
}
<nav id="nav-menu-container">
<ul class="nav-menu">
<li class="menu-active">Home</li>
<li>About us</li>
<li class="dropdown">
<a class="dropdown-item">Services</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="page1.html">page1</a></li>
<li><a class="dropdown-item" href="page2.html">page2</a></li>
</ul>
<li>page3</li>
<li>page4</li>
</ul>
</nav>
The answers are right in front of you! #MattOpen sent you the Bootstrap nav components.
I am not going to do the work for you as you stated you was new to this so the best way to learn is to just get stuck in! make a copy so you can always revert and test.
Have a little look at this code below and then play around with you CSS :)`
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="index.html">Home<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Services
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="page1.html">Dropdown Page 1</a>
<a class="dropdown-item" href="page2.html">Dropdwon Page 2</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="page3.html">page 3</a>
</li>
<li class="nav-item">
<a class="nav-link" href="page4.html">page 4</a>
</li>
</ul>
</div>
`
Probably pretty basic question but I'm having issues with it. I'm using bootstrap design for website that I'm making. By default, website didn't have any image sliders.
After adding in img slider, it appears that my navigation bar is always above it and never over the slider, which I don't like. Here's example:
This is how it looks at the moment when you load up the page
And this is how I want it to look when you load the page (note that It works fine when i scroll down a bit)
So basicly my navigation works just fine, It's just not on top of the slider.
I'll include whole .css file that has everything, I linked an image to the slider and created navbar that sits on top (Opacity is 0.7).
I just want to make it sit on top of the slider at start and continue being on top of everything as I scroll (Note scrolling will not work in snippet). It works fine when scrolling just start position is what I'm having problems with.
Also don't worry about the blue stuff over the image in slider. It's WIP.
.slider {
box-shadow: 0px 4px 10px #9d9d9d;
padding: 0;
margin: 0;
max-width: 100%;
max-height: 600px;
margin: 0 auto;
overflow: hidden;
border-radius: 4px;
}
.slider ul {
width: 1000%;
height: 600px;
position: relative;
list-style: none;
left: 0;
margin: 0;
padding: 0;
line-height: 0;
-moz-animation:slide-animation 5s infinite;
-webkit-animation:slide-animation 25s infinite;
}
.slider li {
width: 10%;
list-style: none;
float: left;
margin: 0;
padding: 0;
}
img {
max-width: 100%;
border-radius: 4px;
}
span.desc1 {
position: absolute;
height: 240px;
width: 600px;
display: block;
font-size: 50px;
bottom: 250px;
left: 800px;
padding: 0.5px 20px 0px 20px;
margin-top: -450px;
overflow: hidden;
background-color:rgba(47, 118, 171, 0.7);
color: #fcfcfc;
font-family: "Roboto", Helvetica, Arial, sans-serif;
text-shadow: 0px 1px 1px #9d9d9d;
font-weight: normal;
border-radius: 4px;
z-index:2;
}
span.desc2 {
position: absolute;
height: 80px;
width: 300px;
display: block;
font-size: 0.8em;
bottom: 0;
padding: 0.5px 20px 0px 20px;
margin-top: -450px;
overflow: hidden;
background-color:rgba(47, 118, 171, 0.6);
color: #fcfcfc;
font-family: "Roboto", Helvetica, Arial, sans-serif;
text-shadow: 0px 1px 1px #9d9d9d;
font-weight: normal;
border-radius: 4px;
z-index:2;
}
p.desc{
color: #FFF;
}
#-webkit-keyframes slide-animation {
1% {left: 0%; opacity: 1;}
18% {left: 0%; opacity: 1}
19% {opacity: 0.2;}
20% {left: -100%; opacity: 1;}
58% {left: -100%; opacity: 1;}
59% {opacity: 0.2;}
60% {left: -200%; opacity: 1;}
98% {left: -200%; opacity: 1;}
99% {opacity: 0.5;}
100% {left: 0%;}
}
#-moz-keyframes slide-animation {
1% {left: 0%; opacity: 1;}
18% {left: 0%; opacity: 1}
19% {opacity: 0.2;}
20% {left: -100%; opacity: 1;}
58% {left: -100%; opacity: 1;}
59% {opacity: 0.2;}
60% {left: -200%; opacity: 1;}
98% {left: -200%; opacity: 1;}
99% {opacity: 0.5;}
100% {left: 0%;}
}
h1, h2, h3, h4, h5, h6 {
font-family: "Raleway", Helvetica, Arial, sans-serif;
}
p {
line-height: 1.55;
color: #333;
font-size: 400;
font-family: "Raleway", Helvetica, Arial, sans-serif;
}
h1 {
font-size: 62px;
}
h2 {
font-size: 30px;
margin-bottom: 65px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
/* ==================================================
General
================================================== */
a {
-webkit-transition: 0.5s;
-o-transition: 0.5s;
transition: 0.5s;
}
/* ==================================================
Elements
================================================== */
.btn {
background-color: #2f76ab;
font-family: "Roboto", Helvetica, Arial, sans-serif;
font-weight: 800;
color: #fff;
padding: 15px 45px;
border-radius: 50px;
}
.btn:hover {
background-color: #E04F00;
color: #fff;
}
.btn:focus {
color: #fff;
}
.btn-ghost {
border: 3px solid #fff;
background-color: transparent;
}
.btn-ghost:hover {
background-color: #fff;
color: #2f76ab;
}
section {
padding: 85px 0;
}
.card {
position: relative;
padding: 0;
border: 0;
border-radius: 0;
margin: 0;
overflow: hidden;
}
a:hover {
text-decoration: none !important;
}
.scrolltop {
display: none;
position: fixed;
bottom: 15px;
right: 15px;
width: 42px;
height: 42px;
border-radius: 50%;
background: #199EB8;
color: #fff;
text-align: center;
font-size: 24px;
}
.scrolltop:hover, .scrolltop:active, .scrolltop:focus {
color: #fff !important;
opacity: .75;
}
/* ==================================================
Hero Styling
================================================== */
.hero {
display: table;
position: relative;
background-image: url(../img/cover.jpg);
background-size: cover;
padding: 150px 0;
color: #fff;
width: 100%;
height: 100vh;
}
.hero:after {
content: '';
z-index: 0;
position: absolute;
background: rgba(0, 0, 0, 0.65);
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.hero .container {
position: relative;
z-index: 1;
text-align: center;
display: table-cell;
vertical-align: middle;
width: 100%;
}
.hero-brand {
margin-bottom: 75px;
display: inline-block;
}
.hero-brand:hover {
opacity: .75;
}
.tagline {
font-family: "Raleway", Helvetica, Arial, sans-serif;
font-size: 26px;
margin: 45px 0 75px 0;
color: #fff;
}
/* ==================================================
Header Styling
================================================== */
#header {
background: rgba(47, 118, 171, 0.7);
height: 70px;
}
#header #logo {
margin: 14px 25px 0 0;
}
#header #logo h1 {
font-size: 36px;
margin: 0;
padding: 2px 0;
line-height: 1;
font-family: "Raleway", Helvetica, Arial, sans-serif;
font-weight: 700;
letter-spacing: 3px;
text-transform: uppercase;
}
#header #logo h1 a, #header #logo h1 a:hover {
color: #fff;
}
#header #logo img {
padding: 0;
margin: 0;
max-height: 40px;
}
#media (max-width: 768px) {
#header {
height: 50px;
}
#header #logo {
margin: 10px 0 0 0;
}
#header #logo h1 {
padding: 2px 0;
font-size: 26px;
}
#header #logo img {
max-height: 30px;
}
}
#header .social-nav {
margin-top: 15px;
}
#header .social-nav a {
font-size: 24px;
margin-left: 15px;
color: #fff;
}
#header .social-nav a:hover {
color: rgba(255, 255, 255, 0.75);
}
/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Nav Menu Essentials */
.nav-menu, .nav-menu * {
margin: 0;
padding: 0;
list-style: none;
}
.nav-menu ul {
position: absolute;
display: none;
top: 100%;
left: 0;
z-index: 999;
}
.nav-menu li {
position: relative;
white-space: nowrap;
}
.nav-menu > li {
float: left;
}
.nav-menu li:hover > ul,
.nav-menu li.sfHover > ul {
display: block;
}
.nav-menu ul ul {
top: 0;
left: 100%;
}
.nav-menu ul li {
min-width: 180px;
}
/* Nav Menu Arrows */
.sf-arrows .sf-with-ul {
padding-right: 30px;
}
.sf-arrows .sf-with-ul:after {
content: "\f107";
position: absolute;
right: 15px;
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
}
.sf-arrows ul .sf-with-ul:after {
content: "\f105";
}
/* Nav Meu Container */
#nav-menu-container {
margin: 0;
}
#media (max-width: 768px) {
#nav-menu-container {
display: none;
}
}
/* Nav Meu Styling */
.nav-menu a {
padding: 22px 15px 18px 15px;
text-decoration: none;
display: inline-block;
color: #fff;
font-family: "Roboto", Helvetica, Arial, sans-serif;
font-weight: 300;
font-size: 15px;
outline: none;
}
.nav-menu a:hover, .nav-menu li:hover > a, .nav-menu .menu-active > a {
color: rgba(255, 255, 255, 0.75);
}
.nav-menu ul {
margin: 4px 0 0 15px;
-webkit-box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.08);
box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.08);
}
.nav-menu ul li {
background: #fff;
border-top: 1px solid #f4f4f4;
}
.nav-menu ul li:first-child {
border-top: 0;
}
.nav-menu ul li:hover {
background: #199EB8;
-webkit-transition: 0.3s;
-o-transition: 0.3s;
transition: 0.3s;
}
.nav-menu ul li a {
color: #333;
-webkit-transition: none;
-o-transition: none;
transition: none;
padding: 10px 15px;
}
.nav-menu ul li a:hover {
color: #fff;
}
.nav-menu ul ul {
margin: 0;
}
/* Mobile Nav Toggle */
#mobile-nav-toggle {
position: fixed;
right: 0;
top: 0;
z-index: 999;
margin: 8px 10px 0 0;
border: 0;
background: none;
font-size: 24px;
display: none;
-webkit-transition: all 0.4s;
-o-transition: all 0.4s;
transition: all 0.4s;
outline: none;
cursor: pointer;
}
#mobile-nav-toggle i {
color: #fff;
}
#media (max-width: 768px) {
#mobile-nav-toggle {
display: inline;
}
}
/* ==================================================
About styling
================================================== */
.about h2{
color: #2f76ab;
}
img.tbasr{
width: 50%;
height: 50%;
margin: 10px;
float: right;
}
img.tbasl{
width: 50%;
height: 50%;
margin: 10px;
float: left;
}
/* ==================================================
Features Styling
================================================== */
.features {
padding-bottom: 45px;
}
.features h2 {
color: #2f76ab;
}
.features img {
width: 50%;
height: 50%;
margin: 10px;
float: left;
}
/* Mobile Nav Styling */
#mobile-nav {
position: fixed;
top: 0;
padding-top: 18px;
bottom: 0;
z-index: 998;
background: rgba(0, 0, 0, 0.9);
left: -260px;
width: 260px;
overflow-y: auto;
-webkit-transition: 0.4s;
-o-transition: 0.4s;
transition: 0.4s;
}
#mobile-nav ul {
padding: 0;
margin: 0;
list-style: none;
}
#mobile-nav ul li {
position: relative;
}
#mobile-nav ul li a {
color: #fff;
font-size: 16px;
overflow: hidden;
padding: 10px 22px 10px 15px;
position: relative;
text-decoration: none;
width: 100%;
display: block;
outline: none;
}
#mobile-nav ul li a:hover {
color: #fff;
}
#mobile-nav ul li li {
padding-left: 30px;
}
#mobile-nav ul .menu-has-children i {
position: absolute;
right: 0;
z-index: 99;
padding: 15px;
cursor: pointer;
color: #fff;
}
#mobile-nav ul .menu-has-children i.fa-chevron-up {
color: #199EB8;
}
#mobile-nav ul .menu-item-active {
color: #199EB8;
}
#mobile-body-overly {
width: 100%;
height: 100%;
z-index: 997;
top: 0;
left: 0;
position: fixed;
background: rgba(0, 0, 0, 0.6);
display: none;
}
/* Mobile Nav body classes */
body.mobile-nav-active {
overflow: hidden;
}
body.mobile-nav-active #mobile-nav {
left: 0;
}
body.mobile-nav-active #mobile-nav-toggle {
color: #fff;
}
/* ==================================================
Stats Styling
================================================== */
.stats-row {
margin-top: 65px;
}
.stats-col .circle {
display: inline-block;
width: 160px;
height: 160px;
font-family: "Raleway", Helvetica, Arial, sans-serif;
font-weight: 500;
color: #666;
border: 6px solid #2f76ab;
border-radius: 50%;
padding: 55px 25px 0 25px;
position: relative;
}
.stats-col .circle .stats-no {
color: #fff;
width: 75px;
height: 75px;
line-height: 70px;
top: -25px;
right: -15px;
font-family: "Raleway", Helvetica, Arial, sans-serif;
font-size: 18px;
background-color: #E04F00;
position: absolute;
border-radius: 50%;
font-weight: 700;
}
/* ==================================================
Call-to-action Styling
================================================== */
.cta {
background-color: #2f76ab;
padding: 25px 0;
}
.cta h2 {
margin-bottom: 5px;
}
.cta h2,
.cta p {
color: #fff;
}
.cta p {
margin-bottom: 0;
opacity: .75;
}
.cta .btn-ghost {
position: relative;
top: 13px;
}
/* ==================================================
Portfolio Styling
================================================== */
.portfolio {
background-color: #edf6ff;
padding-bottom: 0;
}
.portfolio h2 {
color: #2f76ab;
margin-bottom: 25px;
}
.portfolio-grid {
margin-top: 65px;
}
.portfolio-grid .row {
margin: 0;
}
.portfolio-grid .row > div {
padding: 0;
}
.portfolio-grid .row > div .card img {
width: 100%;
}
.portfolio-grid .row > div .card .portfolio-over {
position: absolute;
display: table-cell;
vertical-align: middle;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
top: 0;
left: 0;
text-align: center;
opacity: 0;
visibility: hidden;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.portfolio-grid .row > div .card .portfolio-over > div {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.portfolio-grid .row > div .card .portfolio-over .card-title {
color: #fff;
font-size: 30px;
}
.portfolio-grid .row > div .card .portfolio-over .card-text {
color: #fff;
opacity: .75;
padding: 0 45px;
}
.portfolio-grid .row > div .card:hover .portfolio-over {
opacity: 1;
visibility: visible;
}
.portfolio img{
width: 50%;
height: 50%;
margin: 10px;
float: left;
}
/* ==================================================
Team Styling
================================================== */
.team h2 {
color: #199EB8;
}
.team .col-sm-3 {
padding: 0;
}
.team .card > a {
display: block;
}
.team .card img {
width: 100%;
}
.team .card h4 {
color: #fff;
text-transform: uppercase;
}
.team .card p {
font-size: 11px;
color: #fff;
opacity: .75;
margin: 0;
padding: 0 35px;
}
.team .card .social-nav {
margin-bottom: 45px;
}
.team .card .social-nav a {
color: #fff;
font-size: 16px;
margin: 0 4px;
}
.team .card .social-nav a:hover {
opacity: .75;
}
.team .card:hover .team-over {
opacity: 1;
visibility: visible;
}
.team .card:hover .card-title-wrap {
background-color: #199EB8;
}
.team .card:hover .card-title-wrap .card-title, .team .card:hover .card-title-wrap .card-text {
color: #fff;
}
.team .team-over {
padding-top: 45px;
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
top: 0;
left: 0;
text-align: center;
opacity: 0;
visibility: hidden;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.team .card-title-wrap {
padding: 15px 25px;
position: relative;
z-index: 9;
background-color: #fff;
}
.team .card-title-wrap .card-title, .team .card-title-wrap .card-text {
font-family: "Raleway", Helvetica, Arial, sans-serif;
display: block;
margin: 0;
}
.team .card-title-wrap .card-title {
font-size: 24px;
color: #333;
}
.team .card-title-wrap .card-text {
font-size: 18px;
color: #999;
}
/* ==================================================
Contact Section
================================================== */
#contact {
background: #f7f7f7;
padding: 80px 0;
}
#contact h2 {
font-family: "Raleway", Helvetica, Arial, sans-serif;
color: #199EB8;
}
#contact .info i {
font-size: 32px;
color: #199EB8;
float: left;
}
#contact .info p {
padding: 0 0 10px 50px;
line-height: 24px;
}
#contact .form #sendmessage {
color: #199EB8;
border: 1px solid #199EB8;
display: none;
text-align: center;
padding: 15px;
font-weight: 600;
margin-bottom: 15px;
}
#contact .form #errormessage {
color: red;
display: none;
border: 1px solid red;
text-align: center;
padding: 15px;
font-weight: 600;
margin-bottom: 15px;
}
#contact .form #sendmessage.show, #contact .form #errormessage.show, #contact .form .show {
display: block;
}
#contact .form .validation {
color: red;
display: none;
margin: 0 0 20px;
font-weight: 400;
font-size: 13px;
}
#contact .form input, #contact .form textarea {
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
#contact .form button[type="submit"] {
background: #199EB8;
border: 0;
padding: 10px 24px;
color: #fff;
-webkit-transition: 0.4s;
-o-transition: 0.4s;
transition: 0.4s;
}
#contact .form button[type="submit"]:hover {
background: #23c2e1;
}
/* ==================================================
Footer Styling
================================================== */
.site-footer {
background-color: #111;
padding: 0;
}
.site-footer h2, .site-footer p {
color: #fff;
}
.site-footer p {
opacity: .75;
line-height: 2.0925;
}
.site-footer h2,
.site-footer .btn {
margin-bottom: 25px;
}
.site-footer .social-nav a {
color: #fff;
opacity: .25;
}
.site-footer .social-nav a:hover {
opacity: 1;
}
.site-footer .bottom {
background-color: #000;
padding: 20px 0;
}
.site-footer .bottom .list-inline, .site-footer .bottom p {
margin: 0;
}
.site-footer .bottom .list-inline {
position: relative;
top: 5px;
}
.site-footer .bottom .list-inline a {
color: #fff;
font-family: "Roboto", Helvetica, Arial, sans-serif;
margin-right: 15px;
}
.site-footer .bottom .list-inline a:hover {
color: #199EB8;
}
.site-footer .credits {
color: #ddd;
}
.site-footer .credits a {
color: #199EB8;
}
/* ==================================================
Responsive Styling
================================================== */
#media (max-width: 61.9em) {
section,
.block,
.cta {
padding: 35px 0;
}
.features {
padding-bottom: 5px;
}
p,
.block p {
margin: 0;
}
.hero-brand {
margin-bottom: 35px;
}
.tagline {
margin: 35px 0;
}
h1 {
font-size: 32px;
margin: 0;
}
h2,
.tagline {
font-size: 24px;
}
h2 {
margin-bottom: 25px;
}
h3 {
font-size: 14px;
}
.hero {
padding: 75px 0;
}
.stats-col {
margin-bottom: 25px;
}
.block {
height: auto;
}
.feature-col {
padding-bottom: 30px;
}
.portfolio-grid .card h3.card-title {
font-size: 18px !important;
}
.portfolio-grid .card .card-text {
font-size: 13px;
}
.team .team-over {
padding-top: 20px;
}
.team .card .social-nav {
margin-bottom: 15px;
padding: 0;
}
.site-footer .social-nav {
margin-bottom: 35px;
}
.site-footer .list-inline {
text-align: center;
padding-bottom: 15px;
}
.site-footer .list-inline li {
display: inline-block;
}
}
#media (max-width: 767px) {
.block {
padding-left: 30px;
padding-right: 30px;
}
}
<!-- Header -->
<header id="header">
<div class="container">
<div id="logo" class="pull-left">
<img src="img/logo-nav.png" alt="" title="" /></img>
</div>
<nav id="nav-menu-container">
<ul class="nav-menu">
<li><?php echo $lang['nav_tbas']; ?></li>
<li><?php echo $lang['nav_hansaworld']; ?></li>
<li><?php echo $lang['nav_solutions']; ?></li>
<li><?php echo $lang['nav_about']; ?></li>
<!--<li class="menu-has-children">Drop Down
<ul>
<li>Drop Down 1</li>
<li class="menu-has-children">Drop Down 2
<ul>
<li>Deep Drop Down 1</li>
<li>Deep Drop Down 2</li>
<li>Deep Drop Down 3</li>
<li>Deep Drop Down 4</li>
<li>Deep Drop Down 5</li>
</ul>
</li>
<li>Drop Down 3</li>
<li>Drop Down 4</li>
<li>Drop Down 5</li>
</ul>
</li>-->
<li><?php echo $lang['nav_contact']; ?></li>
<li><?php echo $lang['nav_support']; ?></li>
</ul>
</nav>
<!-- #nav-menu-container -->
<nav class="nav social-nav pull-right hidden-sm-down">
<i class="fa fa-facebook"></i>
<i class="fa fa-envelope"></i>
</nav>
</div>
</header>
<!-- /header -->
<!-- Slider -->
<div class="slider">
<ul>
<li>
<img src="http://www.sofido.net/img/slider/sofido-slide-01.jpg" />
<span class="desc1">
<p class="desc1"><div id="slide01">You are awesome<div></p>
</span>
</li>
<li>
<img src="http://www.sofido.net/img/slider/sofido-slide-01.jpg" />
<span class="desc2">
<h4><br />Another caption title</h4>
<p class="desc">More lorem ipsum dolor...</p>
</span>
</li>
<li>
<img src="http://www.sofido.net/img/slider/sofido-slide-01.jpg" />
<span class="desc">
<h4><br />Another caption title</h4>
<p class="desc">More lorem ipsum dolor...</p>
</span>
</li>
</ul>
</div>
<!-- /Slider -->
Using position: absolute on #header will take it out of the static layout flow and the slider should "slide" up, so to say. You will also need to specify the width since it's out of the flow: width: 100% or width: 100vwshould work. For good measure you should also add top: 0 and left: 0.
You will probably need to set a z-index as well.
Note, I am not very familiar with Bootstrap and there might be a more "Bootstrap-way" to accomplish this, but it should work.
Also note, that I do not know if this will mess with the plugin, you use, that makes the header fixed.
My input isnt alignin properly with the element under it, the accordion. I want the input to align horizontally with the accordion as the textt to the left does, Tried around diffrent things, but did more harm then good.
//Accordion-----------------------------------------------
$(document).ready(function () {
$(".accordion-desc").fadeOut(0);
$(".accordion").click(function () {
$(".accordion-desc").not($(this).next()).slideUp('fast');
$(this).next().slideToggle(400);
});
});
$(".accordion").click(function () {
$(".accordion").not(this).find(".rotate").removeClass("down");
$(this).find(".rotate").toggleClass("down");
});
//-----------------------------------------------------------
body {
background-color: #eee;
font-family: "Open Sans", sans-serif;
}
header {
background-color: #2cc185;
color: #fff;
padding: 2em 1em;
margin-bottom: 1.5em;
}
h1 {
font-weight: 300;
text-align: center;
}
.container {
position: relative;
margin: 0 auto;
}
button {
background-color: #2cc185;
color: #fff;
border: 0;
padding: 1em 1.5em;
}
button:hover {
background-color: #239768;
color: #fff;
}
button:focus {
background-color: #239768;
color: #fff;
}
.accordion {
position: relative;
background-color: #fff;
display: inline-block;
width: 100%;
border-top: 1px solid #f1f4f3;
border-bottom: 1px solid #f1f4f3;
font-weight: 700;
color: #74777b;
vertical-align: middle;
}
/*Rotation-------------------------------------*/
.accordion .fa {
position: relative;
float: right;
}
.rotate {
-moz-transition: all 0.3s linear;
-webkit-transition: all 0.3s linear;
transition: all 0.3s linear;
}
.rotate.down {
-moz-transform: rotate(90deg);
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
}
/*------------------------------------------*/
.link {
text-align: right;
margin-bottom: 20px;
margin-right: 30px;
}
.accordion h4 {
position: relative;
/* top: 0.8em; */
margin: 0;
font-size: 14px;
font-weight: 700;
float: left;
}
.accordion a {
position: relative;
display: block;
color: #74777b;
padding: 1em 1em 2.5em 1em;
text-decoration: none;
}
.accordion a:hover {
text-decoration: none;
color: #2cc185;
background-color: #e7ecea;
transition: 0.3s;
}
.accordion-desc {
background-color: #f1f4f3;
color: #74777b;
z-index: 2;
padding: 20px 15px;
}
#media (min-width:480px) {
.container { max-width: 80%; }
}
#media (min-width:768px) {
.container { max-width: 1000px; }
}
.accordion-desc p {
word-break: break-all;
}
.accordion .status {
position: relative;
float: right;
right: 20%;
vertical-align: middle;
}
.btn {
margin-top: 10px;
}
.heading {
margin: 10px;
vertical-align: middle;
display: inline-block;
position: relative;
width: 100%;
}
.heading h2 {
float: left;
position: relative;
margin:auto;
vertical-align: middle;
}
.heading .searcheBar {
float: right;
position: relative;
margin: auto;
vertical-align: middle;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<div class="container">
<div class ="heading">
<h2>All projekt</h2>
<input class="searcheBar form-control" type="text"/>
</div>
<div class="accordion">
<a href="#">
<h4>#item.Title</h4>
<h4 class="status">#Resource.AccordionStatus</h4>
<i class="fa fa-chevron-right rotate"></i>
</a>
</div>
<div class="accordion-desc">
<h3>#Resource.AccordionProjectLead</h3>
<h4>Kay Wiberg</h4>
<h3>#Resource.AccordionDescription</h3>
<p>
#item.Description
<p>
<div class="link">
#Resource.AccordionGoTo
</div>
</div>
Change :
.heading {
margin:10px;
//more code...
}
To:
.heading {
margin:10px 0px 10px 0px;
//More code...
}
body {
background-color: #eee;
font-family: "Open Sans", sans-serif;
}
header {
background-color: #2cc185;
color: #fff;
padding: 2em 1em;
margin-bottom: 1.5em;
}
h1 {
font-weight: 300;
text-align: center;
}
.container {
position: relative;
margin: 0 auto;
}
button {
background-color: #2cc185;
color: #fff;
border: 0;
padding: 1em 1.5em;
}
button:hover {
background-color: #239768;
color: #fff;
}
button:focus {
background-color: #239768;
color: #fff;
}
.accordion {
position: relative;
background-color: #fff;
display: inline-block;
width: 100%;
border-top: 1px solid #f1f4f3;
border-bottom: 1px solid #f1f4f3;
font-weight: 700;
color: #74777b;
vertical-align: middle;
}
/*Rotation-------------------------------------*/
.accordion .fa {
position: relative;
float: right;
}
.rotate {
-moz-transition: all 0.3s linear;
-webkit-transition: all 0.3s linear;
transition: all 0.3s linear;
}
.rotate.down {
-moz-transform: rotate(90deg);
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
}
/*------------------------------------------*/
.link {
text-align: right;
margin-bottom: 20px;
margin-right: 30px;
}
.accordion h4 {
position: relative;
/* top: 0.8em; */
margin: 0;
font-size: 14px;
font-weight: 700;
float: left;
}
.accordion a {
position: relative;
display: block;
color: #74777b;
padding: 1em 1em 2.5em 1em;
text-decoration: none;
}
.accordion a:hover {
text-decoration: none;
color: #2cc185;
background-color: #e7ecea;
transition: 0.3s;
}
.accordion-desc {
background-color: #f1f4f3;
color: #74777b;
z-index: 2;
padding: 20px 15px;
}
#media (min-width:480px) {
.container { max-width: 80%; }
}
#media (min-width:768px) {
.container { max-width: 1000px; }
}
.accordion-desc p {
word-break: break-all;
}
.accordion .status {
position: relative;
float: right;
right: 20%;
vertical-align: middle;
}
.btn {
margin-top: 10px;
}
.heading {
margin:10px 0px 10px 0px;
vertical-align: middle;
display: inline-block;
position: relative;
width: 100%;
}
.heading h2 {
float: left;
position: relative;
margin:auto;
vertical-align: middle;
}
.heading .searcheBar {
float: right;
position: relative;
margin: auto;
vertical-align: middle;
}
<div class="container">
<div class ="heading">
<h2>All projekt</h2>
<input class="searcheBar form-control" type="text"/>
</div>
<div class="accordion">
<a href="#">
<h4>#item.Title</h4>
<h4 class="status">#Resource.AccordionStatus</h4>
<i class="fa fa-chevron-right rotate"></i>
</a>
</div>
<div class="accordion-desc">
<h3>#Resource.AccordionProjectLead</h3>
<h4>Kay Wiberg</h4>
<h3>#Resource.AccordionDescription</h3>
<p>#item.Description</p>
<div class="link">
#Resource.AccordionGoTo
</div>
</div>
Option #1
Adjusting margin:
.heading {margin: 10px auto;}
//Accordion-----------------------------------------------
$(document).ready(function() {
$(".accordion-desc").fadeOut(0);
$(".accordion").click(function() {
$(".accordion-desc").not($(this).next()).slideUp('fast');
$(this).next().slideToggle(400);
});
});
$(".accordion").click(function() {
$(".accordion").not(this).find(".rotate").removeClass("down");
$(this).find(".rotate").toggleClass("down");
});
//-----------------------------------------------------------
body {
background-color: #eee;
font-family: "Open Sans", sans-serif;
}
header {
background-color: #2cc185;
color: #fff;
padding: 2em 1em;
margin-bottom: 1.5em;
}
h1 {
font-weight: 300;
text-align: center;
}
.container {
position: relative;
margin: 0 auto;
}
button {
background-color: #2cc185;
color: #fff;
border: 0;
padding: 1em 1.5em;
}
button:hover {
background-color: #239768;
color: #fff;
}
button:focus {
background-color: #239768;
color: #fff;
}
.accordion {
position: relative;
background-color: #fff;
display: inline-block;
width: 100%;
border-top: 1px solid #f1f4f3;
border-bottom: 1px solid #f1f4f3;
font-weight: 700;
color: #74777b;
vertical-align: middle;
}
/*Rotation-------------------------------------*/
.accordion .fa {
position: relative;
float: right;
}
.rotate {
-moz-transition: all 0.3s linear;
-webkit-transition: all 0.3s linear;
transition: all 0.3s linear;
}
.rotate.down {
-moz-transform: rotate(90deg);
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
}
/*------------------------------------------*/
.link {
text-align: right;
margin-bottom: 20px;
margin-right: 30px;
}
.accordion h4 {
position: relative;
/* top: 0.8em; */
margin: 0;
font-size: 14px;
font-weight: 700;
float: left;
}
.accordion a {
position: relative;
display: block;
color: #74777b;
padding: 1em 1em 2.5em 1em;
text-decoration: none;
}
.accordion a:hover {
text-decoration: none;
color: #2cc185;
background-color: #e7ecea;
transition: 0.3s;
}
.accordion-desc {
background-color: #f1f4f3;
color: #74777b;
z-index: 2;
padding: 20px 15px;
}
#media (min-width:480px) {
.container {
max-width: 80%;
}
}
#media (min-width:768px) {
.container {
max-width: 1000px;
}
}
.accordion-desc p {
word-break: break-all;
}
.accordion .status {
position: relative;
float: right;
right: 20%;
vertical-align: middle;
}
.btn {
margin-top: 10px;
}
.heading {
margin: 10px auto;
vertical-align: middle;
display: inline-block;
position: relative;
width: 100%;
}
.heading h2 {
float: left;
position: relative;
margin: auto;
vertical-align: middle;
}
.heading .searcheBar {
float: right;
position: relative;
margin: auto;
vertical-align: middle;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<h1>Adjusting Margin</h1>
<div class="container">
<div class="heading">
<h2>All projekt</h2>
<input class="searcheBar form-control" type="text" />
</div>
<div class="accordion">
<a href="#">
<h4>#item.Title</h4>
<h4 class="status">#Resource.AccordionStatus</h4>
<i class="fa fa-chevron-right rotate"></i>
</a>
</div>
<div class="accordion-desc">
<h3>#Resource.AccordionProjectLead</h3>
<h4>Kay Wiberg</h4>
<h3>#Resource.AccordionDescription</h3>
<p>
#item.Description
<p>
<div class="link">
#Resource.AccordionGoTo
</div>
</div>
Option #2
Deferring to padding:
.heading {padding: 10px; box-sizing: border-box;}
//Accordion-----------------------------------------------
$(document).ready(function() {
$(".accordion-desc").fadeOut(0);
$(".accordion").click(function() {
$(".accordion-desc").not($(this).next()).slideUp('fast');
$(this).next().slideToggle(400);
});
});
$(".accordion").click(function() {
$(".accordion").not(this).find(".rotate").removeClass("down");
$(this).find(".rotate").toggleClass("down");
});
//-----------------------------------------------------------
body {
background-color: #eee;
font-family: "Open Sans", sans-serif;
}
header {
background-color: #2cc185;
color: #fff;
padding: 2em 1em;
margin-bottom: 1.5em;
}
h1 {
font-weight: 300;
text-align: center;
}
.container {
position: relative;
margin: 0 auto;
}
button {
background-color: #2cc185;
color: #fff;
border: 0;
padding: 1em 1.5em;
}
button:hover {
background-color: #239768;
color: #fff;
}
button:focus {
background-color: #239768;
color: #fff;
}
.accordion {
position: relative;
background-color: #fff;
display: inline-block;
width: 100%;
border-top: 1px solid #f1f4f3;
border-bottom: 1px solid #f1f4f3;
font-weight: 700;
color: #74777b;
vertical-align: middle;
}
/*Rotation-------------------------------------*/
.accordion .fa {
position: relative;
float: right;
}
.rotate {
-moz-transition: all 0.3s linear;
-webkit-transition: all 0.3s linear;
transition: all 0.3s linear;
}
.rotate.down {
-moz-transform: rotate(90deg);
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
}
/*------------------------------------------*/
.link {
text-align: right;
margin-bottom: 20px;
margin-right: 30px;
}
.accordion h4 {
position: relative;
/* top: 0.8em; */
margin: 0;
font-size: 14px;
font-weight: 700;
float: left;
}
.accordion a {
position: relative;
display: block;
color: #74777b;
padding: 1em 1em 2.5em 1em;
text-decoration: none;
}
.accordion a:hover {
text-decoration: none;
color: #2cc185;
background-color: #e7ecea;
transition: 0.3s;
}
.accordion-desc {
background-color: #f1f4f3;
color: #74777b;
z-index: 2;
padding: 20px 15px;
}
#media (min-width:480px) {
.container {
max-width: 80%;
}
}
#media (min-width:768px) {
.container {
max-width: 1000px;
}
}
.accordion-desc p {
word-break: break-all;
}
.accordion .status {
position: relative;
float: right;
right: 20%;
vertical-align: middle;
}
.btn {
margin-top: 10px;
}
.heading {
padding: 10px;
box-sizing: border-box;
vertical-align: middle;
display: inline-block;
position: relative;
width: 100%;
}
.heading h2 {
float: left;
position: relative;
margin: auto;
vertical-align: middle;
}
.heading .searcheBar {
float: right;
position: relative;
margin: auto;
vertical-align: middle;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<h1>Deferring to Padding</h1>
<div class="container">
<div class="heading">
<h2>All projekt</h2>
<input class="searcheBar form-control" type="text" />
</div>
<div class="accordion">
<a href="#">
<h4>#item.Title</h4>
<h4 class="status">#Resource.AccordionStatus</h4>
<i class="fa fa-chevron-right rotate"></i>
</a>
</div>
<div class="accordion-desc">
<h3>#Resource.AccordionProjectLead</h3>
<h4>Kay Wiberg</h4>
<h3>#Resource.AccordionDescription</h3>
<p>
#item.Description
<p>
<div class="link">
#Resource.AccordionGoTo
</div>
</div>