I am trying to make a dropdown menu at the top of my page; however, I am unable to properly align the edges of the two list item elements.
Picture of the problem:
This is my code:
#font-face {
font-family: "Chivo Mono";
src: url("Resource/Fonts/ChivoMono-Black.ttf") format("ttf");
font-weight: normal;
font-style: normal;
}
* {
box-sizing: border-box;
font-family: 'Trebuchet MS';
color: #777;
}
html,
body {
margin: 0;
padding: 0;
}
.emails {
height: 100px;
width: 250px;
}
.nav li {
display: inline-block;
}
.header {
background-color: #A7C7E7;
background-size: cover;
padding-bottom: 40px;
margin-bottom: 20px;
}
.nav a {
display: inline-block;
padding: 1em;
color: white;
text-decoration: none;
}
.nav a:hover {
background-color: rgba(255, 150, 190, 1);
}
.main-nav {
text-align: center;
font-size: 1.7em;
border-bottom: 3px solid rgba(255, 150, 190, 1);
}
.main-nav li {
padding: 0 5%;
}
.page-name {
text-align: center;
margin: 0;
font-size: 4em;
font-family: "Chivo Mono";
font-weight: normal;
color: rgba(255, 150, 150, 1);
}
.footer {
background-color: #A7C7E7;
margin: 50px 0px;
padding: 50px 0px;
border: white;
}
.footer h1 {
padding: 0px 0px;
}
.footer textarea {
margin-top: 2em;
width: 400px;
height: 200px;
}
.body-text {
max-width: 900px;
margin: 0 auto;
padding: 0 1.5em;
}
.footer {
text-align: center;
margin-top: 10em;
margin-bottom: 0em;
}
body {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.email-button {
padding: 1em;
}
.article-title h2 {
text-align: center;
color: Black;
}
.coming-soon {
color: white;
}
.nav li {
color: white;
}
.email-button button {
background-color: rgba(255, 150, 190, 1);
color: white;
padding: 7px 20px;
font-size: 1.3em;
border-radius: 10px;
border: 0px;
transition-duration: 0.9s;
}
.button:hover {
background-color: white;
color: #A7C7E7;
}
.dropdown ul li a {
font-size: .6em;
}
.dropdown ul a {
display: inline-block;
background-color: rgba(255, 150, 190, 1);
text-align: center;
}
p {
text-align: center;
}
<header class="header">
<nav class="nav main-nav">
<ul>
<li>Home</li>
<li class="dropdown"><a>Rules</a>
<ul>
<li>Bus</li>
</ul>
</li>
</ul>
</nav>
<div>
<h1 class="page-name">About</h1>
</div>
</header>
<section class="body-text">
<div>
<p text>To be writen...
<p>
</div>
</section>
I have tried messing with the paddings and margins, as well as display types.
Try to adjust it with position as below:
nav .dropdown {
position: relative;
}
nav .dropdown ul {
position: absolute;
}
nav > ul .dropdown > ul,
nav > ul .dropdown > ul li {
padding-left:0;
}
Here is the doc for position if you want to know more.
DEMO
#font-face {
font-family: "Chivo Mono";
src: url("Resource/Fonts/ChivoMono-Black.ttf") format("ttf");
font-weight: normal;
font-style: normal;
}
* {
box-sizing: border-box;
font-family: 'Trebuchet MS';
color: #777;
}
html,
body {
margin: 0;
padding:0;
}
p {
text-align:center;
}
.emails {
height:100px;
width:250px;
}
.nav li {
display: inline-block;
}
.header {
background-color:#A7C7E7;
background-size: cover;
padding-bottom: 40px;
margin-bottom: 20px
}
.nav a {
display: inline-block;
padding:1em;
color: white;
text-decoration: none;
}
.nav a:hover {
background-color: rgba(255, 150, 190, 1);
}
.main-nav {
text-align: center;
font-size: 1.7em;
border-bottom: 3px solid rgba(255, 150, 190, 1);
}
.main-nav li {
padding: 0 5%;
}
.page-name {
text-align: center;
margin: 0;
font-size: 4em;
font-family: "Chivo Mono";
font-weight: normal;
color: rgba(255, 150, 150, 1);
}
.footer {
background-color: #A7C7E7;
margin: 50px 0px;
padding: 50px 0px;
border: white;
}
.footer h1 {
padding: 0px 0px;
}
.footer textarea {
margin-top: 2em;
width: 400px;
height: 200px;
}
.body-text {
max-width: 900px;
margin: 0 auto;
padding: 0 1.5em;
}
.footer {
text-align: center;
margin-top: 10em;
margin-bottom: 0em;
}
body {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.email-button {
padding: 1em;
}
.article-title h2 {
text-align: center;
color: Black;
}
.coming-soon {
color: white;
}
.nav li {
color: white;
}
.email-button button {
background-color: rgba(255, 150, 190, 1);
color: white;
padding: 7px 20px;
font-size: 1.3em;
border-radius: 10px;
border: 0px;
transition-duration: 0.9s;
}
.button:hover {
background-color: white;
color: #A7C7E7;
}
.dropdown ul li a {
font-size: .6em;
}
.dropdown ul a{
display: inline-block;
background-color: rgba(255, 150, 190, 1);
text-align: center;
}
nav .dropdown {
position: relative;
}
nav > ul .dropdown > ul {
position: absolute;
}
nav > ul .dropdown > ul,
nav > ul .dropdown > ul li{
padding-left:0;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="zuckymuckyboi" />
<title>Home</title>
<link rel="stylesheet" href="Resources\styles.css">
<style></style>
</head>
<body>
<header class="header">
<nav class="nav main-nav">
<ul>
<li>Home</li>
<li class="dropdown"><a>Rules</a>
<ul>
<li>Bus</li>
</ul>
</li>
</ul>
</nav>
<div>
<h1 class="page-name">About</h1>
</div>
</header>
<section class="body-text">
<div>
<p text>To be writen...<p>
</div>
</section>
</body>
This is really just a hack to get what you are trying to do:
<li style="padding-right:119px;">Bus</li>
Using inline css styling you can add a padding to the specific element you want to adjust.
In this case, you can see padding-right:119px aligns the elements to the left side.
If you want the elements to align on the opposite side, you can similarly use padding-left and adjust in the same manner.
#font-face {
font-family: "Chivo Mono";
src: url("Resource/Fonts/ChivoMono-Black.ttf") format("ttf");
font-weight: normal;
font-style: normal;
}
* {
box-sizing: border-box;
font-family: 'Trebuchet MS';
color: #777;
}
html, body {
margin: 0;
padding:0;
}
.emails {
height:100px; width:250px;
}
.nav li {
display: inline-block;
}
.header {
background-color:#A7C7E7;
background-size: cover;
padding-bottom: 40px;
margin-bottom: 20px
}
.nav a {
display: inline-block;
padding:1em;
color: white;
text-decoration: none;
}
.nav a:hover {
background-color: rgba(255, 150, 190, 1);
}
.main-nav {
text-align: center;
font-size: 1.7em;
border-bottom: 3px solid rgba(255, 150, 190, 1)
}
.main-nav li {
padding: 0 5%;
}
.page-name {
text-align: center;
margin: 0;
font-size: 4em;
font-family: "Chivo Mono";
font-weight: normal;
color: rgba(255, 150, 150, 1);
}
.footer {
background-color: #A7C7E7;
margin: 50px 0px;
padding: 50px 0px;
border: white;
}
.footer h1 {
padding: 0px 0px
}
.footer textarea {
margin-top: 2em;
width: 400px;
height: 200px;
}
.body-text {
max-width: 900px;
margin: 0 auto;
padding: 0 1.5em
}
.footer {
text-align: center;
margin-top: 10em;
margin-bottom: 0em;
}
body {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.email-button {
padding: 1em;
}
.article-title h2 {
text-align: center;
color: Black;
}
.coming-soon {
color: white;
}
.nav li {
color: white;
}
.email-button button {
background-color: rgba(255, 150, 190, 1);
color: white;
padding: 7px 20px;
font-size: 1.3em;
border-radius: 10px;
border: 0px;
transition-duration: 0.9s;
}
.button:hover {
background-color: white;
color: #A7C7E7;
}
.dropdown ul li a {
font-size: .6em;
}
.dropdown ul a{
display: inline-block;
background-color: rgba(255, 150, 190, 1);
text-align: center;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="zuckymuckyboi" />
<title>Home</title>
<link rel="stylesheet" href="Resources\styles.css">
<style>
p {
text-align:center;
}
</style>
</head>
<body>
<header class="header">
<nav class="nav main-nav">
<ul>
<li>Home</li>
<li class="dropdown"><a>Rules</a>
<ul>
<li style="padding-right:119px;">Bus</li>
</ul>
</li>
</ul>
</nav>
<div>
<h1 class="page-name">About</h1>
</div>
</header>
<section class="body-text">
<div>
<p text>To be writen...<p>
</div>
</section>
</body>
I would like to implement an animation when the dropdown menu is triggered once clicked on the hamburger icon (only appears on mobile and tablet). By now it only appears and disappears when clicked, but I would like it to have a drop animation. Which would be the best way to do this avoiding js and just using css, if possible?
body {
background-color: #111111 !important;
font-family: 'Fredoka', sans-serif;
}
a {
color: #dad7d7;
text-decoration: none;
transition: 0.3s;
}
.botoncopyright,
.botoncopyright:hover {
color: #ccd1d1;
}
footer {
background-color: #232323;
}
.cookie-container {
background-color: #232323;
color: #dad7d7;
}
.cookie-container a {
color: #dad7d7;
}
.cookie-container a:hover {
color: #ffffff;
}
html {
scroll-behavior: smooth;
}
main {
min-height: 100vh;
display: grid;
grid-template-rows: auto 1fr auto;
gap: 2vw;
}
a {
color: #dad7d7;
text-decoration: none;
transition: 0.3s;
}
nav {
z-index: 1;
background-color: rgba(35, 35, 35, 0.9);
backdrop-filter: saturate(180%) blur(20px);
padding: 0 15px;
position: sticky;
top: 0;
}
.botoncopyright,
.botoncopyright:hover {
color: #ccd1d1;
text-decoration: none;
cursor: default;
}
footer {
background-color: #232323;
}
.cookie-container {
position: fixed;
top: auto;
right: 0;
bottom: 0;
left: 0;
z-index: 2;
background-color: #363636;
color: #dad7d7;
text-align: center;
padding: 10px 32px;
transform: translateY(100%);
transition: transform 400ms ease-in-out;
}
.cookie-container.active {
transform: translateY(0);
}
.cookie-container p {
padding-top: 10px;
}
.cookie-container a {
text-decoration: none !important;
color: #dad7d7;
display: flex;
justify-content: center;
align-items: center;
}
.cookie-container a:hover {
color: #ffffff;
}
.cookie-btn {
background-color: #add8e6;
border: none;
margin-top: 20px;
width: 28%;
color: #232323 !important;
transition: 0.3s;
cursor: pointer;
border-radius: 4px 4px 4px 4px;
margin-bottom: 10px;
}
.cookie-btn:hover {
background-color: #a6daeb;
width: 30%;
transition: 0.3s;
}
footer .btn svg {
transition: 0.3s;
}
.rsyoutube {
fill: #8b8d90;
}
.rsyoutube:hover {
fill: #ff0000;
}
.rstwitter {
fill: #8b8d90;
}
.rstwitter:hover {
fill: #00acee;
}
.rsinstagram {
fill: #8b8d90;
}
.rsinstagram:hover {
fill: #de1b85;
}
.rstelegram {
fill: #8b8d90;
}
.rstelegram:hover {
fill: #229ed9;
}
.rsdiscord {
fill: #8b8d90;
}
.rsdiscord:hover {
fill: #5865f2;
}
df-messenger {
--df-messenger-bot-message: #e1f2f7;
--df-messenger-button-titlebar-color: #add8e6;
--df-messenger-button-titlebar-font-color: #757575;
--df-messenger-chat-background-color: #232323;
--df-messenger-font-color: #232323;
--df-messenger-send-icon: #add8e6;
--df-messenger-user-message: #add8e6;
}
df-messenger:hover {
--df-messenger-button-titlebar-color: #a6daeb;
}
.content {
margin: auto;
max-width: 2200px;
width: 96vw;
}
.contact-wrapper {
background: transparent;
width: 100%;
height: auto;
}
.contact-wrapper h1,
.contact-wrapper h2 {
margin: 1.8em 0 47px 0;
font-weight: 400;
text-transform: uppercase;
color: #d2d2d2;
letter-spacing: 0.2em;
}
.contact-wrapper h1 {
font-size: 20px;
text-align: center;
}
.contact-wrapper h2 {
font-size: 18px;
text-align: left;
}
.contact-wrapper p {
color: #d2d2d2;
text-align: justify;
}
.contact-wrapper > * {
padding: 1em;
}
.contact-form {
background: linear-gradient(225deg, transparent 30px, #212121 0) top left;
background-size: 100% 100%;
background-repeat: no-repeat;
width: 100%;
height: auto;
}
.contact-form h2 {
margin: 10px 0 30px 0;
font-size: 18px;
padding-top: 2.5em;
text-align: center;
font-weight: 400;
text-transform: uppercase;
color: #d2d2d2;
letter-spacing: 0.2em;
}
.contact-form form p{
color: #d2d2d2;
margin: 0;
text-align: center;
padding: 1em;
}
.contact-form form button,
.contact-form form input,
.contact-form form textarea {
width: 90%;
padding: 0.7em;
border: none;
background: none;
outline: none;
resize: none;
color: #d2d2d2;
border-bottom: 1px solid #add8e6;
}
.contact-form form button {
padding: none;
width: 53%;
background: #add8e6;
border: 0;
transition: 0.1s;
border-radius: 8px;
color: #3b3b3b;
}
.contact-form form button:hover,
.contact-form form button:focus {
background: #a6daeb;
padding: none;
width: 57%;
border: 0;
transition: 0.1s;
border-radius: 8px;
color: #3b3b3b;
}
.contact-info {
background: linear-gradient(-315deg, transparent 30px, #a7d1de 0) bottom left;
background-size: 100% 100%;
background-repeat: no-repeat;
height: auto;
}
.contact-info h3 {
margin: 0 0 37px 38px;
font-size: 14px;
padding-top: 2em;
text-align: center;
padding-right: 27px;
font-weight: 400;
text-transform: uppercase;
color: #232323;
letter-spacing: 0.2em;
}
#clients .client-logo {
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;
border: none;
overflow: hidden;
background: none;
height: 120px;
}
#clients img {
transition: all 0.4s ease-in-out;
}
.contact-info p {
text-align: center;
margin: 1.5rem 0 1rem 0;
color: #696969;
}
.btn:focus {
outline: none !important;
box-shadow: none !important;
}
.toggle a {
color: #dad7d7;
}
.toggle a:hover {
color: #ffffff;
}
.menu,
.submenu {
list-style-type: none;
}
.logo {
padding: 7.5px 0 7.5px 0;
}
.botonlogo {
max-width: 56px;
}
.item {
padding: 10px;
}
.item.button {
padding: 9px 5px;
}
.item:not(.button) a:hover,
.item a:hover::after {
color: #ffffff;
transition: 0.3s;
}
.menu {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
width: 100%;
}
.menu li a {
display: block;
padding: 15px 5px;
}
.menu li.subitem a {
padding-right: -15px;
padding-left: 15px;
padding-top: 35px;
width: 100%;
}
.toggle {
order: 1;
font-size: 20px;
}
.item.button {
order: 2;
}
.item {
order: 3;
width: 100%;
text-align: center;
display: none;
}
.active .item {
display: block;
}
.button.secondary {
border-bottom: 1px solid #dad7d7;
}
.submenu {
display: none;
}
.submenu-active .submenu {
display: block;
}
.has-submenu>a::after {
font-family: 'Font Awesome 5 Free';
font-size: 16px;
line-height: 16px;
content: '\f024';
color: #dad7d7;
padding-left: 11px;
}
.subitem a {
padding: 10px 15px;
}
.submenu-active {
border-radius: 0;
background-color: #363636;
width: 100%;
border-radius: 5px 5px 0px 0px;
}
li.has-submenu a {
color: #dad7d7 !important;
transition: 0.3s;
padding-bottom: 12px;
cursor: pointer;
}
li.has-submenu a:hover {
color: #ffffff !important;
transition: 0.3s;
cursor: pointer;
}
li.subitem a {
padding-left: 0%;
padding-right: 53px !important;
width: 100%;
}
/* Mediaqueries tablet */
#media all and (min-width: 700px) {
.cookie-btn {
background-color: #add8e6;
border: none;
margin-top: 20px;
width: 13%;
color: #232323 !important;
transition: 0.3s;
cursor: pointer;
border-radius: 4px 4px 4px 4px;
margin-bottom: 10px;
}
.cookie-btn:hover {
background-color: #a6daeb;
width: 18%;
transition: 0.3s;
}
.content {
margin-left: auto;
margin-right: auto;
max-width: 2200px;
width: 96vw;
}
.contact-wrapper {
background: transparent;
width: 100%;
height: auto;
}
.contact-wrapper h1,
.contact-wrapper h2 {
margin: 1.8em 0 47px 0;
font-weight: 400;
text-transform: uppercase;
color: #d2d2d2;
letter-spacing: 0.2em;
}
.contact-wrapper h1 {
font-size: 20px;
text-align: center;
}
.contact-wrapper h2 {
font-size: 18px;
text-align: left;
}
.contact-wrapper p {
color: #d2d2d2;
text-align: justify;
}
.contact-wrapper > * {
padding: 1em;
}
.contact-form {
background: linear-gradient(225deg, transparent 30px, #212121 0) top left;
background-size: 100% 100%;
background-repeat: no-repeat;
width: 100%;
height: auto;
}
.contact-form h2 {
margin: 10px 0 30px 0;
font-size: 18px;
padding-top: 2.5em;
text-align: center;
font-weight: 400;
text-transform: uppercase;
color: #d2d2d2;
letter-spacing: 0.2em;
}
.contact-form form p{
color: #d2d2d2;
margin: 0;
text-align: center;
padding: 1em;
padding-top: 7.1%;
}
.contact-form form button,
.contact-form form input,
.contact-form form textarea {
width: 90%;
padding: 0.7em;
border: none;
background: none;
outline: none;
resize: none;
color: #d2d2d2;
border-bottom: 1px solid #add8e6;
}
.contact-form form button {
padding: none;
width: 34%;
background: #add8e6;
border: 0;
transition: 0.1s;
border-radius: 8px;
color: #3b3b3b;
}
.contact-form form button:hover,
.contact-form form button:focus {
background: #a6daeb;
padding: none;
width: 38%;
border: 0;
transition: 0.1s;
border-radius: 8px;
color: #3b3b3b;
}
.contact-info {
background: linear-gradient(-315deg, transparent 30px, #a7d1de 0) bottom left;
background-size: 100% 100%;
background-repeat: no-repeat;
height: auto;
}
.contact-info h3 {
margin: 0 0 37px 38px;
font-size: 14px;
padding-top: 5em;
text-align: center;
padding-right: 27px;
font-weight: 400;
text-transform: uppercase;
color: #232323;
letter-spacing: 0.2em;
}
#clients .client-logo {
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;
border: none;
overflow: hidden;
background: none;
height: 120px;
}
#clients img {
transition: all 0.4s ease-in-out;
}
.contact-info p {
text-align: center;
margin: 5rem 0 1rem 0;
width: 90%;
margin-right: auto;
margin-left: auto;
color: #696969;
}
.btn:focus {
outline: none !important;
box-shadow: none !important;
}
.menu {
justify-content: center;
width: 100%;
}
.logo {
flex: 1;
}
.item.button {
width: auto;
order: 1;
display: block;
}
.toggle {
flex: 1;
text-align: right;
order: 2;
}
.menu li.button a {
padding: 10px 15px;
margin: 5px 0;
}
.button a {
background-color: #add8e6;
color: #232323;
border: 1.5px solid #add8e6;
border-radius: 4px 4px 4px 4px;
transition: 0.8s;
}
.button.secondary {
border: 0;
}
.button.secondary a {
background-color: #add8e6;
border: 1.5px solid #add8e6;
transition: 0.8s;
}
.button a:hover {
background-color: #a6daeb;
text-decoration: none;
color: #474747;
transition: 0.8s;
}
.button:not(.secondary) a:hover {
border: 1.5px solid #a6daeb;
transition: 0.8s;
}
}
/* Mediaqueries desktop */
#media all and (min-width: 960px) {
.cookie-btn {
background-color: #add8e6;
border: none;
margin-top: 20px;
width: 10%;
color: #232323 !important;
transition: 0.3s;
cursor: pointer;
border-radius: 4px 4px 4px 4px;
margin-bottom: 10px;
}
.cookie-btn:hover {
background-color: #a6daeb;
width: 11%;
transition: 0.3s;
}
.content {
margin: auto;
margin-left: auto;
margin-right: auto;
max-width: 2200px;
width: 96vw;
}
.contact-wrapper {
background: transparent;
width: 100%;
height: auto;
display: grid;
grid-template-columns: 2fr 1fr;
}
.contact-wrapper h1,
.contact-wrapper h2 {
margin: 1.8em 0 47px 0;
font-weight: 400;
text-transform: uppercase;
color: #d2d2d2;
letter-spacing: 0.2em;
}
.contact-wrapper h1 {
font-size: 20px;
text-align: center;
}
.contact-wrapper h2 {
font-size: 18px;
text-align: left;
}
.contact-wrapper p {
color: #d2d2d2;
text-align: justify;
padding-top: 10%;
}
.contact-wrapper > * {
padding: 1em;
}
.contact-form {
background: linear-gradient(-315deg, transparent 45px, #212121 0) bottom left;
background-size: 100% 100%;
background-repeat: no-repeat;
width: 100%;
height: auto;
}
.contact-form h2 {
margin: 10px 0 30px 0;
font-size: 18px;
padding-top: 2.5em;
text-align: center;
font-weight: 400;
text-transform: uppercase;
color: #d2d2d2;
letter-spacing: 0.2em;
}
.contact-form form p{
color: #d2d2d2;
margin: 0;
text-align: center;
padding: 1em;
padding-top: 7%;
}
.contact-form form button,
.contact-form form input,
.contact-form form textarea {
width: 90%;
padding: 0.7em;
border: none;
background: none;
outline: none;
resize: none;
color: #d2d2d2;
border-bottom: 1px solid #add8e6;
}
.contact-form form button {
padding: none;
width: 40%;
background: #add8e6;
border: 0;
transition: 0.2s;
border-radius: 8px;
color: #3b3b3b;
margin-bottom: 6%;
}
.contact-form form button:hover,
.contact-form form button:focus {
background: #a6daeb;
padding: none;
width: 44%;
border: 0;
transition: 0.2s;
border-radius: 8px;
color: #3b3b3b;
}
.contact-info {
background: linear-gradient(225deg, transparent 45px, #a7d1de 0) top left;
background-size: 100% 100%;
background-repeat: no-repeat;
height: auto;
}
.contact-info h3 {
margin: 0 0 37px 38px;
font-size: 14px;
padding-top: 25%;
text-align: center;
padding-right: 27px;
font-weight: 400;
text-transform: uppercase;
color: #232323;
letter-spacing: 0.2em;
}
#clients .client-logo {
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;
border: none;
overflow: hidden;
background: none;
height: 120px;
}
#clients img {
transition: all 0.4s ease-in-out;
}
.contact-info p {
text-align: center;
margin: 2rem 0 1rem 0;
width: 86%;
margin-right: auto;
margin-left: auto;
color: #696969;
}
.item {
order: 1;
position: relative;
display: block;
width: auto;
}
.button {
order: 2;
}
.submenu-active .submenu {
display: block;
position: absolute;
left: 0;
top: 68px;
background-color: #363636;
border-radius: 0px 0px 5px 5px;
}
.toggle {
display: none;
}
.boton {
background-color: #add8e6;
border: none;
color: #585858 !important;
}
.boton:hover {
background-color: #a6daeb;
border: none;
color: #585858 !important;
}
}
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width-device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="img/favicon.ico" /><title>Mixi</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="https://www.gstatic.com/dialogflow-console/fast/messenger/bootstrap.js?v=1"></script>
<df-messenger chat-title="Mixi" agent-id="41fe496c-6e3a-4316-aa5a-05dae8cd911d" language-code="es"></df-messenger>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-229317979-1"></script>
<script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-229317979-1');</script>
<script src="https://kit.fontawesome.com/d48f664aec.js" crossorigin="anonymous"></script>
<script src="js/main.js"></script>
<link rel="preload" href="css/index.css" as="style">
<link rel="stylesheet" type="text/css" href="css/index.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fredoka:wght#300&display=swap" rel="stylesheet">
</head>
<body>
<nav>
<ul class="menu">
<li class="logo"><a class="botonlogo" href="https://www.mixi.es"><svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"width="50px" height="50px" viewBox="0 0 99 99" enable-background="new 0 0 99 99" xml:space="preserve"><path fill="#ACD7E4" d="M85.95,98.88H12.37c-6.78,0-12.28-5.5-12.28-12.28V13.02c0-6.78,5.5-12.28,12.28-12.28h73.58c6.78,0,12.28,5.5,12.28,12.28V86.6C98.23,93.38,92.73,98.88,85.95,98.88z"/><g><g><g><path fill="#1D1D1B" d="M7.96,66.3c-0.68,0-1.17-0.11-1.49-0.32s-0.53-0.5-0.64-0.85c-0.11-0.35-0.16-0.78-0.16-1.28v-21.1c0-0.46,0.05-0.86,0.16-1.2c0.11-0.34,0.33-0.59,0.67-0.77s0.84-0.27,1.52-0.27c0.78,0,1.34,0.15,1.68,0.45c0.34,0.3,0.51,0.83,0.51,1.57l-0.21,2.29c0.25-0.53,0.62-1.07,1.12-1.6c0.5-0.53,1.09-1.01,1.79-1.44c0.69-0.43,1.43-0.76,2.21-1.01c0.78-0.25,1.58-0.37,2.4-0.37c1.24,0,2.35,0.22,3.33,0.67c0.98,0.44,1.86,1.07,2.64,1.89c0.78,0.82,1.44,1.83,1.97,3.04c0.71-1.17,1.46-2.17,2.26-3.01c0.8-0.83,1.71-1.47,2.72-1.92c1.01-0.44,2.16-0.67,3.44-0.67c2.06,0,3.77,0.51,5.14,1.52c1.37,1.01,2.4,2.43,3.09,4.26c0.69,1.83,1.04,4.02,1.04,6.58v11.13c0,0.5-0.05,0.92-0.16,1.28c-0.11,0.36-0.32,0.63-0.64,0.83s-0.83,0.29-1.54,0.29c-0.67,0-1.19-0.11-1.54-0.32c-0.36-0.21-0.58-0.5-0.67-0.85c-0.09-0.35-0.13-0.78-0.13-1.28V52.72c0-1.56-0.2-2.93-0.59-4.1c-0.39-1.17-0.96-2.08-1.71-2.72c-0.75-0.64-1.72-0.96-2.93-0.96c-1.28,0-2.41,0.32-3.38,0.96c-0.98,0.64-1.73,1.54-2.26,2.69s-0.8,2.53-0.8,4.13v11.24c0,0.53-0.11,1-0.32,1.39c-0.21,0.39-0.53,0.67-0.96,0.83c-0.43,0.16-0.96,0.19-1.6,0.08c-0.53-0.04-0.94-0.17-1.23-0.4s-0.46-0.51-0.53-0.85c-0.07-0.34-0.11-0.72-0.11-1.15V52.72c0-1.56-0.19-2.93-0.56-4.1s-0.94-2.08-1.71-2.72c-0.76-0.64-1.75-0.96-2.96-0.96c-1.28,0-2.41,0.33-3.38,0.99c-0.98,0.66-1.73,1.57-2.26,2.74c-0.53,1.17-0.8,2.52-0.8,4.05v11.19c0,0.5-0.05,0.92-0.16,1.28c-0.11,0.36-0.33,0.63-0.67,0.83C9.2,66.2,8.67,66.3,7.96,66.3z"/><path fill="#1D1D1B" d="M52.23,34.12c-0.78,0-1.37-0.12-1.76-0.35c-0.39-0.23-0.65-0.56-0.77-0.99c-0.12-0.43-0.19-0.92-0.19-1.49c0-0.57,0.06-1.06,0.19-1.46c0.12-0.41,0.39-0.71,0.8-0.91c0.41-0.2,1-0.29,1.78-0.29c0.75,0,1.31,0.11,1.71,0.32s0.65,0.53,0.77,0.96c0.12,0.43,0.19,0.94,0.19,1.54c0,0.53-0.06,1-0.19,1.41c-0.12,0.41-0.38,0.72-0.77,0.93C53.6,34.02,53.01,34.12,52.23,34.12z M52.23,66.3c-0.67,0-1.19-0.1-1.54-0.29c-0.36-0.2-0.58-0.47-0.67-0.83c-0.09-0.35-0.13-0.78-0.13-1.28V42.86c0-0.46,0.05-0.88,0.16-1.25s0.33-0.65,0.67-0.83c0.34-0.18,0.86-0.27,1.57-0.27c0.67,0,1.17,0.1,1.49,0.29c0.32,0.2,0.53,0.48,0.64,0.85c0.11,0.37,0.16,0.81,0.16,1.3v20.99c0,0.5-0.05,0.92-0.16,1.28c-0.11,0.36-0.33,0.62-0.67,0.8C53.42,66.21,52.91,66.3,52.23,66.3z"/></g></g><g><path fill="#1D1D1B" d="M65.03,57.61l-4.59,5c-0.52,0.57-0.88,1.05-1.08,1.43c-0.2,0.39-0.2,0.75,0,1.09c0.2,0.34,0.56,0.7,1.08,1.09c0.52,0.35,0.97,0.59,1.35,0.72c0.38,0.12,0.77,0.08,1.17-0.13c0.4-0.21,0.86-0.58,1.38-1.12l7.42-8.08H65.03z"/><path fill="#1D1D1B" d="M84.36,64.04c-0.18-0.39-0.55-0.87-1.11-1.43l-8.04-8.76l8.1-8.83c0.56-0.57,0.92-1.05,1.08-1.43c0.16-0.39,0.14-0.75-0.06-1.09c-0.2-0.34-0.58-0.72-1.14-1.14c-0.76-0.57-1.38-0.81-1.86-0.72c-0.48,0.09-1.12,0.52-1.92,1.3l-7.56,8.24l-7.56-8.24c-0.48-0.53-0.9-0.9-1.26-1.12c-0.36-0.21-0.73-0.27-1.11-0.16c-0.38,0.11-0.83,0.34-1.35,0.69c-0.6,0.39-1,0.75-1.2,1.09c-0.2,0.34-0.21,0.71-0.03,1.12c0.18,0.41,0.53,0.89,1.05,1.46l8.1,8.83l-0.01,0.01l3.37,3.67l0.01-0.01l7.5,8.18c0.56,0.53,1.04,0.9,1.44,1.12c0.4,0.21,0.79,0.26,1.17,0.13c0.38-0.12,0.81-0.36,1.29-0.72c0.56-0.39,0.93-0.75,1.11-1.09C84.54,64.79,84.54,64.43,84.36,64.04z"/></g><g><g><path fill="#1D1D1B" d="M90.03,34.55c-0.78,0-1.37-0.11-1.76-0.35c-0.39-0.23-0.65-0.56-0.77-0.99c-0.12-0.43-0.19-0.92-0.19-1.49c0-0.57,0.06-1.06,0.19-1.47c0.12-0.41,0.39-0.71,0.8-0.91c0.41-0.19,1-0.29,1.79-0.29c0.75,0,1.31,0.11,1.7,0.32c0.39,0.21,0.65,0.53,0.77,0.96s0.19,0.94,0.19,1.54c0,0.53-0.06,1-0.19,1.41c-0.12,0.41-0.38,0.72-0.77,0.93C91.4,34.44,90.81,34.55,90.03,34.55z M90.03,66.72c-0.67,0-1.19-0.1-1.54-0.29c-0.36-0.2-0.58-0.47-0.67-0.83c-0.09-0.35-0.13-0.78-0.13-1.28V43.28c0-0.46,0.05-0.88,0.16-1.25c0.11-0.37,0.33-0.65,0.67-0.83s0.86-0.27,1.57-0.27c0.67,0,1.17,0.1,1.49,0.29c0.32,0.2,0.53,0.48,0.64,0.85s0.16,0.81,0.16,1.31v20.99c0,0.5-0.05,0.92-0.16,1.28c-0.11,0.36-0.33,0.62-0.67,0.8C91.21,66.63,90.71,66.72,90.03,66.72z"/></g></g></g></svg></a></li>
<li class="item">Tienda</li>
<li class="item">Calculadora</li>
<li class="item">Noticias</li>
<li class="item">Contacto</li>
<li class="item has-submenu">
<a tabindex="0">Idioma: ES</a>
<ul class="submenu">
<li class="subitem">English</li>
</ul>
</li>
<li class="toggle"><i class="fas fa-bars"></i></li>
<script src="js/toggle.js"></script>
</ul>
</nav>
<br>
<br>
<br>
<br>
<br>
<br>
<script src="js/utilidades.js"></script>
<footer class="text-center text-white">
<div class="text-center text-dark p-3" style="background-color: rgba(0, 0, 0, 0.2);">
<a class="botoncopyright">Mixi © | 2022</a>
</div>
</footer>
<script src="js/toggle.js"></script>
</body>
</html>
Have you tried to add transition to the nav?
If not try
Nav{transition:easy-in-out all 0.5s}
I'm having troubles with my new website in Wordpress. I have selected a theme and I have overwritten some styles. I have used also Visual Composer. In Google Chrome it's perfect or with some small pixel perfect, but when I see it on Firefox all is a mess! xO I was searching and checking each detail but I couldn't find nothing, so..I think that more heads can thinking more efficiently.
The site is Crescor Travel
Here a screenshot with error:
I think that the error can be in margins. Somebody know if there's problem with margin?
The CSS code is...
/**
* LAYOUT CONTENT
*/
section.content { padding: 0; }
/**
* TYPOGRAPHIC
*/
*, body { font-family: "proxima-nova", sans-serif !important; }
h1,
h2,
h3 {
line-height: 36px;
color: #202226 !important;
}
h1 {
font-size: 3rem !important;
}
h2 {
font-size: 2.25rem !important;
}
h3 {
font-size: 2rem !important;
}
p {
font-size: 1rem;
}
strong { color: #202226; }
article {
border-bottom: none;
padding-bottom: 0;
margin-bottom: 0;
}
i {
font-style: normal !important;
}
/**
* HEADER SECTION
*/
.title_section {
text-align: center;
font-weight: normal;
}
.caption_section {
font-size: 1.125rem;
color: #747980;
line-height: 30px;
text-align: center !important;
margin: 0 400px;
margin-top: 30px;
margin-bottom: 71px !important;
letter-spacing: 0;
}
.fullscreen-container,
.fullwidthbanner-container {
height: 100% !important;
}
body div.title_container {
margin-top: 66%!important;
margin-left: -22.5%!important;
}
.subheader-title-holder {
padding: 0 30% 0 9.5% !important;
}
.main-title {
text-align: left!important;
font-weight: 300!important;
font-size: 3rem!important;
margin-left: -18px!important;
}
.main-title span { font-weight: bold !important; }
h1.title_page {
color: #fff!important;
margin-bottom: 22px !important;
line-height: 54px!important;
font-weight: 300;
letter-spacing: 2px!important;
}
h1.title_page strong {
font-size: 3rem !important;
color: #fff!important;
font-weight: 600!important;
letter-spacing: 1px!important;
}
p.caption_page {
font-size: 1.25rem !important;
line-height: 36px !important;
font-weight: normal!important;
letter-spacing: -0.6px!important;
margin: 30px 0 60px !important;
}
div#slide-4-layer-2 {
margin-top: 110px !important;
margin-left: -70%!important;
width: 170px;
color: #E74C3C!important;
font-size: 12px!important;
font-weight: bold!important;
background-color: #fff!important;
line-height: 30px!important;
text-align: center!important;
}
.bruno-subheader-wraper {
overflow: visible!important;
}
/**
* NAV SECTION
*/
#bruno-head {
z-index: 999;
}
.dpr-fullwidth {
padding-left: 8.4%!important;
padding-right: 8.4%!important;
}
.imageLogo .logo-default {
padding: 40px 0 0 0;
height: 15px !important;
width: 138px !important;
}
body .bruno-sticky-navigation-wrapper li:last-child a {
border: 1px solid #e8e8e8 !important;
padding: 6px 0 !important;
}
body .bruno-sticky-navigation-wrapper li:last-child a:hover { background-color: #ea314a!important; }
body .bruno-sticky-navigation-wrapper li:last-child a .menu-title:hover { color: #fff!important; }
body div#bruno-navigation-wrapper .bruno-sticky-navigation-wrapper .sf-menu li.root a:hover {
color: #fff !important;
border: none!important;
}
body .bruno-sticky-navigation-wrapper .sf-menu li.root a .menu-title:hover { color: #000; }
body #bruno-navigation-wrapper.bruno-sticky-navigation-wrapper .sf-menu li.root.current-menu-item a { color: #EA314A!important; }
body .bruno-sticky-navigation-wrapper li:last-child a .menu-title { color: #E74C3C !important; }
.imageLogo .logo-sticky { padding-top: 26px; }
.sf-menu li a {
padding: 36px 0 36px 0;
font-size: 0.75rem !important;
color: #fff !important;
font-weight: 600 !important;
text-transform: uppercase;
}
body #bruno-navigation-wrapper .sf-menu li.root a:hover,
.current-menu-item a {
font-weight: bold!important;
color: #fff!important;
}
body #bruno-navigation-wrapper .bruno-sticky-navigation-wrapper .sf-menu li.root a:hover,
.current-menu-item a {
color: #000!important;
}
.sf-menu li { margin-left: 18px; }
.top-navigation ul li:last-child a {
margin-top: 24px;
border: 1px solid #FFFFFF;
height: 45px;
width: 110px;
border-radius: 60px;
padding: 8px!important;
text-align: center;
background-color: transparent;
font-weight: bold!important;
}
body .submenu li.childmenu { background-color: #fff; }
body .submenu li.childmenu a:hover { background: #fff!important; }
body .submenu li.childmenu a .menu-title { color: #333333!important; }
.top-navigation .submenu li.childmenu:last-child a {
margin: 0!important;
border: none!important;
padding: 13px 16px!important;
font-weight: normal!important;
height: initial!important;
width: initial!important;
border-radius: 0!important;
text-align: left!important;
padding-top: 13px!important;
}
.bruno-sticky-navigation-wrapper ul li:last-child a {
margin-top: 12px !important;
}
body #bruno-navigation-wrapper .top-navigation ul li:last-child a:hover {
background-color: #fff;
color: #EA314A!important;
padding-top: 8px;
}
.icon-menu {
color: #fff!important;
}
#bruno-navigation-wrapper .sf-menu li.current-menu-item a {
color: #fff !important;
border-color: #fff !important;
}
/**
* CONTENT
*/
#bruno-mainbody { padding: 0; }
.bruno-page {
padding-top: 0;
margin-top: -90px;
}
#talk_to_us h3 {
font-weight: normal!important;
color: #202226!important;
}
#talk_to_us a { margin-top: 50px; }
body .about_us .vc_single_image-wrapper:before {
background-color: #E74C3C!important;
top: 48%;
}
body div#second_row_about div.wpb_column div.vc_single_image-wrapper:before {
top: 58%!important;
}
/**
* BANNER SECTION
*/
.banner_section {
background-color: #fff !important;
z-index: 3;
width: 78.5%;
margin: -10% auto 0 auto!important;
box-shadow: 0 12px 90px rgba(0, 1, 1, 0.2);
border-radius: 6px;
padding: 32px;
}
.banner_section .wpb_column {
margin-top: -58px!important;
}
.banner_section span { color: #202226!important; }
#first_column_banner p span {
font-size: 18px;
color: #202226 !important;
line-height: 26px;
letter-spacing: -0.5px;
font-weight: normal;
}
#first_column_banner p:last-child { font-size: 14px; }
#first_column_banner { padding: 50px 35px 0 35px; }
#second_column_banner { padding: 60px 35px 0 0; }
#third_column_banner { padding: 62px 40px 0 0; }
#first_column_banner,
#second_column_banner,
#third_column_banner {
background-color: #fff !important;
}
#second_column_banner span,
#third_column_banner span {
font-size: 16px;
font-weight: 700;
letter-spacing: 0;
}
.banner_section h2 {
color: #202226!important;
font-weight: normal;
margin-bottom: 0.75rem;
}
.banner_section p {
line-height: 25px;
color: #747980;
letter-spacing: -0.5px !important;
}
.banner_section .btn_white { border: 1px solid #e8e8e8; }
.Default-minus {
width: 24px;
height: 2px;
color: #E74C3C;
margin-right: 20px;
}
.section_service .vc_column-inner {
padding: 100px 17%!important;
}
.section_service h2 { font-style: normal!important; }
.section_service i {
font-size: 60px;
color: #EB374A;
font-style: normal!important;
}
.section_service hr {
width: 11%;
float: left;
}
/**
* SOLUTIONS SECTION
*/
#solution {
margin-top: 147px;
margin-bottom: -50px;
}
.vc_box_shadow { box-shadow: 0 12px 90px rgba(0, 1, 1, 0.1)!important; }
.solution_left .block_solution {
margin: 100px;
}
.block_solution hr {
width: 50px;
float: left;
color: #E7E8EB!important;
border: 1px solid #E7E8EB;
}
.take_off .vc_single_image-wrapper:before { content: none!important; }
.solution_right .block_solution {
margin: 124px 180px 124px 110px;
}
h2.title_block_solution {
line-height: 42px;
text-align: left;
font-size: 2rem!important;
font-weight: normal;
}
p.caption_block_solution {
display: block;
clear: both;
font-size: 1rem;
line-height: 30px;
margin-top: 30px;
}
.solution_right,
.solution_left { margin-top: 130px !important; }
.solution_left .vc_single_image-wrapper:before {
content: " ";
width: 312px;
height: 312px;
background-color: #f6fafb;
}
.solution_left .vc_single_image-wrapper:before,
.solution_right .vc_single_image-wrapper:before {
content: " ";
width: 312px;
height: 312px;
background-color: #f6fafb;
z-index: -1;
position: absolute;
left: -10%;
}
.solution_left .vc_single_image-wrapper:before {
top: 49%;
}
.solution_right .vc_single_image-wrapper:before {
top: 35%;
}
/**
* PARTNERS SECTION
*/
div#partners { margin-top: 70px; }
#partners_logos {
padding: 0 40px;
margin-top: 12px;
}
#partners_logos .vc_inner img { width: 130px; }
#partners .wpb_content_element { margin-bottom: 90px; }
#partners_mobile .vc_inner { text-align: center; }
/**
* CALL TO ACTION
*/
.call_to_action {
width: 120%!important;
margin-left: -10%!important;
margin-top: 70px;
padding: 100px 115px 60px;
background-color: #292929;
background: linear-gradient(135deg, #EA314A 0%, #E84C3C 100%);
z-index: 10!important;
}
body p.call_to_action_white strong a {
color: #fff!important;
font-weight: 600!important;
}
.call_to_action_white {
color: #FFFFFF;
font-size: 1.75rem;
font-weight: 300;
line-height: 36px;
text-align: center;
}
/**
* WIDGETS SECTION
*/
.vc_wp_custommenu .menu li {
padding: 0!important;
background: none!important;
border-left: none!important;
}
.vc_wp_custommenu .menu li a {
font-weight: 600!important;
line-height: 32px!important;
color: #747980!important;
}
.box-title span {
text-transform: none!important;
font-weight: 500;
font-size: 16px;
letter-spacing: 0;
}
.stripe:before {
content: "----";
letter-spacing: -3px;
font-size: 24px;
margin-right: 20px;
color: #E74C3C;
}
.box-title span:before {
content: "----";
letter-spacing: -3px;
font-size: 24px;
margin-right: 20px;
color: #E74C3C;
}
#bruno-footer .box.widget_nav_menu ul li a {
color: #747980;
font-size: 14px;
font-weight: 600;
text-transform: none;
padding: 5px 0 0 0;
}
#bruno-footer-wrap {
padding: 90px 0 100px 0;
}
#bruno-footer .box-title { margin-bottom: 10px!important; }
.footer-middle .box-title {
padding-top: 16px;
}
.footer-middle .menu-footer-menu-container { margin-top: -6px; }
.textwidget {
color: #747980;
}
#bruno-footer .box p {
font-size: 0.875rem;
margin-bottom: 15px;
}
/**
* FOOTER
*/
.bruno-copyrights-text {
color: #89898B;
font-weight: 600;
text-align: right;
margin-top: -6px !important;
}
#bruno-footer-wrap {
background-color: transparent!important;
margin-top: 50px;
}
.widget_nav_menu { margin-top: -16px; }
#nav_menu-2 { padding-left: 150px; }
#bruno-footer-wrap hr {
width: 83.2%;
border: 1px solid #e7e8eb;
}
#menu-footer-menu .current-menu-item a {
font-weight: normal !important;
color: #747980 !important;
}
#built_by_text {
font-size: 13px;
line-height: 27px;
font-weight: 400;
color: #89898b;
}
#built_by_text a {
color: #e74c3c!important;
font-weight: 600;
}
/**
* BUTTONS
*/
a.btn_white {
background-color: #fff;
border: none;
padding: 19px 50px !important;
border-radius: 60px;
color: #E74C3C!important;
font-size: 12px!important;
font-weight: bold!important;
text-transform: uppercase;
}
body a.btn_white:hover {
background-color: #EA314A;
color: #fff !important;
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
border: none;
}
a.btn_white:active { box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2); }
a.btn_red {
width: 170px;
background-color: #E74C3C!important;
background: linear-gradient(135deg, #EA314A 0%, #E84C3C 100%);
color: #fff!important;
text-align: center;
line-height: 50px;
text-transform: uppercase;
font-weight: bold;
font-size: 12px;
border: none;
margin-top: 20px;
}
a.btn_red:hover {
border-color: transparent !important;
background-image: linear-gradient(-45deg, #ea314a 0%, #e84c3c 100%);
}
a.btn_red:active {
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
background-color: #e74c3c;
background-image: linear-gradient(-45deg, #ea314a 0%, #e84c3c 100%);
}
/**
* ELEMENTALS
*/
.none_padding_right { padding-right: 0 !important; }
.transparent { background-color: transparent !important; }
.vc_column-inner { padding: 0 !important; }
body .vc_custom_1500523474242 { background-color: #fff !important; }
[class^="icon-"], [class*=" icon-"] { font-family: 'dpricomoon'!important; }
[class^="ts-"], [class*=" ts-"] { font-family: 'Crescor'!important; }
.list_block_solution { list-style: none; }
.list_block_solution i { margin-right:20px; color: #E64C3B; }
.gform_footer { text-align: center; }
.gfield_label {
display: none!important;
}
body .gform_footer .gform_button {
width: 170px!important;
background-color: #E74C3C!important;
background: linear-gradient(135deg, #EA314A 0%, #E84C3C 100%);
color: #fff!important;
text-align: center;
line-height: 40px;
text-transform: uppercase;
font-weight: bold;
border-radius: 40px;
font-size: 12px!important;
margin-top: 20px!important;
}
textarea, input[type=text], input[type=password], input[type=email], input[type=www], input[type=tel], input[type=date], input[type=number], select {
background: #F6FAFB;
border: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
font-family: "proxima-nova", sans-serif !important;
color: #202226;
padding: 22px 18px !important;
margin-top: 30px;
}
input[type=text]:active,
input[type=text]:focus,
textarea:focus {
background-color: #fff!important;
border: 1px solid #e7e8eb;
height: 42px;
}
#send_message hr {
width: 50px;
color: #E7E8EB!important;
}
.gfield_description,
.validation_message { display: none; }
.gfield_error {
background-color: #fff!important;
border: none!important;
}
.gform_wrapper li.gfield_error input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]),
.gform_wrapper li.gfield_error textarea {
border: 1px solid #e74c3c !important;
background-color: #fff!important;
}
#mCSB_1 { background-color: #fff!important; }
#bruno-mobile-menu ul li a { color: #333!important; }
.icon-prev,
.icon-next { display: none !important; }
#bruno-mobile-menu { background-color: #fff!important; }
#bruno-mobile-menu #close-mobile-menu {
left: 20px;
top: 4px;
color: #333333!important;
}
div.parallax { background-attachment: unset; }
.validation_error {
border: none!important;
color: #e74c3c!important;
}
.list_block_solution li { margin-bottom: 20px; }
It seems like a problem with the margins in firefox. A different behavior I think...
Can you help me to diagnostic what hell is happing?
Thank you guys!
Jean it looks fine to me. Maybe it's an outdated version of Firefox?
On the site i am making, one-paged site, the first div should always has the height of 100%, however this isnt working, the div does not cover all the height size of the screen.
At the moment, the div (header) has the weight set to 650px and its fine on 1336x768 resolution, but not different resolutions. When i set height:100%; it doesnt happen, does not make div have all the height of the screen on different resolutions.
I think its a css error, but cant figure it out yet.
I hope you can understand.
body {
margin: 0;
font-family: 'Open Sans', Helvetica, sans-serif;
min-width: 900px;
}
.header {
background-image: url("img/fundo1.jpg");
background-color: rgb(21, 21, 21);
color: white;
height: auto;
min-height: 650px;
position: relative;
}
.header .logo {
width: 230px;
height: 60px;
margin: 20px 8px 8px 6%;
}
.header .menu {
position: absolute;
top: 55px; right: 25px;
}
.header .menu a {
margin: 0 4px;
font-size: 15px;
color: white;
text-decoration: none;
padding: 6px 20px;
}
.header .menu a:hover,
.header .menu a.current {
color: rgb(204, 66, 63);
}
.header .move {
color: white;
width: 40%;
margin: 0;
padding: 10px;
}
.header .move .center {
margin: 260px auto 0;
width: 360px;
}
.header .move h1 {
font-weight: 400;
font-size: 38px;
margin: 6px 0;
}
.header .move p {
font-weight: 300;
font-size: 20px;
border-top: 2px solid white;
margin: 6px 0;
padding-top: 6px;
}
.header .mail1 {
background-image: url("img/email.png");
background-size: contain;
background-position: 100% 100%;
background-repeat: no-repeat;
width: 560px; height: 560px;
position: absolute;
bottom: 0; right: 0;
}
.header .mail1 form {
position: absolute;
width: 240px;
bottom: 220px; right: 155px;
}
.header .mail1 h1 {
font-weight: 300;
text-align: center;
color: rgb(203, 41, 37);
}
.header .mail1 input {
box-sizing: border-box;
width: 100%;
font-family: 'Open Sans', Helvetica, sans-serif;
padding: 8px;
border: 1px solid rgb(219, 219, 218);
border-radius: 6px;
margin-bottom: 12px;
}
.header .mail1 input:hover {
border: 1px solid rgb(189, 189, 188);
}
.header .mail1 input:focus {
outline: 0;
}
.header .mail1 a {
display: block;
color: white;
text-decoration: none;
background-color: rgb(204, 66, 63);
border-radius: 6px;
text-align: center;
padding: 8px;
font-size: 14px;
}
.header .mail1 a:hover {
background-color: rgb(224, 86, 83);
}
.mail2 {
background-color: white;
background-image: url("img/barra.png");
background-position: 12% 0%;
height: 110px;
text-align: right;
}
.mail2.fixed {
position: fixed;
display:block;
top: 0; left: 0;
width: 100%;
min-width: 800px;
height: 110px;
z-index: 1;
}
.mail2 form {
display: inline-block;
margin: 36px 0;
padding: 0 10px;
width: 600px;
}
.mail2 h1 {
font-weight: 300;
color: rgb(203, 41, 37);
display: inline;
vertical-align: middle;
font-size: 28px;
}
.mail2 input {
box-sizing: border-box;
width: 220px;
font-family: 'Open Sans', Helvetica, sans-serif;
padding: 8px;
border: 1px solid rgb(219, 219, 218);
border-radius: 6px;
margin: 0 6px;
}
.mail2 input:hover {
border: 1px solid rgb(189, 189, 188);
}
.mail2 input:focus {
outline: 0;
}
.mail2 a {
display: inline;
color: white;
text-decoration: none;
background-color: rgb(204, 66, 63);
border-radius: 6px;
text-align: center;
padding: 8px 4%;
font-size: 14px;
}
.mail2 a:hover {
background-color: rgb(224, 86, 83);
}
.mail2 .top {
padding: 8px 6px;
background-color: rgb(51, 51, 51);
}
.mail2 .top:hover {
background-color: rgb(71, 71, 71);
}
.optimize {
background-image: url("img/fundo2.jpg");
background-size: cover;
background-color: rgb(21, 21, 21);
color: white;
padding-bottom: 48.1%;
}
.optimize.fixed {
margin-top: 110px;
}
.barra2 {
background-image: url('img/barra2.png');
background-size: cover;
padding-bottom: 21.6%;
}
.mobile {
background-image: url("img/fundo3.jpg");
background-size: cover;
background-color: rgb(171, 171, 171);
color: white;
padding-bottom: 44.4%;
position: relative;
}
.mobile .invisi {
position: absolute;
width: 13%;
height: 10%;
bottom: 14%;
border-radius: 8px;
}
.mobile .invisi:hover {
background: white;
opacity: 0.2;
}
.mobile .appstore {
right: 26.5%;
}
.mobile .googleplay {
right: 11.5%;
}
.contact {
background-image: url("img/fundo2es.jpg");
background-size: cover;
background-color: rgb(21, 21, 21);
background-repeat: no-repeat;
height:100%;
color:white;
}
.contact .textocon {
text-align: right;
padding: 55px 75px 0 0;
}
.contact .textocon div {
display: inline-block;
width: 290px
}
.contact .textocon h1 {
font-weight: 400;
font-size: 42px;
margin: 6px 0;
}
.contact .textocon p {
font-weight: 300;
font-size: 19px;
border-top: 2px solid white;
margin: 6px 0;
padding-top: 6px;
}
.contact .col1 {
display: inline-block;
vertical-align: top;
width: 410px;
padding: 10px 6px 10px 60px;
}
.contact .col1 h1 {
font-weight: 300;
font-size: 25px;
margin: 4px 0;
}
.contact .col1 input {
width: 380px;
height: 20px;
}
.contact .col1 input,
.contact .col2 textarea {
font-family: 'Open Sans', Helvetica, sans-serif;
padding: 14px;
font-size: 13px;
color: white;
background-color: transparent;
border: 1px solid rgb(172, 161, 160);
margin: 6px 0;
}
.contact .col1 input:focus,
.contact .col2 textarea:focus {
outline: 0;
border: 1px solid white;
}
.contact .col2 {
display: inline-block;
width: calc(100% - 560px);
padding: 52px 10px 10px 0;
text-align: right;
}
.contact .col2 textarea {
text-align: left;
width: 100%;
box-sizing: border-box;
height: 112px;
}
.contact .col2 a {
display: inline-block;
color: white;
font-weight: bold;
text-decoration: none;
background-color: rgb(204, 66, 63);
border-radius: 6px;
padding: 12px 60px;
font-size: 20px;
}
.contact .col2 a:hover {
background-color: rgb(224, 86, 83);
}
.contact .info {
padding: 10px 60px;
display: flex;
justify-content: space-between;
}
.contact .info h1 {
font-weight: 300;
font-size: 25px;
}
.contact .info p {
font-size: 12px;
line-height: 12px;
}
.contact .info a {
text-decoration: none;
color: white;
}
.contact .info a:hover {
color: #ddd;
}
.contact .info img {
width: 32px;
margin: 6px;
}
.contact .info img:hover {
opacity: 0.8;
}
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery-2.1.1.min.js"></script>
<script src="js/prefixfree.min.js"></script>
<script src="js/fixedbar.js"></script>
<meta charset="utf-8">
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" rel="stylesheet" type="text/css">
<link href="styles.css" rel="stylesheet" type="text/css">
<title> Layout </title>
</head>
<body>
<div class="header" id="top">
<img class="logo" src="img/logo.png">
<div class="menu">
Home
Product Tour
Pricing
Try
Vision
</div>
<div class="move">
<div class="center">
<h1>Move work forward!</h1>
<p>Optential keeps your team organized, connected, and focused on results.</p>
</div>
</div>
<div class="mail1">
<form>
<h1>Try Now!</h1>
<input type="text" placeholder="Your Email here...">
Get started for free
</form>
</div>
</div>
<div class="mail2">
<form>
<h1>Try Now!</h1>
<input type="text" placeholder="Your Email here...">
Get started for free
<a class="top" href="#top">Top</a>
</form>
</div>
<div class="optimize"></div>
<div class="barra2"></div>
<div class="mobile">
</div>
<div class="contact">
<div class="textocon">
<div>
<h1>Optential</h1>
<p>A new management system<br>for a new management paradigm!</p>
</div>
</div>
<form>
<div class="col1">
<h1>Contact us!</h1>
<input type="text" name="nome" size="50" placeholder="Name"/>
<input type="text" name="email" size="50" placeholder="Email"/>
<input type="text" name="subjet" size="50" placeholder="Subject"/>
</div>
<div class="col2">
<textarea name="message" rows="5" cols="70" placeholder="Message..."></textarea>
Send
</div>
</form>
<div class="info">
<div>
<h1>Mail Us !</h1>
<p>Rua Andrade Corvo, 242</p>
<p>sala 206</p>
<p>4700-204 Braga</p>
<p>Portugal</p>
</div>
<div>
<h1>Call Us !</h1>
<p>+351 987654323</p>
<p>+351 987654323</p>
<p>+351 987654323</p>
</div>
<div>
<h1>Email Us! </h1>
<p>code#angel.com</p>
<p>code_hr#angel.com</p>
<p>code_support#angel.com</p>
</div>
<div>
<h1>Join Us! </h1>
<img src="img/facebook.png">
<img src="img/gplus.png">
<img src="img/twitter.png">
<img src="img/instag.png">
</div>
</div>
</div>
</body>
</html>
Try to add the following css to your code:
html,
body { height: 100%; }
.header {
(...)
height: 100%;
}
See a demo here: CodePen
it wont be set to 100%, 100% of height will only work for the amount of content it has, you will have to set the height by javascript..if your content takes a height of 300px then 100% will taken as 100% of 300px,and no the browser height
got a solution using css
html
{
height:100%;
}
.header:
{
height:100%;
}
this will do your job.
Add height:100% to html,body and .header.
Remove min-height:650 from .header.
html {
height:100%; /*added*/
}
body {
margin: 0;
font-family: 'Open Sans', Helvetica, sans-serif;
min-width: 900px;
height:100%; /*added*/
}
.header {
background-image: url("img/fundo1.jpg");
background-color: rgb(21, 21, 21);
color: white;
height:100%;
position: relative;
}
.header .logo {
width: 230px;
height: 60px;
margin: 20px 8px 8px 6%;
}
.header .menu {
position: absolute;
top: 55px; right: 25px;
}
.header .menu a {
margin: 0 4px;
font-size: 15px;
color: white;
text-decoration: none;
padding: 6px 20px;
}
.header .menu a:hover,
.header .menu a.current {
color: rgb(204, 66, 63);
}
.header .move {
color: white;
width: 40%;
margin: 0;
padding: 10px;
}
.header .move .center {
margin: 260px auto 0;
width: 360px;
}
.header .move h1 {
font-weight: 400;
font-size: 38px;
margin: 6px 0;
}
.header .move p {
font-weight: 300;
font-size: 20px;
border-top: 2px solid white;
margin: 6px 0;
padding-top: 6px;
}
.header .mail1 {
background-image: url("img/email.png");
background-size: contain;
background-position: 100% 100%;
background-repeat: no-repeat;
width: 560px; height: 560px;
position: absolute;
bottom: 0; right: 0;
}
.header .mail1 form {
position: absolute;
width: 240px;
bottom: 220px; right: 155px;
}
.header .mail1 h1 {
font-weight: 300;
text-align: center;
color: rgb(203, 41, 37);
}
.header .mail1 input {
box-sizing: border-box;
width: 100%;
font-family: 'Open Sans', Helvetica, sans-serif;
padding: 8px;
border: 1px solid rgb(219, 219, 218);
border-radius: 6px;
margin-bottom: 12px;
}
.header .mail1 input:hover {
border: 1px solid rgb(189, 189, 188);
}
.header .mail1 input:focus {
outline: 0;
}
.header .mail1 a {
display: block;
color: white;
text-decoration: none;
background-color: rgb(204, 66, 63);
border-radius: 6px;
text-align: center;
padding: 8px;
font-size: 14px;
}
.header .mail1 a:hover {
background-color: rgb(224, 86, 83);
}
.mail2 {
background-color: white;
background-image: url("img/barra.png");
background-position: 12% 0%;
height: 110px;
text-align: right;
}
.mail2.fixed {
position: fixed;
display:block;
top: 0; left: 0;
width: 100%;
min-width: 800px;
height: 110px;
z-index: 1;
}
.mail2 form {
display: inline-block;
margin: 36px 0;
padding: 0 10px;
width: 600px;
}
.mail2 h1 {
font-weight: 300;
color: rgb(203, 41, 37);
display: inline;
vertical-align: middle;
font-size: 28px;
}
.mail2 input {
box-sizing: border-box;
width: 220px;
font-family: 'Open Sans', Helvetica, sans-serif;
padding: 8px;
border: 1px solid rgb(219, 219, 218);
border-radius: 6px;
margin: 0 6px;
}
.mail2 input:hover {
border: 1px solid rgb(189, 189, 188);
}
.mail2 input:focus {
outline: 0;
}
.mail2 a {
display: inline;
color: white;
text-decoration: none;
background-color: rgb(204, 66, 63);
border-radius: 6px;
text-align: center;
padding: 8px 4%;
font-size: 14px;
}
.mail2 a:hover {
background-color: rgb(224, 86, 83);
}
.mail2 .top {
padding: 8px 6px;
background-color: rgb(51, 51, 51);
}
.mail2 .top:hover {
background-color: rgb(71, 71, 71);
}
.optimize {
background-image: url("img/fundo2.jpg");
background-size: cover;
background-color: rgb(21, 21, 21);
color: white;
padding-bottom: 48.1%;
}
.optimize.fixed {
margin-top: 110px;
}
.barra2 {
background-image: url('img/barra2.png');
background-size: cover;
padding-bottom: 21.6%;
}
.mobile {
background-image: url("img/fundo3.jpg");
background-size: cover;
background-color: rgb(171, 171, 171);
color: white;
padding-bottom: 44.4%;
position: relative;
}
.mobile .invisi {
position: absolute;
width: 13%;
height: 10%;
bottom: 14%;
border-radius: 8px;
}
.mobile .invisi:hover {
background: white;
opacity: 0.2;
}
.mobile .appstore {
right: 26.5%;
}
.mobile .googleplay {
right: 11.5%;
}
.contact {
background-image: url("img/fundo2es.jpg");
background-size: cover;
background-color: rgb(21, 21, 21);
background-repeat: no-repeat;
height:100%;
color:white;
}
.contact .textocon {
text-align: right;
padding: 55px 75px 0 0;
}
.contact .textocon div {
display: inline-block;
width: 290px
}
.contact .textocon h1 {
font-weight: 400;
font-size: 42px;
margin: 6px 0;
}
.contact .textocon p {
font-weight: 300;
font-size: 19px;
border-top: 2px solid white;
margin: 6px 0;
padding-top: 6px;
}
.contact .col1 {
display: inline-block;
vertical-align: top;
width: 410px;
padding: 10px 6px 10px 60px;
}
.contact .col1 h1 {
font-weight: 300;
font-size: 25px;
margin: 4px 0;
}
.contact .col1 input {
width: 380px;
height: 20px;
}
.contact .col1 input,
.contact .col2 textarea {
font-family: 'Open Sans', Helvetica, sans-serif;
padding: 14px;
font-size: 13px;
color: white;
background-color: transparent;
border: 1px solid rgb(172, 161, 160);
margin: 6px 0;
}
.contact .col1 input:focus,
.contact .col2 textarea:focus {
outline: 0;
border: 1px solid white;
}
.contact .col2 {
display: inline-block;
width: calc(100% - 560px);
padding: 52px 10px 10px 0;
text-align: right;
}
.contact .col2 textarea {
text-align: left;
width: 100%;
box-sizing: border-box;
height: 112px;
}
.contact .col2 a {
display: inline-block;
color: white;
font-weight: bold;
text-decoration: none;
background-color: rgb(204, 66, 63);
border-radius: 6px;
padding: 12px 60px;
font-size: 20px;
}
.contact .col2 a:hover {
background-color: rgb(224, 86, 83);
}
.contact .info {
padding: 10px 60px;
display: flex;
justify-content: space-between;
}
.contact .info h1 {
font-weight: 300;
font-size: 25px;
}
.contact .info p {
font-size: 12px;
line-height: 12px;
}
.contact .info a {
text-decoration: none;
color: white;
}
.contact .info a:hover {
color: #ddd;
}
.contact .info img {
width: 32px;
margin: 6px;
}
.contact .info img:hover {
opacity: 0.8;
}
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery-2.1.1.min.js"></script>
<script src="js/prefixfree.min.js"></script>
<script src="js/fixedbar.js"></script>
<meta charset="utf-8">
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" rel="stylesheet" type="text/css">
<link href="styles.css" rel="stylesheet" type="text/css">
<title> Layout </title>
</head>
<body>
<div class="header" id="top">
<img class="logo" src="img/logo.png">
<div class="menu">
Home
Product Tour
Pricing
Try
Vision
</div>
<div class="move">
<div class="center">
<h1>Move work forward!</h1>
<p>Optential keeps your team organized, connected, and focused on results.</p>
</div>
</div>
<div class="mail1">
<form>
<h1>Try Now!</h1>
<input type="text" placeholder="Your Email here...">
Get started for free
</form>
</div>
</div>
<div class="mail2">
<form>
<h1>Try Now!</h1>
<input type="text" placeholder="Your Email here...">
Get started for free
<a class="top" href="#top">Top</a>
</form>
</div>
<div class="optimize"></div>
<div class="barra2"></div>
<div class="mobile">
</div>
<div class="contact">
<div class="textocon">
<div>
<h1>Optential</h1>
<p>A new management system<br>for a new management paradigm!</p>
</div>
</div>
<form>
<div class="col1">
<h1>Contact us!</h1>
<input type="text" name="nome" size="50" placeholder="Name"/>
<input type="text" name="email" size="50" placeholder="Email"/>
<input type="text" name="subjet" size="50" placeholder="Subject"/>
</div>
<div class="col2">
<textarea name="message" rows="5" cols="70" placeholder="Message..."></textarea>
Send
</div>
</form>
<div class="info">
<div>
<h1>Mail Us !</h1>
<p>Rua Andrade Corvo, 242</p>
<p>sala 206</p>
<p>4700-204 Braga</p>
<p>Portugal</p>
</div>
<div>
<h1>Call Us !</h1>
<p>+351 987654323</p>
<p>+351 987654323</p>
<p>+351 987654323</p>
</div>
<div>
<h1>Email Us! </h1>
<p>code#angel.com</p>
<p>code_hr#angel.com</p>
<p>code_support#angel.com</p>
</div>
<div>
<h1>Join Us! </h1>
<img src="img/facebook.png">
<img src="img/gplus.png">
<img src="img/twitter.png">
<img src="img/instag.png">
</div>
</div>
</div>
</body>
</html>