How to position element in box? - html

So I have managed to create these sections on my web page, each with an image and some text in them. However with these boxes, the text element (eg. text-lifestyle), is not positioning correctly where I want it to go? Is there a way of fixing this please... I am trying to get each text part either to the left or right of the image, positioned in the centre of that side of the box.
body, html{
height: 100%;
margin: 0;
padding: 0;
font-family: 'Work Sans', sans-serif;
font-weight: 400;
}
.container {
width: 100%;
margin: 0 1.5%;
}
header{
background:rgb(241, 200, 203);
position: relative;
overflow: hidden;
}
header::after{
content: "";
display: table;
clear:both;
}
.logo{
width: 9%;
height: 5.4%;
float: left;
padding: 0px;
}
nav{
float: inline-end;
overflow: auto;
}
nav ul{
margin: 0;
padding: 0;
list-style: none;
display: inline;
}
nav li{
display: inline-block;
margin-left: 6.3%;
padding-top: 1.8%;
font-size: 112.5%;
position: relative;
}
nav .search{
float: right;
margin-bottom: 1%;
margin-right: 7%;
position: relative;
margin-top: 1.7%;
}
nav input[type=text]{
background-color: transparent;
color: rgb(95, 62, 64);
font-size: 112.5%;
border: none;
border-bottom: solid 2px black;
}
nav .search input[type="text"]:focus {
width: 200px;
outline : none;
}
nav input::placeholder{
color: rgb(95, 62, 64);
font-family: 'Work Sans', sans-serif;
}
nav a{
color: rgb(95, 62, 64);
text-decoration: none;
text-transform: uppercase;
}
nav a:hover{
color: rgb(95, 62, 64);
}
nav a::before{
content: "";
display: block;
height: 10%;
background-color: rgb(95, 62, 64);
position: absolute;
top: 0;
width: 0%;
transition: all ease-in-out 250ms;
}
nav a:hover::before{
width: 100%;
}
.main-bg{
background-image: url("bg-two.jpg");
height: auto;
padding-top: 8em;
background-attachment: fixed;
background-position: center;
background-size: cover;
position: relative;
-webkit-animation: fadein 2s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 2s; /* Firefox < 16 */
-ms-animation: fadein 2s; /* Internet Explorer */
animation: fadein 2s;
}
#keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Firefox */
#-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Safari, Chrome and Opera*/
#-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Internet Explorer */
#-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
.footer *{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container-two{
max-width: 1170px;
margin: auto;
}
.row{
display: flex;
flex-wrap: wrap;
}
.footer ul{
list-style: none;
}
.footer{
background-color: rgb(241, 200, 203);
width: auto;
margin: auto;
padding-top: 3%;
line-height: 1.5;
}
.footer .container-bottom{
padding-left: 12%;
}
.footer-col{
width: 25%;
padding: 0 15px;
}
.footer-col h5{
font-size: 112.5%;
color: rgb(126, 81, 83);
text-transform: capitalize;
margin-bottom: 30px;
position: relative;
}
.footer-col h5::before{
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: rgb(82, 44, 46);
height: 2px;
box-sizing: border-box;
width: 50px;
}
.footer-col ul li:not(:last-child){
margin-bottom: 10px;
}
.footer-col ul li a{
font-size: 16px;
text-transform: capitalize;
color: rgb(126, 81, 83);
text-decoration: none;
font-weight: 600;
display: block;
}
.fab{
color:rgb(126, 81, 83);
margin-right: 10px;
}
.copyright{
margin-top: 5%;
text-align: center;
background-color: rgb(126, 81, 83);
color:rgb(240, 178, 182);
padding: 1%;
padding-left: 0%;
margin-bottom: 0%;
}
article h2{
color: rgb(240, 178, 182);
font-size: 280%;
text-align: center;
margin-top: 0%;
border-bottom: 1px solid rgb(240, 178, 182);
padding-bottom: 3px;
}
article p{
color:rgb(240, 178, 182);
font-size: 110%;
text-align: center;
}
.lifestyle{
height: 100%;
border:rgb(82, 44, 46);
border-radius: 10px;
background-color: rgb(82, 44, 46);
margin-left: 15%;
margin-right: 15%;
position: relative;
}
.lifestyle img{
margin: 5%;
width: 35%;
height: 50%;
position: relative;
}
.text-lifestyle{
position: relative;
align-items: center;
margin-left: 50%;
}
.entertainment{
height: 100%;
background-color: rgb(240, 178, 182);
margin: 15%;
}
.entertainment img{
margin: 5%;
position: relative;
width: 29%;
height: 50%;
margin-left: 65%;
}
.text-entertainment{
position: absolute;
margin: 15%;
top: 30%;
left: 7.5%;
box-sizing: border-box;
width: 30%;
}
.food{
height: 100%;
background-color:rgb(82, 44, 46);
margin: 15%;
}
.food img{
margin: 5%;
position: relative;
width: 29%;
height: 50%;
}
.text-food{
position: absolute;
top: 66.5%;
right: 22.5%;
box-sizing: border-box;
width: 30%;
}
.shopping{
height: 100%;
background-color: rgb(240, 178, 182);
margin: 15%;
}
.shopping img{
margin: 5%;
position: relative;
width: 29%;
height: 50%;
margin-left: 65%;
}
#media screen and (max-width: 768px) {
body{
font-size: 80%;
}
h1{
font-size: 312%;
}
a{
font-size: 80%;
}
}
Here is the HTML Code. As you can see I have placed the text and image elements into boxes e.g. lifestyle, entertainment, food, shopping.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<title>New York - The City That Never Sleeps</title>
<link rel="stylesheet" href="about.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Work+Sans:wght#400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/aos#next/dist/aos.css" />
<script src="https://kit.fontawesome.com/f107c76e74.js" crossorigin="anonymous"></script>
</head>
<body>
<header>
<div class="container">
<img src="nyc-logo.png" alt="logo" class="logo">
<nav>
<ul>
<li>Home</li>
<li>About</li>
<li>Gallery</li>
<li>Contacts</li>
</ul>
<div class="search">
<input type="text" placeholder="Search">
<i class="fas fa-search" aria-hidden="true"></i>
</div>
</nav>
</div>
</header>
<div class = "main-bg">
<article>
<div class = "lifestyle">
<img src='abt-one.jpg' alt />
<div class="text-lifestyle">
<h2>LIFESTYLE</h2>
<p>New York hosts its guests with some of the best 5-star hotels and restaurants, leisure activities and more.<br/>
Relax your mind and enjoy the breathtaking views of what New York has to offer...</p>
</div>
</div>
<div class = "entertainment">
<img src='abt-two.jpg' alt />
<div class="text-entertainment">
<h2 style='color: rgb(82, 44, 46); border-bottom: 1px solid rgb(82, 44, 46);'>ENTERTAINMENT</h2>
<p style= 'color: rgb(82, 44, 46);'>Music and entertainment is a big thing in this great city. Everywhere you go, entertainment will be right at your feet. Enjoy first class musicals at BroadWay Theatre or watch busking take place free of charge!</p>
</div>
</div>
<div class = "food">
<img src='abt-three.jpg' alt />
<div class="text-food">
<h2>FOOD</h2>
<p>Enjoy some of the best cuisines across the city.<br/>
From classic burgers to jaw-dropping desserts, there's nothing to miss out on.</p>
</div>
</div>
<div class = "shopping">
<img src='abt-four.jpg' alt />
<div class="text-shopping">
<h2 style='color: rgb(82, 44, 46); border-bottom: 1px solid rgb(82, 44, 46);'>SHOPPING</h2>
<p style= 'color: rgb(82, 44, 46);'>Feeling like treating yourself with some fancy shoes? New York streets are lined with fabulous, glamourous shops, all endorsed with the latest trends from across the world.</p>
</div>
</div>
</article>
<footer class="footer">
<div class="container-bottom">
<div class="row">
<div class="footer-col">
<h5>New York</h5>
<p style="color: rgb(126, 81, 83); font-weight: 600;">The largest and most influential American metropolis</p>
</div>
<div class="footer-col">
<h5>Links</h5>
<ul>
<li>Home</li>
<li>About</li>
<li>Gallery</li>
<li>Contact</li>
</ul>
</div><div class="footer-col">
<h5>Extras</h5>
<ul>
<li>Official NYC</li>
<li>New York Magazine</li>
<li>Eater New York</li>
<li>Curbed NY</li>
</ul>
</div><div class="footer-col">
<h5>Socials</h5>
<div>
<i class="fab fa-facebook-f"></i>
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
</div>
</div>
</div>
</div>
<div class="copyright">
<small>© New York 2021 | Designed by Priya Patel</small>
</div>
</footer>
</div>
</body>
</html>

is this what you are looking for? What I did is that I removed some of your top and right css selectors due to the fact that it often messes CSS up. I also added padding so the object would be better aligned. Here is my code, really hope this works for you!
body,
html {
height: 100%;
margin: 0;
padding: 0;
font-family: 'Work Sans', sans-serif;
font-weight: 400;
}
.container {
width: 100%;
margin: 0 1.5%;
}
header {
background: rgb(241, 200, 203);
position: relative;
overflow: hidden;
}
header::after {
content: "";
display: grid;
clear: both;
}
.logo {
width: 9%;
height: 5.4%;
float: left;
padding: 0px;
}
nav {
float: inline-end;
overflow: auto;
}
nav ul {
margin: 0;
padding: 0;
list-style: none;
display: inline;
}
nav li {
display: inline-block;
margin-left: 6.3%;
padding-top: 1.8%;
font-size: 112.5%;
position: relative;
}
nav .search {
float: right;
margin-bottom: 1%;
margin-right: 7%;
position: relative;
margin-top: 1.7%;
}
nav input[type=text] {
background-color: transparent;
color: rgb(95, 62, 64);
font-size: 112.5%;
border: none;
border-bottom: solid 2px black;
}
nav .search input[type="text"]:focus {
width: 200px;
outline: none;
}
nav input::placeholder {
color: rgb(95, 62, 64);
font-family: 'Work Sans', sans-serif;
}
nav a {
color: rgb(95, 62, 64);
text-decoration: none;
text-transform: uppercase;
}
nav a:hover {
color: rgb(95, 62, 64);
}
nav a::before {
content: "";
display: block;
height: 10%;
background-color: rgb(95, 62, 64);
position: absolute;
top: 0;
width: 0%;
transition: all ease-in-out 250ms;
}
nav a:hover::before {
width: 100%;
}
.main-bg {
background-image: url("bg-two.jpg");
height: auto;
padding-top: 8em;
background-attachment: fixed;
background-position: center;
background-size: cover;
position: relative;
-webkit-animation: fadein 2s;
/* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 2s;
/* Firefox < 16 */
-ms-animation: fadein 2s;
/* Internet Explorer */
animation: fadein 2s;
}
#keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Firefox */
#-moz-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Safari, Chrome and Opera*/
#-webkit-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Internet Explorer */
#-ms-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.footer * {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container-two {
max-width: 1170px;
margin: auto;
}
.row {
display: flex;
flex-wrap: wrap;
}
.footer ul {
list-style: none;
}
.footer {
background-color: rgb(241, 200, 203);
width: auto;
margin: auto;
padding-top: 3%;
line-height: 1.5;
}
.footer .container-bottom {
padding-left: 12%;
}
.footer-col {
width: 25%;
padding: 0 15px;
}
.footer-col h5 {
font-size: 112.5%;
color: rgb(126, 81, 83);
text-transform: capitalize;
margin-bottom: 30px;
position: relative;
}
.footer-col h5::before {
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: rgb(82, 44, 46);
height: 2px;
box-sizing: border-box;
width: 50px;
}
.footer-col ul li:not(:last-child) {
margin-bottom: 10px;
}
.footer-col ul li a {
font-size: 16px;
text-transform: capitalize;
color: rgb(126, 81, 83);
text-decoration: none;
font-weight: 600;
display: block;
}
.fab {
color: rgb(126, 81, 83);
margin-right: 10px;
}
.copyright {
margin-top: 5%;
text-align: center;
background-color: rgb(126, 81, 83);
color: rgb(240, 178, 182);
padding: 1%;
padding-left: 0%;
margin-bottom: 0%;
}
article h2 {
color: rgb(240, 178, 182);
font-size: 280%;
text-align: center;
margin-top: 0%;
border-bottom: 1px solid rgb(240, 178, 182);
padding-bottom: 3px;
}
article p {
color: rgb(240, 178, 182);
font-size: 110%;
text-align: center;
}
.lifestyle {
height: 100%;
border: rgb(82, 44, 46);
border-radius: 10px;
background-color: rgb(82, 44, 46);
margin-left: 15%;
margin-right: 15%;
padding: 30px;
position: relative;
}
.lifestyle img {
margin: 5%;
width: 35%;
height: 50%;
position: relative;
}
.text-lifestyle {
position: relative;
align-items: center;
margin-left: 50%;
}
.entertainment {
margin-top: 15em;
height: 100%;
border: rgb(240, 178, 182);
border-radius: 10px;
background-color: rgb(240, 178, 182);
margin-left: 15%;
margin-right: 15%;
padding: 30px;
position: relative;
}
.entertainment img {
position: relative;
width: 29%;
height: 50%;
float: right;
}
.text-entertainment {
box-sizing: border-box;
width: 50%;
}
.food {
margin-top: 15em;
min-height: 278px;
border: rgb(82, 44, 46);
border-radius: 10px;
background-color: rgb(82, 44, 46);
margin-left: 15%;
margin-right: 15%;
padding: 30px;
position: relative;
}
.food img {
position: relative;
width: 29%;
height: 50%;
}
.text-food {
box-sizing: border-box;
width: 30%;
float: right;
}
.shopping {
height: 100%;
background-color: rgb(240, 178, 182);
margin: 15%;
padding: 30px;
border-radius: 10px;
}
.shopping img {
margin: 5%;
position: relative;
width: 29%;
height: 50%;
margin-left: 65%;
}
#media screen and (max-width: 768px) {
body {
font-size: 80%;
}
h1 {
font-size: 312%;
}
a {
font-size: 80%;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>New York - The City That Never Sleeps</title>
<link rel="stylesheet" href="about.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Work+Sans:wght#400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/aos#next/dist/aos.css" />
<script src="https://kit.fontawesome.com/f107c76e74.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="main.css">
</head>
<body>
<header>
<div class="container">
<img src="nyc-logo.png" alt="logo" class="logo">
<nav>
<ul>
<li>Home</li>
<li>About</li>
<li>Gallery</li>
<li>Contacts</li>
</ul>
<div class="search">
<input type="text" placeholder="Search">
<i class="fas fa-search" aria-hidden="true"></i>
</div>
</nav>
</div>
</header>
<div class="main-bg">
<article>
<div class="lifestyle">
<img src='abt-one.jpg' alt />
<div class="text-lifestyle">
<h2>LIFESTYLE</h2>
<p>New York hosts its guests with some of the best 5-star hotels and restaurants, leisure activities and more.<br/> Relax your mind and enjoy the breathtaking views of what New York has to offer...</p>
</div>
</div>
<div class="entertainment">
<img src='abt-two.jpg' alt />
<div class="text-entertainment">
<h2 style='color: rgb(82, 44, 46); border-bottom: 1px solid rgb(82, 44, 46);'>ENTERTAINMENT</h2>
<p style='color: rgb(82, 44, 46);'>Music and entertainment is a big thing in this great city. Everywhere you go, entertainment will be right at your feet. Enjoy first class musicals at BroadWay Theatre or watch busking take place free of charge!</p>
</div>
</div>
<div class="food">
<img src='abt-three.jpg' alt />
<div class="text-food">
<h2>FOOD</h2>
<p>Enjoy some of the best cuisines across the city.<br/> From classic burgers to jaw-dropping desserts, there's nothing to miss out on.</p>
</div>
</div>
<div class="shopping">
<img src='abt-four.jpg' alt />
<div class="text-shopping">
<h2 style='color: rgb(82, 44, 46); border-bottom: 1px solid rgb(82, 44, 46);'>SHOPPING</h2>
<p class="text-shopping" style='color: rgb(82, 44, 46);'>Feeling like treating yourself with some fancy shoes? New York streets are lined with fabulous, glamourous shops, all endorsed with the latest trends from across the world.</p>
</div>
</div>
</article>
<footer class="footer">
<div class="container-bottom">
<div class="row">
<div class="footer-col">
<h5>New York</h5>
<p style="color: rgb(126, 81, 83); font-weight: 600;">The largest and most influential American metropolis</p>
</div>
<div class="footer-col">
<h5>Links</h5>
<ul>
<li>Home</li>
<li>About</li>
<li>Gallery</li>
<li>Contact</li>
</ul>
</div>
<div class="footer-col">
<h5>Extras</h5>
<ul>
<li>Official NYC</li>
<li>New York Magazine</li>
<li>Eater New York</li>
<li>Curbed NY</li>
</ul>
</div>
<div class="footer-col">
<h5>Socials</h5>
<div>
<i class="fab fa-facebook-f"></i>
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
</div>
</div>
</div>
</div>
<div class="copyright">
<small>© New York 2021 | Designed by Priya Patel</small>
</div>
</footer>
</div>
</body>
</html>

I see you're using display: table. I would advise against using this because it is basically impossible to make your website responsive in a good manner. Rather than using display: table try using display: grid. More on css-grid here: https://css-tricks.com/snippets/css/complete-guide-grid/
Concering positioning elements on your webpage, a combination of css-grid and flexbox is the best and easiest way to achieve this, more on flexbox here: https://css-tricks.com/snippets/css/a-guide-to-flexbox/

Related

Content is scattered (Google searches did not help at all)

body {
font-family: Bahnschrift SemiBold, sans-serif;
background-color: #fcfefe;
width: 100%;
height: 100%;
overflow-x: hidden;
}
*{
margin:0; padding: 0;
}
.logonav{
position: top;
left: 0px;
width: 250px;
height: 65px;
padding-top: 70px;
padding-bottom: 20px;
padding-left: 40px;
}
.content{
position: absolute;
bottom: 330px;
left: 30px;
text-align: justify;
font-size: 20px;
font-family: 'Titillium Web', sans-serif;
color: #ffffff;
}
.bn632-hover {
position: absolute;
bottom: 200px;
left: 1200px;
width: 160px;
font-size: 16px;
font-weight: 600;
color: #00bbf0;
cursor: pointer;
margin: 20px;
height: 55px;
text-align:center;
color: whitesmoke;
border: none;
background-size: 300% 100%;
border-radius: 50px;
moz-transition: all .4s ease-in-out;
-o-transition: all .4s ease-in-out;
-webkit-transition: all .4s ease-in-out;
transition: all .4s ease-in-out;
}
.bn632-hover:hover {
background-position: 100% 0;
moz-transition: all .4s ease-in-out;
-o-transition: all .4s ease-in-out;
-webkit-transition: all .4s ease-in-out;
transition: all .4s ease-in-out;
}
.bn632-hover:focus {
outline: none;
}
.bn632-hover.bn18 {
background-image: linear-gradient(
to right,
#25aae1,
#00bbf0,
#00bbf0,
#00bbf0
);
box-shadow: 0 4px 15px 0 rgba(49, 196, 190, 0.75);
}
.image_container.img{
max-height: 100vh;
max-width: 100%;
object-fit: cover;
object-position: bottom;
}
.pozadina{
background-color: #83a3c7;
background-image: url("womandoctor.jpg");
background-size: cover;
width: 110%;
background-blend-mode: normal;
position: relative;
padding-top: 450px;
padding-bottom: 100px;
}
.hornav1{
overflow: hidden;
width: 100%;
background-color: #00bbf0;
list-style-type: none;
margin: 0px;
padding: 0px;
border-bottom: solid 2px #eaf6f6;
size: 100px;
position:fixed;
top:0;
z-index:100;
}
.hornav1 a{
float: right;
color: whitesmoke;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
box-sizing: border-box;
margin-left: 5px 10 px;
}
.hornav1 i{
color: whitesmoke;
}
#pocetna{
padding-right: 1000px;
font-size: 20px;
}
.hornav2{
overflow: hidden;
width: 100%;
background-color: #ffffff;
list-style-type: none;
margin: 0px;
padding: 0px;
position: sticky;
top: 0px;
border-bottom: solid 2px #eaf6f6;
}
.hornav2 a{
float: right;
color: #333;
text-align: center;
padding: 14px 16px;
font-size: 17px;
box-sizing: border-box;
margin-left: 5px 10 px;
}
.hornav3{
overflow: hidden;
width: 100%;
background-color: #00bbf0;
list-style-type: none;
margin: 0px;
padding: 10px;
position:sticky;
border-bottom: solid 2px #eaf6f6;
size: 150px;
}
.hornav3 a{
position: relative;
color: whitesmoke;
text-align: center;
padding-left: 50px;
text-decoration: none;
font-size: 24px;
box-sizing: border-box;
right : -270px;
}
.navcontainer{
top:0;
width:100%;
z-index:100;
}
.hornav3 a::before{
content: '';
position: absolute;
bottom: 0;
right: 0;
width: 0;
height: 2px;
background-color: whitesmoke;
transition: width 0.6s cubic-bezier(0.5, 1, 0.5, 1);
}
#media (hover: hover) and (pointer: fine) {
.hornav3 a:hover::before{
left: 0.5;
right: auto;
width: 70%;
}
}
.pregledi{
background-color: #fafafa;
}
.pregledi .heading{
padding-top: 40px;
text-transform: uppercase;
color: deepskyblue;
text-align: center;
font-size: 35px;
}
.pregledi .heading2{
padding-top: 5px;
text-align: center;
font-size: 20px;
font-family: unset;
color: #2c5d63;
}
.pregledi .box-container{
padding-top: 30px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(20rem, 7fr));
gap:4rem;
margin-left: 60px;
margin-right: 30px;
}
.pregledi .box-container .box h3{
padding-top: 10px;
color: deepskyblue;
text-transform: uppercase;
font-size: 2.1rem;
}
.pregledi .box-container .box p{
padding-top: 10px;
font-family: sans-serif;
font-size: 1rem;
line-height: 1;
}
.pregledi .box-container .box a{
position: relative;
top: 10px;
}
.bn111 {
margin-top: 10px;
padding: 1.3em 0.01em;
font-size: 12px;
text-transform: uppercase;
text-indent: 10px;
letter-spacing: 2.5px;
font-weight: 500;
color: #ffffff;
background-color: #00bbf0;
border: none;
border-radius: 45px;
box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
transition: all 0.24s ease 0s;
cursor: pointer;
outline: none;
}
.bn111:hover {
background-color: #00bbf0;
box-shadow: 0px 15px 20px rgba(34, 180, 255, 0.4);
color: #ffffff;
transform: translateX(7px) translateY(-1.1px);
}
.bn111:active {
transform: translateY(-1px);
}
.bn111 i{
color: #ffffff;
font-size: 1.3em;
padding-right: 4px;
}
.izborna{
background-color: #83a3c7;
background-size: cover;
width: 100%;
background-blend-mode: normal;
opacity: 1;
display: block;
height: auto;
transition: .5s ease;
backface-visibility: hidden;
}
.containerslike{
position: relative;
width: 100%;
max-width: 400px;
}
.overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
opacity: 0;
transition: .3s ease;
background-color: #ececec;
}
.containerslike:hover .overlay {
opacity: 0.5;
}
.ikona {
color: deepskyblue;
font-size: 40px;
position: absolute;
top: 100%;
left: 45%;;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
text-align: center;
opacity: 1;
}
.fa-magnifying-glass{
position: absolute;
top: 100px;
}
.bn112 {
margin-top: 10px;
padding: 1.3em 0.01em;
font-size: 18px;
text-transform: uppercase;
text-indent: 10px;
letter-spacing: 2.5px;
font-weight: 500;
color: #ffffff;
background-color: #00bbf0;
border: none;
border-radius: 45px;
box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
transition: all 0.24s ease 0s;
cursor: pointer;
outline: none;
width: 400px;
}
.bn112:hover {
background-color: #00bbf0;
box-shadow: 0px 15px 20px rgba(34, 180, 255, 0.4);
color: #ffffff;
transform: translateY(-1.1px);
}
.bn112:active {
transform: translateY(-1px);
}
.bn112 i{
color: #ffffff;
font-size: 1.3em;
padding-right: 4px;
}
.podnopregled{
margin-left: 500px;
}
.infodiv{
margin-top: 30px;
background-color: deepskyblue;
}
.row {
display: flex;
width: 100%;
}
.noMargin {
margin: 1px;
}
.one {
background-color: #79c2d0;
border: solid #ececec;
height: 300px;
width: 100%;
border-radius: 15px;
margin-top: 30px;
}
.two {
background-color: #79c2d0;
border: solid #ececec;
height: 300px;
width: 100%;
border-radius: 15px;
margin-top: 30px;
}
.three {
background-color: #79c2d0;
border: solid #ececec;
height: 300px;
width: 100%;
border-radius: 15px;
margin-top: 10px;
}
.four {
background-color: #79c2d0;
border: solid #ececec;
height: 300px;
width: 100%;
border-radius: 15px;
margin-top: 10px;
}
.noMargin p{
text-align: center;
margin-top: 100px;
}
#media only screen and (max-width:800px) {
/* For tablets: */
.main {
width: 80%;
padding: 0;
}
.right {
width: 100%;
}
}
#media only screen and (max-width:500px) {
/* For mobile phones: */
.menu, .main, .right {
width: 100%;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>VivaMed medicina rada i sporta</title>
<script src="https://kit.fontawesome.com/60681a69ff.js" crossorigin="anonymous"></script>
<link rel="stylesheet" type="text/css" href="VivamedCSS.css">
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:wght#300&display=swap" rel="stylesheet">
</head>
<body>
<div class="navcontainer">
<div class="hornav1">
<i class="fas fa-envelope" style="font-size:20px;"></i> info#vivamed.hr
<i class="fa-solid fa-phone"style="font-size:20px;" ></i> +385 1 233 55 00
Početna
</div>
<div class="hornav2">
<img src="vivalogo.webp" alt="logo" class="logonav">
<a class="active" style="font-size: 20px; padding-right: 550px; padding-top: 100px; font-family: 'Titillium Web', sans-serif; font-style: italic; font-weight: bolder;"> Zdrav radnik je uspješan i produktivan radnik.</a>
</div>
<div class="hornav3">
<a class="active" href="https://www.vivamed.hr/kontakt"><i class="fas fa-envelope" style="font-size:20px;"></i> Kontakt</a>
<a class="active" href="https://www.vivamed.hr/kontakt"><i class="fas fa-cloud" style="font-size:20px; color: whitesmoke;"></i> Kontakt</a>
<a class="active" href="https://www.vivamed.hr/kontakt"><i class="fas fa-comment" style="font-size:20px;"></i> Kontakt</a>
<a class="active" href="https://www.vivamed.hr/kontakt"><i class="fas fa-car" style="font-size:20px;"></i> Kontakt</a>
<a class="active" href="https://www.vivamed.hr/galerija"><i class="fas fa-bolt" style="font-size:20px;"></i> O nama</a>
<a class="active" href="file:///C:/Users/Admin/Desktop/Vivamed/VIVAMED%20JEDAN.html#slide-2"><i class="fas fa-envelope"></i> Početna</a>
</div>
</div>
<div class="pozadina">
<div class="content">
<h3>Dobro došli na stranicu Medicine rada i sporta VivaMed!</h3>
<p>Pogledajte sve profesionalne usluge koje nudi
<br>naš tim vrhunskih i renomiranih stručnjaka!
</p>
</div>
<button class="bn632-hover bn18">Naručite se!</button>
</div>
<section class="pregledi" id="pregledi">
<h1 class="heading"> <span> Stručno, brzo i povoljno! </span> </h1>
<h2 class="heading2"> <span>Izdvojeni pregledi</span></h3>
<div class="box-container">
<div class="box">
<div class="containerslike">
<img src="pexels-pixabay-262524.jpg" class="izborna">
<div class="overlay">
<a href="https://www.vivamed.hr/usluge/pregledi" class="ikona">
<i class="fa-solid fa-magnifying-glass"></i>
</a>
</div>
</div>
<h3>Pregled sportaša</h3>
<p>Rekreativci, amateri, profesionalci</p>
<button class="bn111" id="bn111"> Opširnije<i class="fa-solid fa-arrow-right"></i></button>
</div>
<div class="box">
<div class="containerslike">
<img src="delivery-driver-smiling-camera-his-van_13339-235836.jpg" class="izborna">
<div class="overlay">
<a href="https://www.vivamed.hr/usluge/pregledi" class="ikona">
<i class="fa-solid fa-magnifying-glass"></i>
</a>
</div>
</div>
<h3>Pregled vozača</h3>
<p>Sve vrste kategorija i pregleda</p>
<button class="bn111" id="bn111"> Opširnije<i class="fa-solid fa-arrow-right"></i></button>
</div>
<div class="box">
<div class="containerslike">
<img src="happy-graduate-woman-mantle-rejoicing-laughing-smiling_176420-14226.webp" class="izborna">
<div class="overlay">
<a href="https://www.vivamed.hr/usluge/pregledi" class="ikona">
<i class="fa-solid fa-magnifying-glass"></i>
</a>
</div>
</div>
<h3>Učenici i studenti</h3>
<p>Upisi u srednje škole, fakultete i druge akadamske ustanove</p>
<button class="bn111" id="bn111"> Opširnije<i class="fa-solid fa-arrow-right"></i></button>
</div>
<div class="podnopregled">
<button class="bn112" id="bn112"> Svi pregledi<i class="fa-solid fa-arrow-right"></i></button>
</div>
</div>
</section>
<!--
-->
<div class="infodiv">
<div class="row noMargin">
<div class="one">
<p>Radno vrijeme<br>
ponedjeljak 07 - 15
utorak 07 - 18
srijeda 07 - 14
četvrtak 07 - 14
petak 07 - 14
i prema dogovoru </p>
</div>
<div class="two">
<p>Adresa<br>
Krešićeva ul. 32/1. Kat (okretište tramvaja Borongaj)</p>
</div>
</div>
<div class="row noMargin">
<div class="three">
<p>Email<br>
info#vivamed.hr</p>
</div>
<div class="four">
<p>Telefon<br>
+385 1 233 55 00</p>
</div>
</div>
</div>
</body>
</html>
I've been coding a website in html,css and used some javascript scripts to do it. It is a medical website and so far I've done a lot to the main page which is my main problem here. I am self-taught and all the paddings, margins and screen-fits that I've coded into it are were actually applying only to the screen size that is on my laptop, and not others. I've tested this by uploading the files to InfintyFree and making it online just for the sake of testing it on other screens, and what happens is that all the content is scattered around the screen. I've put some pictures to show how it looks in comparison with my laptop, other laptop that I have and my phone. Also I've put the html and css code if you can check it out and see where I screwed up and just point me to the core because I really cannot comprehend what is going on.
Thank in advance, and sorry if there was a question like this before, because I haven't found one.[][]
I have tried putting the *{} and changing properties with it, in the body{}, height, width, overflow, padding, margins, Media only screen, everything. Still, everything fixed but only on my laptop on which it was built.

I want the menu to become a hamburger icon once it minimizes to mobile screen

I am trying to make the menu a hamburger icon, 3 layers when I minimize to a mobile screen, but I am doing something wrong, and I don't know why it is not working. The icon isn't supposed to show up until after a minimize to a mobile screen. However, the icon is there, but it's just one line.
I know there is something wrong, but I just cannot pin it.
[The images attached are some guidelines to help me get through the code.]
[1]: https://i.stack.imgur.com/Dc5U5.jpg
[2]: https://i.stack.imgur.com/nwhMo.jpg
[3]: https://i.stack.imgur.com/Et5Uw.jpg
< script type = "text/javascript" >
$(document).ready(function() {
$("header p").click(function() {
$("nav").toggleClass("slideDown");
});
$('.slick').slick({
infinite: true,
slidesToShow: 1,
slidesToScroll: 1,
fade: true,
autoplay: true,
autoplaySpeed: 2.5,
dots: true,
});
});
$(window).scroll(function() {
$("header").stop().animate({
top: $(document).scrollTop()
}, 'slow');
});
$("#hamburger").click(function() {
$(this).toggleClass("change");
$("nav").toggleClass("slideDownFurther");
}); <
/script>
#media screen and (max-width:640px) {
.floatRight,
.floatLeft {
float: none;
}
.slick,
#pinkkimono {
display: block;
width: 95%;
min-width: 95%;
margin: auto;
}
}
#media screen and (min-width:641px) {
#hamburger {
display: none;
}
}
.p {
display: none;
}
#font-face {
font-family: 'agendaimport';
src: url('../Demo\ Site\ Stage\ 3\ pt\ 2/type/agenda_medium.woff2') format('woff2'), url('../Demo\ Site\ Stage\ 3\ pt\ 2/type/agenda_medium.woff') format('woff');
font-weight: normal;
font-style: normal;
}
h3 {
font-family: 'agenda';
font-size: 1.8em;
}
body {
background-image: url("../Demo\ Site\ Stage\ 3\ pt\ 2/images/BRICKSxMORTAR.jpg");
background-size: 200px;
background-color: black;
color: floralwhite;
font-size: 1.2em;
font-family: 'Courier New', Courier, monospace;
width: 100%;
height: auto;
margin: auto;
}
a {
color: aquamarine;
font-size: 25px;
}
#wrapper {
width: 80%;
height: auto;
margin: auto;
padding: 1em;
background: #000;
position: relative;
top: 4.5em;
z-index: 0;
}
div {
color: rgb(255, 255, 255);
font-size: 20px;
}
#img {
display: block;
margin: auto;
}
#logo {
display: block;
margin: auto;
width: 60%;
height: auto;
max-width: 200%;
}
nav {
width: 100%;
height: auto;
background: aquamarine;
margin-right: auto;
margin-left: auto;
margin-top: -99em;
padding: 1em 0;
text-align: center;
margin-bottom: 1em;
padding-top: 1em rgb(255, 255, 255);
padding-bottom: 1em white;
color: magenta;
/*border-top: 1px white;
border-bottom: 1px white;*/
transition: margin-top 0.8s ease-in-out;
}
a.menu:link {
display: block;
color: black;
}
a.menu:visited {
color: rgb(6, 8, 8);
text-decoration: none;
}
a.menu.slideDown {
color: magenta;
text-decoration: underline;
background-color: aquamarine;
}
a.menu:active {
text-decoration: underline;
background-color: aquamarine;
}
#magenta {
font-size: 0.8em;
}
#smaller {
font-size: 0.8em;
color: black;
}
footer {
width: 100%;
background-color: floralwhite;
text-align: center;
padding-top: 1em;
padding-bottom: 1em;
clear: both;
}
footer p {
margin: auto;
width: 90%;
color: magenta;
}
footer a {
margin: auto;
width: 90%;
color: magenta;
}
footer p:link {
color: black;
}
footer a:link {
color: black;
}
.slick {
width: 50%;
height: auto;
min-width: 200px;
max-width: 500px;
margin: 1.5em;
position: relative;
top: -1em;
}
.slider {
width: 100%;
height: auto;
}
#magentaman {
width: 50%;
height: auto;
min-width: 300px;
max-width: 800px;
margin: 1em;
}
.floatLeft {
float: left;
}
.floatRight {
float: right;
}
#banner {
width: 100%;
height: auto;
background: #000;
border-bottom: 1px solid #fff;
position: fixed;
z-index: +1;
top: 0;
left: 0;
right: 0;
}
header {
width: 100%;
height: auto;
top: 0;
left: 0;
z-index: +1;
}
header p {
width: 99%;
height: auto;
color: black;
background-color: aquamarine;
font-weight: bold;
padding-left: 1%;
}
/*header:hover nav{
margin-top:-1em;
}
header.slideDown nav{
margin-top:-1em;
}*/
.slideDown {
margin-top: -1em;
}
.slideDownFurther {
margin-top: 3em;
}
header:hover p {
color: magenta;
cursor: pointer;
}
h3 {
animation-name: strobe;
animation-duration: 3s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}
#keyframes strobe {
0% {
color: floralwhite;
}
50% {
color: magenta;
}
100% {
color: white;
}
}
#hamburger {
top: 0.95em;
left: 1em;
cursor: pointer;
}
#bar1 {
width: 35px;
height: 5px;
top: 6px;
bottom: 6px;
background-color: aquamarine;
transition-property: 0.5s;
}
#bar2 {
width: 35px;
height: 5px;
top: 6px;
bottom: 6px;
background-color: aquamarine;
transition-property: 0.5s;
}
#bar3 {
width: 35px;
height: 5px;
top: 6px;
bottom: 6px;
background-color: aquamarine;
transition-property: 0.5s;
}
.change #bar1 {
-webkit-transform: rotate(-45deg) translate(-9px, 6px);
transform: rotate(-45deg) translate(-9px, 6px);
}
.change #bar2 {
opacity: 0;
}
.change #bar3 {
-webkit-transform: rotate(45deg) translate(-8px, -8px);
transform: rotate(45deg) translate(-8px, -8px);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Index.html</title>
<meta name="description" content="The homepage of Bricks and Mortar, Toronto's premiere custom clothing shop." />
<link rel="stylesheet" href="external.css">
<script src="script/jquery-ui.js"></script>
<script src="script/jquery-3.6.0.min.js"></script>
<script src="script/slick/slick.js"></script>
<link rel="stylesheet" href="script/slick/slick.css" />
<link rel="stylesheet" href="script/slick/slick-theme.css" />
<link rel="stylesheets" href="stylesheets/mediaqueries.css">
<script type="text/javascript">
$(document).ready(function() {
$("header p").click(function() {
$("nav").toggleClass("slideDown");
});
$('.slick').slick({
infinite: true,
slidesToShow: 1,
slidesToScroll: 1,
fade: true,
autoplay: true,
autoplaySpeed: 2.5,
dots: true,
});
});
$(window).scroll(function() {
$("header").stop().animate({
top: $(document).scrollTop()
}, 'slow');
});
$("#hamburger").click(function() {
$(this).toggleClass("change");
$("nav").toggleClass("slideDownFurther");
});
</script>
</head>
<body>
<br>
<div id="banner">
<br>
<div id="hamburger">
<div id="bar1"></div>
<div id="bar2"></div>
<div id="bar3"></div>
</div>
<img src="images/logo.png" id="logo"></div>
<br>
<br>
<br>
<br>
<div id="wrapper">
<header>
<p>menu</p>
<nav>
<a class="menu" href="OURSTORY.HTML">OUR STORY</a>
<a class="menu" href="#">OUR SERVICES</a>
<a class="menu" href="#">LOCATIONS</a>
<a class="menu" href="F.A.Q.html">F.A.Q</a>
</nav>
</header>
<div id="mission">
<h3 style="color:magenta">The mission of BRICKSxMORTAR is to transform how Canadians think about fashion.</h3>
<div class="slick floatRight">
<div><img class="slider" src="images/aqua-androgynous.jpg" /></div>
<div><img class="slider" src="images/bandmate-blouses.jpg" /></div>
<div><img class="slider" src="images/sequins-and-stones.jpg" /></div>
<div><img class="slider" src="images/roses-vest.jpg" /></div>
</div>
<p>For too long consumers have been forced to fit into a mould of one kind or another—assigned a size on an arbitrary scale of unrealistic and unhealthy beauty and body standards. In an over-sexualized and Photoshopped fashion market, we offer a different
kind of clothing philosophy.
<br>
<br>
<br> BRICKSxMORTAR strives to connect with the individual and to consult and create custom clothing for them with them in a collaborative manner. By doing so, our fashion studio endeavours to change consumers' perceptions of the current fashion
landscape as well as their own views about their bodies and their fashion choices.
<img class="floatLeft" id="magentaman" src="images/kimono-and-shorts.jpg" />
<br> What does it feel like to wear something especially made for one's body rather than fitting one's body into a predetermined shape? We aim to answer this question a million times over as we help every client move towards a more comfortable
version of themselves.
</p>
<!--end of mission-->
<br>
<br>
<br>
<br>
<br>
<footer>
<h3>
<div class="magenta"></div>
<p>
<div class="smaller" font-size="0.8em">
</p>
</h3>
<p>©BRICKSxMORTAR, inc. 2018-2020 // 1.888.708.9950 //
<a class="menu" href="mailto:info#bricksxmortar.com" style="color:magenta"> <u>info#bricksxmortar.com</u></a>
</p>
</footer>
</div>
<!--end of wrapper-->
</html>
</body>
Try making a media query only when the width of the page changes (minimizes).
#hamburger {
display: none
}
#media screen and (max-width:641px) {
#hamburger {
display: inherit;
}
}
I hope this can help, I remove the unwanted jquery from your code because its shows a console error. if you want menu responsive menu then visit this Link
$(document).ready(function() {
$("header p").click(function() {
$("nav").toggleClass("slideDown");
});
$(window).scroll(function() {
$("header").stop().animate({
top: $(document).scrollTop()
}, 'slow');
});
$("#hamburger").click(function() {
$(this).toggleClass("change");
$("nav").toggleClass("slideDownFurther");
});
});
#media screen and (min-width:641px) {
#hamburger {
display: none;
}
}
.p {
display: none;
}
#font-face {
font-family: 'agendaimport';
src: url('../Demo\ Site\ Stage\ 3\ pt\ 2/type/agenda_medium.woff2') format('woff2'), url('../Demo\ Site\ Stage\ 3\ pt\ 2/type/agenda_medium.woff') format('woff');
font-weight: normal;
font-style: normal;
}
h3 {
font-family: 'agenda';
font-size: 1.8em;
}
body {
background-image: url("../Demo\ Site\ Stage\ 3\ pt\ 2/images/BRICKSxMORTAR.jpg");
background-size: 200px;
background-color: black;
color: floralwhite;
font-size: 1.2em;
font-family: 'Courier New', Courier, monospace;
width: 100%;
height: auto;
margin: auto;
}
a {
color: aquamarine;
font-size: 25px;
}
#wrapper {
width: 80%;
height: auto;
margin: auto;
padding: 1em;
background: #000;
position: relative;
top: 4.5em;
z-index: 0;
}
div {
color: rgb(255, 255, 255);
font-size: 20px;
}
#img {
display: block;
margin: auto;
}
#logo {
display: block;
margin: auto;
width: 60%;
height: auto;
max-width: 200%;
}
nav {
width: 100%;
height: auto;
background: aquamarine;
margin-right: auto;
margin-left: auto;
margin-top: -99em;
padding: 1em 0;
text-align: center;
margin-bottom: 1em;
padding-top: 1em rgb(255, 255, 255);
padding-bottom: 1em white;
color: magenta;
/*border-top: 1px white;
border-bottom: 1px white;*/
transition: margin-top 0.8s ease-in-out;
position: absolute;
left: 0;
}
a.menu:link {
display: block;
color: black;
}
a.menu:visited {
color: rgb(6, 8, 8);
text-decoration: none;
}
a.menu.slideDown {
color: magenta;
text-decoration: underline;
background-color: aquamarine;
}
a.menu:active {
text-decoration: underline;
background-color: aquamarine;
}
#magenta {
font-size: 0.8em;
}
#smaller {
font-size: 0.8em;
color: black;
}
footer {
width: 100%;
background-color: floralwhite;
text-align: center;
padding-top: 1em;
padding-bottom: 1em;
clear: both;
}
footer p {
margin: auto;
width: 90%;
color: magenta;
}
footer a {
margin: auto;
width: 90%;
color: magenta;
}
footer p:link {
color: black;
}
footer a:link {
color: black;
}
.slick {
width: 50%;
height: auto;
min-width: 200px;
max-width: 500px;
margin: 1.5em;
position: relative;
top: -1em;
}
.slider {
width: 100%;
height: auto;
}
#magentaman {
width: 50%;
height: auto;
min-width: 300px;
max-width: 800px;
margin: 1em;
}
.floatLeft {
float: left;
}
.floatRight {
float: right;
}
#banner {
width: 100%;
height: auto;
background: #000;
border-bottom: 1px solid #fff;
position: fixed;
z-index: +1;
top: 0;
left: 0;
right: 0;
}
header {
width: 100%;
height: auto;
top: 0;
left: 0;
position: relative;
z-index: +1;
}
header p {
width: 99%;
height: auto;
color: black;
background-color: aquamarine;
font-weight: bold;
padding-left: 1%;
}
.slideDown {
margin-top: -1em;
}
.slideDownFurther {
margin-top: 3em;
}
header:hover p {
color: magenta;
cursor: pointer;
}
h3 {
animation-name: strobe;
animation-duration: 3s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}
#keyframes strobe {
0% {
color: floralwhite;
}
50% {
color: magenta;
}
100% {
color: white;
}
}
#hamburger {
top: 0.95em;
left: 1em;
cursor: pointer;
}
#bar1 {
width: 35px;
height: 5px;
top: 6px;
bottom: 6px;
background-color: aquamarine;
transition-property: 0.5s;
margin: 5px 0;
}
#bar2 {
width: 35px;
height: 5px;
top: 6px;
bottom: 6px;
background-color: aquamarine;
transition-property: 0.5s;
margin: 5px 0;
}
#bar3 {
width: 35px;
height: 5px;
top: 6px;
bottom: 6px;
background-color: aquamarine;
transition-property: 0.5s;
}
.change #bar1 {
-webkit-transform: rotate(-45deg) translate(-9px, 6px);
transform: rotate(-45deg) translate(-6px, 6px);
}
.change #bar2 {
opacity: 0;
}
.change #bar3 {
-webkit-transform: rotate(45deg) translate(-8px, -8px);
transform: rotate(45deg) translate(-8px, -8px);
}
#media screen and (max-width:640px) {
.floatRight,
.floatLeft {
float: none;
}
.slick,
#pinkkimono {
display: block;
width: 95%;
min-width: 95%;
margin: auto;
}
div#wrapper header p {
display: none;
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Meta View Port -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Index.html</title>
<meta name="description" content="The homepage of Bricks and Mortar, Toronto's premiere custom clothing shop." />
<link rel="stylesheet" href="external.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<br>
<div id="banner">
<br>
<div id="hamburger">
<div id="bar1"></div>
<div id="bar2"></div>
<div id="bar3"></div>
</div>
<img src="images/logo.png" id="logo"></div>
<br>
<br>
<br>
<br>
<div id="wrapper">
<header>
<p>menu</p>
<nav>
<a class="menu" href="OURSTORY.HTML">OUR STORY</a>
<a class="menu" href="#">OUR SERVICES</a>
<a class="menu" href="#">LOCATIONS</a>
<a class="menu" href="F.A.Q.html">F.A.Q</a>
</nav>
</header>
<div id="mission">
<h3 style="color:magenta">The mission of BRICKSxMORTAR is to transform how Canadians think about fashion.</h3>
<div class="slick floatRight">
<div><img class="slider" src="images/aqua-androgynous.jpg" /></div>
<div><img class="slider" src="images/bandmate-blouses.jpg" /></div>
<div><img class="slider" src="images/sequins-and-stones.jpg" /></div>
<div><img class="slider" src="images/roses-vest.jpg" /></div>
</div>
<p>For too long consumers have been forced to fit into a mould of one kind or another—assigned a size on an arbitrary scale of unrealistic and unhealthy beauty and body standards. In an over-sexualized and Photoshopped fashion market, we offer a different
kind of clothing philosophy.
<br>
<br>
<br> BRICKSxMORTAR strives to connect with the individual and to consult and create custom clothing for them with them in a collaborative manner. By doing so, our fashion studio endeavours to change consumers' perceptions of the current fashion
landscape as well as their own views about their bodies and their fashion choices.
<img class="floatLeft" id="magentaman" src="images/kimono-and-shorts.jpg" />
<br> What does it feel like to wear something especially made for one's body rather than fitting one's body into a predetermined shape? We aim to answer this question a million times over as we help every client move towards a more comfortable
version of themselves.
</p>
<!--end of mission-->
<br>
<br>
<br>
<br>
<br>
<footer>
<h3>
<div class="magenta"></div>
<p>
<div class="smaller" font-size="0.8em">
</p>
</h3>
<p>©BRICKSxMORTAR, inc. 2018-2020 // 1.888.708.9950 //
<a class="menu" href="mailto:info#bricksxmortar.com" style="color:magenta"> <u>info#bricksxmortar.com</u></a>
</p>
</footer>
</div>
<!--end of wrapper-->
</html>
</body>

I wanna make my text Responsive in CSS but I got Problem

I'm using media queries in my codes. I added breakpoint for my header and it worked very well but It doesn't work on my original text.
I thought that I can fix it by changing "pre" tag to "p" but It messed up and destroyed all of spacing on my text
so what do i do?
In my HTML : (main-title is a class of heading and original text is a class for "pre" tag)
In my CSS: my media queries. I tired to do on 768px screen first but it didn't work. same as other resolutions
/* Navbar starts ===============================================================================*/
body{
padding:0px;
margin:0px;
overflow-x: hidden;
}
.container{
width: 100%;
height:78px;
position: relative;
background-color: rgb(39, 44, 52);
z-index: 1;
}
.logo{
position: absolute;
padding:0.6%;
padding-top: 0.2%;
}
.nav-list{
font-family: 'Noto Serif', serif;
position: absolute;
right: 0px;
top: 1%;
display: flex;
padding:1.0%;
z-index: 1;
}
.nav-list a{
margin: 15px;
text-decoration: none;
color: #80e560;
transition: color 400ms ease-in-out;
}
.nav-list a:hover{
color: #a8fbfc;
}
.nav-list ul{
list-style-type: none;
}
.hamburger{
position: relative;
cursor: pointer;
display: none;
-moz-transform-origin: 20px;
-ms-transform-origin: 20px;
-o-transform-origin: 20px;
-webkit-transform-origin: 20px;
transform-origin: 20px;
transition: width 800ms ease-in-out;
transition: height 800ms ease-in-out;
}
.hamburger div{
width: 20px;
height: 2px;
background-color: #80e560;
margin: 3px;
margin-left: 50%;
transition: transform 210ms ease-in-out;
}
.sidemenu{
position: absolute;
right: 0px;
width: 40%;
height: 100%;
width: 20%;
background-color: rgb(39, 44, 52);
transform:translateX(100%);
transition:transform 500ms;
z-index: 1;
}
.side-items{
height:80%;
justify-content:space-between;
position: absolute;
display: flex;
flex-direction: column;
font-family: 'Noto Serif', serif;
align-items : space-between;
}
.side-item{
list-style-type: none;
}
.side-item a{
color: white;
text-decoration: none;
transition: color 500ms ease-in-out;
}
.side-item a:hover{color:#80e560;}
#media screen and (max-width:1500px){
.logo{padding-top: 0.3%;}
}
#media screen and (max-width:768px){
.nav-item{
display: none;
}
.hamburger{
display:inline;
bottom: 12px;
right: 35px;
}
.side-items{
right: 20%;
}
.nav-list{
padding: 40px;
}
.container{
height: 89px;
}
.logo{padding-top: 2%;}
.main-title{font-size: 3vw;}
.Original-text{font-size: 3vw;}
}
#media screen and (max-width:568px){
.hamburger{
right: 50%;
}
.side-items{
right: 20%;
font-size: 12px;
}
.container{
height: 89px;
}
.main-title{
font-size: 4vw;
padding: 0px;
}
}
#media screen and (max-width:280px)
{
.side-items{
right: 9%;
}
.hamburger{
right: 6%;
}
}
/* Navbar Ends ========================================================================*/
.mid-section{
background-image: url(/img/background.jpg);
background-position:center;
background-size:cover;
display: flex;
flex-direction: column;
width: 100vw;
height: 100vh;
}
#keyframes colorchange{
0% {
color: rgb(216, 200, 86);
}
45% {
color: rgb(231, 103, 71);
}
50% {
color: rgb(198, 228, 73);
}
65% {
color: rgb(179, 228, 73);
}
73%{
color: rgb(70, 232, 155);
}
85%{
color: rgb(70, 232, 211);
}
100%{
color: rgb(69, 233, 224);
}
}
.main-title{
text-align: left;
padding: 45px;
color: rgb(234, 226, 164);
animation-name:colorchange;
animation-iteration-count: infinite;
animation-duration: 7s;
padding-bottom: 0px;
}
.Original-text{
font-size: 1.8vw;
font-family: 'Sansita Swashed', cursive;
padding-top: 0;
color: gold;
}
<!--Navbar Starts ====================================== -->
<header>
<div class="container">
<nav>
<div class="logo"><img src="/img/logo.png"></div>
<div class="nav-list">
<ul class="nav-item"><li>Home</li></ul>
<ul class="nav-item"><li>Products</li></ul>
<ul class="nav-item"><li>About</li></ul>
<div class="hamburger" onclick="clk()" id="burger">
<div id="line1"></div>
<div id="line2"></div>
<div id="line3"></div>
</div>
</div>
</nav>
</div>
<div class="sidemenu" id="sdmenu">
<div class="side-items">
<ul class="side-item"><li>Home</li></ul>
<ul class="side-item"><li>Products</li></ul>
<ul class="side-item"><li>About</li></ul>
</div>
</div>
</header>
<script src="/func.js"></script>
<!--Navbar End===========================================-->
<div class="mid-section">
<link href="https://fonts.googleapis.com/css2?family=Sansita+Swashed:wght#600&display=swap" rel="stylesheet">
<h1 class="main-title">Welcome to the Land of Electronics</h1>
<pre class="Original-text">
This Land Will Show the Future! get any Electronics You need
from us!
eveything is ready for you. direct from manufacture
Original components. with 2 years guarantee
so lets go and and explore or world
</pre>
</div>
Well, using vw over standard font-size units is up to you, but I really discourage you from using it in your projects because it will change the size of your element whenever the viewport width changes and depend on which box and element are you working on and how's your HTML markup structure is, it's gonna be act very differently in different situations.
But the actual problem here is with the order of specificity for your styles, due to this fact whatever comes last will overwrite the first so your queries won't work as expected. To get them to work (In this particular case) you can move all of them to the bottom of your styles.
/* Navbar starts ===============================================================================*/
body {
padding: 0px;
margin: 0px;
overflow-x: hidden;
}
.container {
width: 100%;
height: 78px;
position: relative;
background-color: rgb(39, 44, 52);
z-index: 1;
}
.logo {
position: absolute;
padding: 0.6%;
padding-top: 0.2%;
}
.nav-list {
font-family: 'Noto Serif', serif;
position: absolute;
right: 0px;
top: 1%;
display: flex;
padding: 1.0%;
z-index: 1;
}
.nav-list a {
margin: 15px;
text-decoration: none;
color: #80e560;
transition: color 400ms ease-in-out;
}
.nav-list a:hover {
color: #a8fbfc;
}
.nav-list ul {
list-style-type: none;
}
.hamburger {
position: relative;
cursor: pointer;
display: none;
-moz-transform-origin: 20px;
-ms-transform-origin: 20px;
-o-transform-origin: 20px;
-webkit-transform-origin: 20px;
transform-origin: 20px;
transition: width 800ms ease-in-out;
transition: height 800ms ease-in-out;
}
.hamburger div {
width: 20px;
height: 2px;
background-color: #80e560;
margin: 3px;
margin-left: 50%;
transition: transform 210ms ease-in-out;
}
.sidemenu {
position: absolute;
right: 0px;
width: 40%;
height: 100%;
width: 20%;
background-color: rgb(39, 44, 52);
transform: translateX(100%);
transition: transform 500ms;
z-index: 1;
}
.side-items {
height: 80%;
justify-content: space-between;
position: absolute;
display: flex;
flex-direction: column;
font-family: 'Noto Serif', serif;
align-items: space-between;
}
.side-item {
list-style-type: none;
}
.side-item a {
color: white;
text-decoration: none;
transition: color 500ms ease-in-out;
}
.side-item a:hover {
color: #80e560;
}
/* Navbar Ends ========================================================================*/
.mid-section {
background-image: url(/img/background.jpg);
background-position: center;
background-size: cover;
display: flex;
flex-direction: column;
width: 100vw;
height: 100vh;
}
#keyframes colorchange {
0% {
color: rgb(216, 200, 86);
}
45% {
color: rgb(231, 103, 71);
}
50% {
color: rgb(198, 228, 73);
}
65% {
color: rgb(179, 228, 73);
}
73% {
color: rgb(70, 232, 155);
}
85% {
color: rgb(70, 232, 211);
}
100% {
color: rgb(69, 233, 224);
}
}
.main-title {
text-align: left;
padding: 45px;
color: rgb(234, 226, 164);
animation-name: colorchange;
animation-iteration-count: infinite;
animation-duration: 7s;
padding-bottom: 0px;
}
.Original-text {
font-size: 1.8vw;
font-family: 'Sansita Swashed', cursive;
padding-top: 0;
color: gold;
}
#media screen and (max-width:1500px) {
.logo {
padding-top: 0.3%;
}
}
#media screen and (max-width:768px) {
.nav-item {
display: none;
}
.hamburger {
display: inline;
bottom: 12px;
right: 35px;
}
.side-items {
right: 20%;
}
.nav-list {
padding: 40px;
}
.container {
height: 89px;
}
.logo {
padding-top: 2%;
}
.main-title {
font-size: 3vw;
}
.Original-text {
font-size: 3vw;
}
}
#media screen and (max-width:568px) {
.hamburger {
right: 50%;
}
.side-items {
right: 20%;
font-size: 12px;
}
.container {
height: 89px;
}
.main-title {
font-size: 4vw;
padding: 0px;
}
}
#media screen and (max-width:280px) {
.side-items {
right: 9%;
}
.hamburger {
right: 6%;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif:ital#1&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<title>ElectroLand</title>
</head>
<body>
<!--Navbar Starts ====================================== -->
<header>
<div class="container">
<nav>
<div class="logo"><img src="/img/logo.png"></div>
<div class="nav-list">
<ul class="nav-item">
<li>Home</li>
</ul>
<ul class="nav-item">
<li>Products</li>
</ul>
<ul class="nav-item">
<li>About</li>
</ul>
<div class="hamburger" onclick="clk()" id="burger">
<div id="line1"></div>
<div id="line2"></div>
<div id="line3"></div>
</div>
</div>
</nav>
</div>
<div class="sidemenu" id="sdmenu">
<div class="side-items">
<ul class="side-item">
<li>Home</li>
</ul>
<ul class="side-item">
<li>Products</li>
</ul>
<ul class="side-item">
<li>About</li>
</ul>
</div>
</div>
</header>
<script src="/func.js"></script>
<!--Navbar End===========================================-->
<div class="mid-section">
<link href="https://fonts.googleapis.com/css2?family=Sansita+Swashed:wght#600&display=swap" rel="stylesheet">
<h1 class="main-title">Welcome to the Land of Electronics</h1>
<pre class="Original-text">
This Land Will Show the Future! get any Electronics You need
from us!
eveything is ready for you. direct from manufacture
Original components. with 2 years guarantee
so lets go and and explore or world
</pre>
</div>
</body>
</html>
Update
Well, since there were some complaints about why we should put redundant code into the answer, I just break it down to just the necessary part of code, which is too short and more readable. 😉
.main-title {
text-align: left;
padding: 45px;
color: rgb(234, 226, 164);
animation-name: colorchange;
animation-iteration-count: infinite;
animation-duration: 7s;
padding-bottom: 0px;
}
.Original-text {
font-size: 1.8vw;
font-family: 'Sansita Swashed', cursive;
padding-top: 0;
color: gold;
}
#media screen and (max-width:768px) {
.main-title {
font-size: 3vw;
}
.Original-text {
font-size: 3vw;
}
}
#media screen and (max-width:568px) {
.main-title {
font-size: 4vw;
padding: 0px;
}
}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css2?family=Sansita+Swashed:wght#600&display=swap" rel="stylesheet">
<h1 class="main-title">Welcome to the Land of Electronics</h1>
<pre class="Original-text">
This Land Will Show the Future! get any Electronics You need
from us!
eveything is ready for you. direct from manufacture
Original components. with 2 years guarantee
so lets go and and explore or world
</pre>

Website Issues - cant find the solutions

First of all i dont know if its permited more than one question in one topic, however i didnt find anything talking about that.
I have been developing a website, but im a bit new to this and my site has some things that need to be worked out, i will be listing the issues bellow and hopefully someone will help me.
1- Slideshow
How i can put the circles (bullet navigation) of the slideshow inside the slideshow ?
Images are not fully the size as the screen, i can see the current slide and a bit of the next slide, what do i do ?
2- Last 2 pages, Mobile & Contacts
If i change
.mobile {
min-width: 1100px;
}
to:
.mobile {
min-width: 1300px;
}
The mobile div will not make text stay on top of the image but the contacts page will not be as responsive as before, just try by yourself.
Thats it, it may simple, but i cant figure it out, i hope theres no problem with this topic, if so tell me.
See it live: http://optential.co.nf/
html,
body { height: 100%; }
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);
background-size: cover;
color: white;
height: 100%;
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 {
box-shadow: 10px 6px 15px grey;
background-color: white;
background-image: url("img/barra.png");
background-position: 12% 0%;
height: 100px;
background-repeat: no-repeat;
text-align: right;
}
#btn {
width: 10em;
}
.mail2.fixed {
box-shadow: 10px 6px 15px grey;
position: fixed;
display:block;
top: 0; left: 0;
width: 100%;
min-width: 800px;
height: 100px;
z-index: 1;
}
.mail2 form {
display: inline-block;
margin: 30px 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);
}
#slider {
width: 100%;
height: 100%;
overflow: hidden;
}
#slider .images {
width: 100%;
position: relative;
transition: left 1s;
left: 0;
}
#slider .images img {
z-index: -1;
width: 100%;
background-size: 100%;
position: absolute;
}
.controls {
width: 350px;
margin: 5px auto;
display: flex;
justify-content: center;
}
.controls div {
width: 16px;
height: 16px;
margin: 0 5px;
background: tomato;
border-radius: 50%;
}
.controls .current {
background: red;
}
.mobile {
min-width: 1300px;
}
.mobile .bar {
background-size: cover;
width: 100%;
background: #F4F4F4;
color: #595B61;
min-width: 700px;
display: flex;
justify-content: space-around;
text-align: center;
}
.mobile .bar img {
width: 100%;
background-size: cover;
display: block;
margin: 0 auto;
}
.mobile .content {
background: radial-gradient(ellipse at 55% 50%, #F9F9F9 40%,#B6B5BD 120%);
position: relative;
}
.mobile .content .mobimg {
padding: 3em;
margin-left:10%;
}
.mobile .content .mob {
position: absolute;
top: 0;
left: 60%;
}
.mobile .content h1 {
color: #D6D6D4;
font-size: 120px;
margin-bottom: 0;
}
.mobile .content p {
margin-left: 15px;
width: 410px;
color: #929584;
font-size: 12px;
margin-bottom: 18px
}
.mobile .content .sep {
height: 15px;
border-bottom: 1px solid #C24147;
text-align: center;
}
.mobile .content .sep img {
padding: 0 8px;
background: #F9F9F9;
}
.mobile .content h2 {
margin-left: 15px;
color: #929584;
font-size: 15px;
font-weight: 600;
text-align: center;
}
.mobile .content .buttons {
display: flex;
justify-content: space-around;
width: 400px;
margin-left: 20px;
}
.mobile .content .button {
display: block;
background: #010101;
color: #F8F8F8;
text-decoration: none;
width: 160px;
height: 50px;
border-radius: 6px;
position: relative;
}
.mobile .content .button:hover {
background: #222;
}
.mobile .content .button.apple img {
margin: 10px 0 0 10px;
}
.mobile .content .button.apple span {
font-size: 11px;
font-weight: 400;
position: absolute;
top: 4px; left: 42px;
}
.mobile .content .button.apple h3 {
font-size: 22px;
font-weight: 600;
position: absolute;
top: 14px; left: 42px;
margin: 0;
}
.mobile .content .button.google img {
margin: 18px 0 0 8px;
}
.mobile .content .button.google span {
font-size: 10px;
font-weight: 600;
position: absolute;
top: 4px; left: 40px;
text-transform: uppercase;
}
.mobile .content .button.google h3 {
font-size: 20px;
font-weight: 300;
position: absolute;
top: 16px; left: 38px;
margin: 0;
}
.mobile .content .button.google h3 b {
font-size: 22px;
font-weight: 400;
font-family: 'Cardo', serif;
margin: 0;
margin-right: 4px
}
.contact {
min-width: 1100px;
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 #btn {
display: inline-block;
color: white;
font-weight: bold;
text-align: center;
text-decoration: none;
background-color: rgb(204, 66, 63);
border-radius: 4px;
padding: 10px 0px;
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="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/fixedbar.js"></script>
<script src="js/slider.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 action="form/form.php" method="post">
<h1>Try Now!</h1>
<input name="Email" class="Email" type="text" placeholder="Enter your Email address ...">
<input type="submit" value="Get started for free">
</form>
</div>
</div>
<div class="mail2">
<form action="form/form.php" method="post">
<h1>Try Now!</h1>
<input type="text" placeholder="Your Email here...">
<input type="submit" id ="btn" value="Get started for free">
<a class="top" href="#top">Top</a>
</form>
</div>
<div id="slider">
<div class="images">
<div class="controls">
<img src="img/3.png" alt="Image-1" />
<img src="img/2.png" alt="Image-2" />
<img src="img/1.png" alt="Image-3" />
<img src="img/4.png" alt="Image-4" />
</div>
</div>
</div>
<div class="mobile">
<div class="bar">
<img src="img/barra2.png">
</div>
<div class="content">
<img class="mobimg" src="https://jsbin-user-assets.s3.amazonaws.com/rafaelcastrocouto/mob.png">
<div class="mob">
<h1>Mobile</h1>
<p>Optential combines the best of responsive software with native IOS and Android apps to provide the best experience and optimal results!</p>
<p>On laptops, desktops, tablets and phones, always get the best experience on the most intuitive project management set of tools in the world!</p>
<p class="sep">
<img src="https://jsbin-user-assets.s3.amazonaws.com/rafaelcastrocouto/a1.png">
</p>
<h2>Get the app!</h2>
<div class="buttons">
<a class="button apple" href="">
<img src="https://jsbin-user-assets.s3.amazonaws.com/rafaelcastrocouto/apple.png">
<span>Download on the</span>
<h3>App Store</h3>
</a>
<a class="button google" href="">
<img src="https://jsbin-user-assets.s3.amazonaws.com/rafaelcastrocouto/google.png">
<span>Get it on</span>
<h3><b>Google</b>play</h3>
</a>
</div>
</div>
</div>
</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 method="POST" id="contactos_form" action="form/contactengine.php" onsubmit="return submit_form(this);">
<div class="col1">
<h1>Contact us!</h1>
<input type="text" name="Name" size="50" placeholder="Name"/>
<input type="text" name="Email" size="50" placeholder="Email"/>
<input type="text" name="Subject" size="50" placeholder="Subject"/>
</div>
<div class="col2">
<textarea name="Message" rows="5" cols="70" placeholder="Message..."></textarea>
<input type="submit" id="btn"value="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>
<script src="js/slider.js"></script>
<script>
function submit_form(form){
formulario=$("#contactos_form");
$.ajax({url: formulario.attr("action"), method:formulario.attr("method"), data:formulario.serialize(), success: function(result){
alert(result);
}});
return false;
}
</script>
</body>
</html>
The css of the slideshow is "slider" and "controls".
Hope someone can help.
To answer questions 1
I will be answering the others shortly. To move the button controls first we need to give them a div, however as the controls are being dynamically generated so we have to edit the code which creates them, to do this we go into slider.js and add class="button move" to the
$('#slider .images img').each(function(i) {
var img = $(this);
img.css('left', i * width);
var button = $('<div class="buttonmove">');
controls.append(button);
if (i == 0) {
button.addClass('current')
}
Now we have something that we can edit, the most easiest way to move them is to use position:relative and give them a -100 top value like so.
.buttonmove {
position: relative;
top: -250px;
}
Question 2
Unfortantly I don't see the issue with your question as changing it 1300px works better as the layer don't overlap, please let me know in more detail;
A- the problem
B- what the result should be like
I hope this helped!
EDIT
Here is the jQuery function;
$(document).ready(function() {
var sliderImgH = $(".sliderimages:first").height();
$(".buttonmove:nth-child(1)").css("margin-top", sliderImgH-75);
});
$(window).resize(function() {
var sliderImgH = $(".sliderimages").height();
$(".buttonmove:nth-child(1)").css("margin-top", sliderImgH-75);
});
I also added this CSS;
.buttonmove {
position: relative;
}
#slider {
position: absolute;
}
*NOTE**
Adjust your function order so it goes or it won't work on load,
<script src="js/slider.js"></script>
Then the function I just made
<script src="js/fixedbar.js"></script>
EDIT(sorry forgot to add...)
I forgot to tell you to to add a class called sliderimages to your first or all of the images in your slider.
<div id="slider">
<div class="images">
<div class="controls">
<img class="sliderimages" src="img/3.png" alt="Image-1" />
<img src="img/2.png" alt="Image-2" />
<img src="img/1.png" alt="Image-3" />
<img src="img/4.png" alt="Image-4" />
</div>
</div>
</div>

Having trouble with footer staying down and seperate from main content

I've been struggling with this page for days and I can't figure out where I went wrong. My eyes hurt and I need some help. I've been able to use sticky footer before but for some reason this page is being quite temperamental.
The page: http://isolatedhowl.com/workshop/buckstop/
The html: http://plnkr.co/edit/kpMf8txpBSqEGOwXxE0s
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="http://meyerweb.com/eric/tools/css/reset/reset.css" media="all"/>
<link rel="stylesheet" type="text/css" href="css/buckstop.css" media="screen"/>
<title>Buck Stop</title>
<meta name="description" content="Buck Stop is a classic barbecue and small plate saloon." />
<meta charset="UTF-8"/>
</head>
<body>
<div id="wrapper">
<article id="maininfo">
<header>
<div id="coverimg"><img src="images/buckstop_interior.jpg" alt="Buck Stop Interior" width="560" height="315"/></div>
<figure id="logo"><img src="buckstop_logo.png" alt="Buck Stop Logo"/></figure>
</header>
<nav id="mainnav">
<ul>
<li>Kitchen</li>
<li>Bar</li>
<li>Events</li>
<li>Contact</li>
<li>About</li>
</ul>
</nav>
<div id="maincontent">
<p class="center quote">"Food is like love. It should be entered into with abandon or not at all."</p>
<p class="center">- Harriet Van Horne</p>
</div>
</article>
</div>
<article id="storyinfo" class="infolinks">
<header><h2>Our Story</h2></header>
<p>Find out more about who we are, what makes us unique, and what we're all about...</p>
<p class="right">Read More</p>
</article>
<article id="menuinfo" class="infolinks">
<header><h2>Our Menu</h2></header>
<p>All of our food is prepared in house and sourced locally. Great food, great health...</p>
<p class="right">Read More</p>
</article>
<div id="baroverlay"></div>
</body>
</html>
The CSS: http://plnkr.co/edit/arJTFnQpEmJH7WZtFt72
body {
background-color: #000;
background-image: url('buckstop_background.jpg');
background-attachment: fixed;
background-size: 100%;
color: #FFF;
font-size: 18px;
}
html, body {
height: 100%;
}
h1 {
font-size: 30px;
}
h2 {
font-size: 20px;
}
#wrapper {
width: 600px;
min-height: 100%;
}
#maininfo {
background-color: rgba(0, 0, 0, 0.85);
color: #FFF;
overflow: auto;
position: fixed;
top: 0;
left: 50px;
width: 560px;
padding: 20px 20px 170px 20px;
}
#coverimg {
width: 560px;
margin-right: auto;
margin-left: auto;
}
#logo {
position: fixed;
top: 260px;
left: 450px;
z-index: 1;
}
#baroverlay {
width: 100%;
height: 80px;
position: fixed;
top: 248px;
background-color: rgba(66, 17, 24, 0.8);
}
#mainnav {
color: #FFF;
font-size: 24px;
text-align: center;
width: 560px;
word-spacing: 40px;
margin: 10px 0;
}
#maincontent {
margin: 20px 0;
}
#mainnav li {
display: inline;
width: 20px;
text-align: center;
}
#mainnav a:link, #mainnav a:visited {
color: #FFF;
text-decoration: none;
}
#mainnav a:hover {
color: #892332; /* Burgundy */
text-decoration: none;
}
#storyinfo {
background-color: rgba(0, 0, 0, 0.85);
color: #FFF;
font-size: 16px;
width: 255px;
position: relative;
margin-top: -170px;
left: 50px;
height: 170px;
clear: both;
padding: 20px;
}
.infolinks a:link, #storyinfo a:visited {
color: #892332; /* Burgundy */
text-decoration: none;
}
.infolinks a:hover {
color: #892332; /* Burgundy */
text-decoration: none;
font-style: italic;
}
#menuinfo {
background-color: rgba(0, 0, 0, 0.85);
color: #FFF;
font-size: 16px;
width: 255px;
position: relative;
margin-top: -170px;
bottom: 0;
left: 355px;
height: 170px;
clear: both;
padding: 20px;
}
.quote {
color: #FFF;
font-size: 30px;
}
.center {
text-align: center;
}
.right {
text-align: right;
}
just change this:
#baroverlay {
width: 100%;
height: 80px;
position: fixed;
top: 248px;
background-color: rgba(66, 17, 24, 0.8);
}
with this:
#baroverlay {
width: 100%;
height: 80px;
position: fixed;
bottom:0;
background-color: rgba(66, 17, 24, 0.8);
}
here's a plunker.
By the way you can create a plunker with multiple files.
Hope this help.