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.
Related
This is my first time writing in html and css, so sorry if it's confusing and dumb.
I'm trying to make that sticks to the bottom and covers the length of the page, the problem is that i tried everything i could, from padding to width:100% other thant searching online, what can i do?
I'm using angular and i have installed bootstrap, please don't hesitate to ask any question or to ask me to explain myself (i'm not a native speaker), have a nice day and thank you!
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;600;700&display=swap');
body {
width: 100%;
height: 100%;
line-height: 1;
font-family: 'Poppins', sans-serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
max-width: 2270px;
margin: 0 auto;
}
.row {
display: flex;
flex-wrap: wrap;
}
ul {
list-style: none;
}
.footer {
background-color: #24262b;
padding: 20px 0;
}
.footer-col {
width: 25%;
padding: 0;
}
.footer-col h4 {
font-size: 18px;
color: #ffffff;
text-transform: capitalize;
margin-bottom: 35px;
font-weight: 500;
position: relative;
}
.footer-col h4::before {
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: #e91e63;
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: #ffffff;
text-decoration: none;
font-weight: 300;
color: #bbbbbb;
display: block;
transition: all 0.3s ease;
}
.footer-col ul li a:hover {
color: #ffffff;
padding-left: 8px;
}
.footer-col .social-links a {
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(255, 255, 255, 0.2);
margin: 0 10px 10px 0;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #ffffff;
transition: all 0.5s ease;
}
.footer-col .social-links a:hover {
color: #24262b;
background-color: #ffffff;
}
.siteFooterBar {
position: fixed;
bottom: 0;
padding-top: 10px;
width: 100%;
box-shadow: 0px 0px 25px rgb(207, 207, 207);
height: 78px;
color: #9B9B9B;
background: #F3F3F3;
}
.content {
display: block;
padding: 10px;
margin: 0px auto;
text-align: center;
font: 25px Georgia, "Times New Roman", Times, serif;
font-size: 14px;
width: 300px;
display: flex;
}
.foot {
display: inline;
line-height: 70px;
}
.content img {
height: 150px;
width: 150px;
float: left;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-webkit-transition: all .6s ease-in-out;
transition: 0.6s;
}
.content img:hover {
filter: invert(400%);
filter: brightness(4);
-webkit-filter: grayscale(-100);
-webkit-transform: scale(1.10);
}
/*responsive*/
#media(max-width: 100%) {
.footer-col {
width: 100%;
margin-bottom: 0px;
}
}
#media(max-width: 100%) {
.footer-col {
width: 100%;
}
}
<footer class="footer">
<div class="container">
<div class="row">
<div class="footer-col">
<div class="content">
<a href="#">
<img src="https://i.imgur.com/1yvwx9I.png">
</a>
</div>
</div>
<div class="footer-col">
<h4>Azienda</h4>
<ul>
<li>Chi Siamo</li>
<li>Contattaci</li>
<li>Placeholder</li>
<li>PlaceHolder</li>
</ul>
</div>
<div class="footer-col">
<h4>Aiuto</h4>
<ul>
<li>FAQ</li>
<li>Consegne</li>
<li>Reso</li>
<li>Informatica privacy</li>
</ul>
</div>
<div class="footer-col">
<h4>Seguici su</h4>
<div class="social-links">
<i class="fab fa-facebook-f"></i>
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-linkedin-in"></i>
</div>
</div>
</div>
</div>
</footer>
The standard way to align a footer at the bottom of a webpage is just by setting it to position: relative;. However, this entails that there is more content that is equal to or greater than the viewport height. Hence, aligning the footer after the content and at the bottom.
If you don't have content, use position: absolute; on footer. Then you can set bottom: 0px; to get it at the bottom. Then set left and right to 0 to get it the full width. See below.
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;600;700&display=swap');
body {
width: 100%;
height: 100%;
line-height: 1;
font-family: 'Poppins', sans-serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
max-width: 2270px;
margin: 0 auto;
}
.row {
display: flex;
flex-wrap: wrap;
}
ul {
list-style: none;
}
/* new */
footer {
position: absolute;
bottom: 0px;
right: 0px;
left: 0px;
}
/* end new */
.footer {
background-color: #24262b;
padding: 20px 0;
}
.footer-col {
width: 25%;
padding: 0;
}
.footer-col h4 {
font-size: 18px;
color: #ffffff;
text-transform: capitalize;
margin-bottom: 35px;
font-weight: 500;
position: relative;
}
.footer-col h4::before {
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: #e91e63;
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: #ffffff;
text-decoration: none;
font-weight: 300;
color: #bbbbbb;
display: block;
transition: all 0.3s ease;
}
.footer-col ul li a:hover {
color: #ffffff;
padding-left: 8px;
}
.footer-col .social-links a {
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(255, 255, 255, 0.2);
margin: 0 10px 10px 0;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #ffffff;
transition: all 0.5s ease;
}
.footer-col .social-links a:hover {
color: #24262b;
background-color: #ffffff;
}
.siteFooterBar {
position: fixed;
bottom: 0;
padding-top: 10px;
width: 100%;
box-shadow: 0px 0px 25px rgb(207, 207, 207);
height: 78px;
color: #9B9B9B;
background: #F3F3F3;
}
.content {
display: block;
padding: 10px;
margin: 0px auto;
text-align: center;
font: 25px Georgia, "Times New Roman", Times, serif;
font-size: 14px;
width: 300px;
display: flex;
}
.foot {
display: inline;
line-height: 70px;
}
.content img {
height: 150px;
width: 150px;
float: left;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-webkit-transition: all .6s ease-in-out;
transition: 0.6s;
}
.content img:hover {
filter: invert(400%);
filter: brightness(4);
-webkit-filter: grayscale(-100);
-webkit-transform: scale(1.10);
}
/*responsive*/
#media(max-width: 100%) {
.footer-col {
width: 100%;
margin-bottom: 0px;
}
}
#media(max-width: 100%) {
.footer-col {
width: 100%;
}
}
<main>
fooo
</main>
<footer class="footer">
<div class="container">
<div class="row">
<div class="footer-col">
<div class="content">
<a href="#">
<img src="https://i.imgur.com/1yvwx9I.png">
</a>
</div>
</div>
<div class="footer-col">
<h4>Azienda</h4>
<ul>
<li>Chi Siamo</li>
<li>Contattaci</li>
<li>Placeholder</li>
<li>PlaceHolder</li>
</ul>
</div>
<div class="footer-col">
<h4>Aiuto</h4>
<ul>
<li>FAQ</li>
<li>Consegne</li>
<li>Reso</li>
<li>Informatica privacy</li>
</ul>
</div>
<div class="footer-col">
<h4>Seguici su</h4>
<div class="social-links">
<i class="fab fa-facebook-f"></i>
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-linkedin-in"></i>
</div>
</div>
</div>
</div>
</footer>
https://sagarj2021.github.io/first-website/
This is my website but it only open fullscreen in destop of my laptop. It does not open in fullscreen in smartphones destop as well as in normal search. (Actully in smartphone right side is 50% of white blank color). I dont know how to fix this issue..
I have given my code also,
so please can you help mi ?
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
.hero {
height: 100vh;
width: 100%;
background-color: black;
background-size: cover;
background-position: center;
}
nav {
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 45px;
padding-left: 8%;
padding-right: 8%;
}
.logo {
color: white;
font-size: 35px;
letter-spacing: 1px;
cursor: pointer;
}
span {
color: red;
}
nav ul li {
list-style-type: none;
display: inline-block;
padding: 10px 25px;
}
nav ul li a {
color: white;
text-decoration: none;
font-weight: bold;
text-transform: capitalize;
}
nav ul li a:hover {
color: red;
transition: .4s;
}
.btn {
background-color: red;
color: white;
text-decoration: none;
border: 2px solid transparent;
font-weight: bold;
padding: 10px 25px;
border-radius: 30px;
transition: transform .4s;
}
.btn:hover {
transform: scale(1.2);
}
.content {
position: absolute;
top: 50%;
left: 8%;
transform: translateY(-50%);
}
h1 {
color: white;
margin: 20px 0px 20px;
font-size: 75px;
}
h3 {
color: white;
font-size: 25px;
margin-bottom: 50px;
}
h4 {
color: #fcfc;
letter-spacing: 2px;
font-size: 20px;
}
.newslatter form {
width: 380px;
max-width: 100%;
position: relative;
}
.newslatter form input:first-child {
display: inline-block;
width: 100%;
padding: 14px 130px 14px 15px;
border: 2px solid #f9004d;
outline: none;
border-radius: 30px;
}
.newslatter form input:last-child {
position: absolute;
display: inline-block;
outline: none;
border: none;
padding: 10px 30px;
border-radius: 30px;
background-color: #f9004d;
color: white;
box-shadow: 0px 0px 5px #000, 0px 0px 15px #858585;
top: 6px;
right: 6px;
}
.about {
width: 100%;
padding: 100px 0px;
background-color: #191919;
}
.about img {
height: auto;
width: 430px;
}
.about-text {
width: 550px;
}
.main {
width: 1130px;
max-width: 95%;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-around;
}
.about-text h2 {
color: white;
font-size: 75px;
text-transform: capitalize;
margin-bottom: 20px;
}
.about-text h5 {
color: white;
letter-spacing: 2px;
font-size: 22px;
margin-bottom: 25px;
text-transform: capitalize;
}
.about-text p {
color: #fcfc;
letter-spacing: 1px;
line-height: 28px;
font-size: 18px;
margin-bottom: 45px;
}
button {
background-color: #f9004d;
color: white;
text-decoration: none;
border: 2px solid transparent;
font-weight: bold;
padding: 13px 30px;
border-radius: 30px;
transition: .4s;
}
button:hover {
background-color: transparent;
border: 2px solid #f9004d;
cursor: pointer;
}
.service {
background: #101010;
width: 100%;
padding: 100px 0px;
}
.title h2 {
color: white;
font-size: 75px;
width: 1130px;
margin: 30px auto;
text-align: center;
}
.box {
display: flex;
justify-content: center;
align-items: center;
min-height: 400px;
}
.card {
height: 365px;
width: 335px;
padding: 20px 35px;
background: #191919;
border-radius: 20px;
margin: 15px;
position: relative;
overflow: hidden;
text-align: center;
}
.card i {
font-size: 50px;
display: block;
text-align: center;
margin: 25px 0px;
color: #f9004d;
}
h5 {
color: white;
font-size: 23px;
margin-bottom: 15px;
}
.pra p {
color: #fcfc;
font-size: 16px;
line-height: 27px;
margin-bottom: 25px;
}
.card .button {
background-color: #f9004d;
color: white;
text-decoration: none;
border: 2px solid transparent;
font-weight: bold;
padding: 9px 22px;
border-radius: 30px;
transition: .4s;
}
.card .button:hover {
background-color: transparent;
border: 2px solid #f9004d;
cursor: pointer;
}
.contact-me {
width: 100%;
height: 290px;
background: #191919;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
}
.contact-me p {
color: white;
font-size: 30px;
font-weight: bold;
margin-bottom: 25px;
}
.contact-me .button-two {
background-color: #f9004d;
color: white;
text-decoration: none;
border: 2px solid transparent;
font-weight: bold;
padding: 13px 30px;
border-radius: 30px;
transition: .4s;
}
.contact-me .button-two:hover {
background-color: transparent;
border: 2px solid #f9004d;
cursor: pointer;
}
footer {
position: relative;
width: 100%;
height: 400px;
background: #101010;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
footer p:nth-child(1) {
font-size: 30px;
color: white;
margin-bottom: 20px;
font-weight: bold;
}
footer p:nth-child(2) {
color: white;
font-size: 17px;
width: 500px;
text-align: center;
line-height: 26px;
}
.social {
display: flex;
}
.social a {
width: 45px;
height: 45px;
display: flex;
align-items: center;
justify-content: center;
background: #f9004d;
border-radius: 50%;
margin: 22px 10px;
color: white;
text-decoration: none;
font-size: 20px;
}
.social a:hover {
transform: scale(1.3);
transition: .3s;
}
.end {
position: absolute;
color: #f9004d;
bottom: 35px;
font-size: 14px;
}
<!--Sagar personal website-->
<!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">
<link rel="stylesheet" href="personalprofile.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=Roboto&display=swap" rel="stylesheet">
<script src="https://kit.fontawesome.com/34d51c031e.js" crossorigin="anonymous"></script>
<title>Personal website</title>
</head>
<body>
<div class="hero">
<nav>
<h2 class="logo">Portfo<span>lio</span></h2>
<ul>
<li>Home</li>
<li>About</li>
<li>Gallery</li>
<li>Contact</li>
</ul>
Blog
</nav>
<div class="content">
<h4>hello, my name is</h4>
<h1>Sagar<span>Jadhav</span></h1>
<h3>I'm a Web Developer.</h3>
<div class="newslatter">
<form action="">
<input type="email" name="email" id="mail" placeholder="Enter Your Email">
<input type="submit" name="submit" value="Let start">
</form>
</div>
</div>
</div>
<!---About section start-->
<section class="about">
<div class="main">
<img src="#" alt="">
<div class="about-text">
<h2>About Me</h2>
<h5>Developer & Designer</h5>
<p>
I am a front-end web developer. I can provide clean code and pixel perfect design. I also make the website more & more interactive with web animations. I can provide clean code and pixel perfect design. I also make the website more & more interactive
with web animations. A responsive design makes your website accessible to all users, regardless of their devices.
</p>
<button type="button">Let's Talk</button>
</div>
</div>
</section>
<!--Service section start-->
<div class="service">
<div class="title">
<h2>Our Services</h2>
</div>
<div class="box">
<div class="card">
<i class="fas fa-bars"></i>
<h5>Web Development</h5>
<div class="pra">
<p>Every website should be built with two primary goals: Firstly, it needs to work across all devices. Secondly, it needs to be fast as possible. </p>
<p style="text-align: center;">
<a class="button" href="#">Read More</a>
</p>
</div>
</div>
<div class="card">
<i class="fa-regular fa-user"></i>
<h5>Web Development</h5>
<div class="pra">
<p>Every website should be built with two primary goals: Firstly, it needs to work across all devices. Secondly, it needs to be fast as possible. </p>
<p style="text-align: center;">
<a class="button" href="#">Read More</a>
</p>
</div>
</div>
<div class="card">
<i class="fa-regular fa-bell"></i>
<h5>Web Development</h5>
<div class="pra">
<p>Every website should be built with two primary goals: Firstly, it needs to work across all devices. Secondly, it needs to be fast as possible. </p>
<p style="text-align: center;">
<a class="button" href="#">Read More</a>
</p>
</div>
</div>
</div>
</div>
<!--Contact Me-->
<div class="contact-me">
<p>For any help.</p>
<a class="button-two" href="#">Contact Me</a>
</div>
<!--Footer start-->
<footer>
<p>Sagar Jadhav</p>
<p>For coding and syber security related update follow my blog chennal - please click on the link below to follow me:
</p>
<div class="social">
<i class="fa-brands fa-facebook"></i>
<i class="fa-brands fa-instagram"></i>
<i class="fa-brands fa-linkedin"></i>
</div>
<p class="end">CopyRight By Sagar Jadhav</p>
</footer>
</body>
</html>
Replace this code in your code
.title h2 {
color: white;
font-size: 75px;
width: 130px;
margin: 30px auto;
text-align: center;
}
I'm trying to make my website able to scroll down when in 100% but it isn't working, the only way to view the whole page is if I zoom out to 80% Below is all the CSS and HTML. I've tried putting an Overflow:scroll for the main body of the page but it still didn't work. I still had to zoom out to view the page.
#charset "utf-8";
/* CSS Document */
body {
margin: 0;
}
#mainPage {
height: 1000px;
width: 100%;
background-color: #1e1e1e;
position: absolute;
z-index: -5;
}
#navBar {
height: 70px;
width: 100%;
Background-color: #1f1f1f;
position: fixed;
z-index: 1;
}
ul {
margin: 0;
list-style-type: none;
color: white;
display: block;
padding-top: 20px;
padding-left: 350px;
font-family: "Economica", sans-serif;
font-size: 28px;
text-decoration: none;
position: relative;
}
ul li {
display: inline;
text-decoration: none;
}
#Logo {
margin-left: 70px;
border: 0;
background-color: #1f1f1f;
font-family: "Economica";
font-size: 49px;
float: left;
color: white;
margin-top: 5px;
font-weight: bold;
}
#google {
margin-left: 45px;
}
img {
opacity: 0.3;
position: relative;
z-index: -3;
}
a {
text-decoration: none;
color: white;
}
#Events {
top: 120px;
left: 50px;
background-color: black;
width: 245px;
height: 370px;
position: absolute;
border-radius: 21px;
z-index: -2;
}
#eventList {
padding-top: 130px;
padding-left: 30px;
}
.event {
display: block;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 40px;
}
.lines {
width: 200px;
margin: 0;
margin-top: 6px;
margin-bottom: 0;
}
.highlight {
Padding-top: 20px;
padding-bottom: 17px;
padding-left: 44px;
padding-right: 44px;
}
#select a:hover {
background-color: #383838;
transition: ease 0.2s;
}
#eventList a:hover {
background-color: rgba(255, 255, 255, 0.4);
color: #ffe700;
transition: ease 0.7s;
}
.eventLight {
padding-right: 70px;
padding-top: 17px;
border-radius: 6px;
padding-left: 10px;
padding-bottom: 3px;
}
#upComing {
height: 300px;
position: absolute;
padding-left: 450px;
font-family: "economica";
font-size: 65px;
color: white;
padding-top: 175px;
}
#box {
background-color: rgba(255, 255, 255, 0.3);
width: 800px;
height: 195px;
border-radius: 10px;
font-size: 35px;
padding-left: 10px;
}
#entireBox {
width: 810px;
height: 195px;
border-radius: 17px;
border: 5px solid black;
margin-top: 40px;
}
#drake {
background-color: rgba(255, 255, 255, 0.3);
width: 410px;
height: 135px;
border-radius: 10px;
font-family: "economica";
font-size: 35px;
color: white;
padding-left: 15px;
padding-top: 5px;
}
#drakeBorder {
width: 425px;
height: 140px;
border-radius: 15px;
border: 5px solid black;
}
#ovo {
height: 200px;
position: absolute;
padding-left: 450px;
padding-top: 545px;
}
#circle1 {
width: 10px;
height: 10px;
background-color: white;
position: absolute;
margin-left: 485px;
margin-top: 30px;
border: 3px solid black;
border-radius: 50px;
}
#circle1 {
width: 10px;
height: 10px;
background-color: white;
position: absolute;
margin-left: 485px;
margin-top: 30px;
border: 3px solid black;
border-radius: 50px;
}
#circle2 {
width: 10px;
height: 10px;
background-color: white;
position: absolute;
margin-left: 635px;
margin-top: 30px;
border: 3px solid black;
border-radius: 50px;
}
#circle3 {
width: 10px;
height: 10px;
background-color: white;
position: absolute;
margin-left: 829px;
margin-top: 30px;
border: 3px solid black;
border-radius: 50px;
}
#circle4 {
width: 10px;
height: 10px;
background-color: white;
position: absolute;
margin-left: 1010px;
margin-top: 30px;
border: 3px solid black;
border-radius: 50px;
}
#wembley {
position: absolute;
border: 0;
width: 95px;
height: 37px;
margin-top: -27px;
opacity: 1;
}
#mobile {
margin: 0;
margin-top: 0;
width: 250px;
height: 1000px;
background-color: #333333;
margin-left: -600px;
position: absolute;
z-index: -5;
}
.slider {
border: none;
background-color: white;
height: 3px;
width: 45px;
margin-top: 10px;
border-radius: 15px;
transition: ease 1s;
}
#slideButton {
background-color: rgba(255, 255, 255, 0);
border: 0;
margin-top: 12px;
margin-left: 15px;
padding-right: 7px;
padding-top: 7px;
position: fixed;
border-radius: 5px;
padding-left: 18px;
visibility: hidden;
}
#slideButton:focus {
outline: none;
}
#slideButton:hover {
background-color: rgba(100, 100, 100, 0.1);
transition: ease 0.6s;
}
#listMobile {
margin-top: 100px;
margin-left: -318px;
}
.smallList {
display: block;
padding-top: 15px;
padding-bottom: 15px;
padding-left: 0;
font-size: 45px;
}
#line {
position: fixed;
margin-top: 83px;
width: 250px;
border: none;
height: 2px;
background-color: #646464;
}
.rainbow-button {
width: 134px;
height: 70px;
background-image: linear-gradient(90deg, #00C0FF 0%, #FFCF00 49%, #FC4F4F 80%, #00C0FF 100%);
display: flex;
justify-content: center;
font-size: 28px;
margin-left: 350px;
margin-top: 0;
font-family: economica;
position: fixed;
color: #ffe700;
}
.rainbow-button:after {
content: attr(title);
width: 134px;
height: 67px;
background-color: #1f1f1f;
display: flex;
align-items: center;
justify-content: center;
}
.rainbow-button:hover {
background-color: #383838;
animation: slidebg 2s linear infinite;
}
#keyframes slidebg {
to {
background-position: 20vw;
}
}
body {
overflow: hidden;
}
.holder {
width: 500px;
height: 250px;
position: fixed;
margin-top: -220px;
}
.holder .circle {
border-radius: 100% 100% 0 0;
position: absolute;
bottom: 0;
left: 0;
transform: translateX(-50%);
transform-origin: bottom center;
}
.holder .circle:nth-child(1) {
border: 2px solid white;
border-bottom: none;
border-radius: 0px 0px 0 0;
width: 0px;
height: 0px;
z-index: 15;
animation: circle-1 10s infinite ease-in-out;
}
#keyframes circle-1 {
0% {
transform: translateX(-50%) rotate(0deg);
}
100% {
transform: translateX(-50%) rotate(-360deg);
}
}
.holder .circle:nth-child(2) {
border: 2px solid white;
border-bottom: none;
border-radius: 11px 11px 0 0;
width: 11px;
height: 5.5px;
z-index: 14;
animation: circle-2 10s infinite ease-in-out;
}
#keyframes circle-2 {
0% {
transform: translateX(-50%) rotate(0deg);
}
100% {
transform: translateX(-50%) rotate(-720deg);
}
}
.holder .circle:nth-child(3) {
border: 2px solid white;
border-bottom: none;
border-radius: 22px 22px 0 0;
width: 22px;
height: 11px;
z-index: 13;
animation: circle-3 10s infinite ease-in-out;
}
#keyframes circle-3 {
0% {
transform: translateX(-50%) rotate(0deg);
}
100% {
transform: translateX(-50%) rotate(-1080deg);
}
}
.holder .circle:nth-child(4) {
border: 2px solid white;
border-bottom: none;
border-radius: 33px 33px 0 0;
width: 33px;
height: 16.5px;
z-index: 12;
animation: circle-4 10s infinite ease-in-out;
}
#keyframes circle-4 {
0% {
transform: translateX(-50%) rotate(0deg);
}
100% {
transform: translateX(-50%) rotate(-1440deg);
}
}
.holder .circle:nth-child(5) {
border: 2px solid white;
border-bottom: none;
border-radius: 44px 44px 0 0;
width: 44px;
height: 22px;
z-index: 11;
animation: circle-5 10s infinite ease-in-out;
}
#keyframes circle-5 {
0% {
transform: translateX(-50%) rotate(0deg);
}
100% {
transform: translateX(-50%) rotate(-1800deg);
}
}
.holder .circle:nth-child(6) {
border: 2px solid white;
border-bottom: none;
border-radius: 55px 55px 0 0;
width: 55px;
height: 27.5px;
z-index: 10;
animation: circle-6 10s infinite ease-in-out;
}
#keyframes circle-6 {
0% {
transform: translateX(-50%) rotate(0deg);
}
100% {
transform: translateX(-50%) rotate(-2160deg);
}
}
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="IceArenaHome.css">
<title>
Ice Arena
</title>
<link href="https://fonts.googleapis.com/css?family=Economica" rel="stylesheet">
</head>
<body>
<div id="mainPage">
<div id="ovo">
<div id="drakeBorder">
<div id="drake">
Be here when rappers <span style="color:#ffe700;">X</span> and <span style="color:#ffe700;">Y</span> will be performing live on stage.
</div>
</div>
</div>
<div id="upComing">
Upcoming Events:
<div id="entireBox">
<div id="box">
Make sure you are here when <br>these two teams clash in the<span style="opacity:0;">.............<!-- i used these full stops to push my text to the right --> ......</span> <span style="color:#ffe700; font-size:40px;">Manchester United vs Ajax</span><br> biggest match in European <br> football the Europa league final.
</div>
</div>
</div>
<img src="http://xoio.de/wp-content/uploads/2013/08/GMP_Tokyo_Stadium_Concert_interiorvisual_by_xoio1.jpg" alt="concert stadium" style="width:100%; position:absolute; padding-top:70px; height:930px">
<div id="navBar">
<div id="circle1" class="circles">
</div>
<div id="circle2" class="circles">
</div>
<div id="circle3" class="circles">
</div>
<div id="circle4" class="circles">
</div>
<div id="Logo">
<div class="holder">
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
</div> <span id="google">Ice Arena</span>
</div>
<ul id="select">
<li>
<a class="highlight" style="color:#ffe700;">Home
</a> </li>
<li><a class="highlight" href="IceArenaGallery.html">
Gallery
</a> </li>
<li> <a class="highlight" href="IceArenaOrderForm.html">
Order Form
</a> </li>
<li> <a class="highlight" href="#">
The Arena
</a></li>
<li><a class="highlight" href="#">
Contact Us
</a> </li>
</ul>
</div>
<ul id="eventList">
<li class="event"><a class="eventLight" href="#">
All<strong style="opacity:0;">.....................</strong>
</a>
<hr class="lines">
</li>
<li class="event"><a class="eventLight" href="#">
Sports <strong style="opacity:0;">.............</strong>
</a>
<hr class="lines"> </li>
<li class="event"><a class="eventLight" href="#">
Music<strong style="opacity:0;">...............</strong>
</a>
<hr class="lines">
</li>
<li class="event"><a class="eventLight" href="#">
Family<strong style="opacity:0;">..............</strong>
</a>
<hr class="lines">
</li>
<li class="event"><a class="eventLight" href="#">
Comedy<strong style="opacity:0;">............</strong>
</a>
<hr class="lines"> </li>
<li class="event"><a class="eventLight" href="#">
Performance<strong style="opacity:0;">...</strong>
</a></li>
</ul>
<div id="Events" style="opacity:0.4;">
</div>
</div>
</body>
</html>
Try add:
html{
overflow-y: scroll;
}
Css 'overflow-y: scroll' creates scroll, as you expects.
#charset "utf-8";
/* CSS Document */
body {
margin: 0;
}
html {
overflow-y: scroll;
}
#mainPage {
height: 1000px;
width: 100%;
background-color: #1e1e1e;
position: absolute;
z-index: -5;
}
#navBar {
height: 70px;
width: 100%;
Background-color: #1f1f1f;
position: fixed;
z-index: 1;
}
ul {
margin: 0;
list-style-type: none;
color: white;
display: block;
padding-top: 20px;
padding-left: 350px;
font-family: "Economica", sans-serif;
font-size: 28px;
text-decoration: none;
position: relative;
}
ul li {
display: inline;
text-decoration: none;
}
#Logo {
margin-left: 70px;
border: 0;
background-color: #1f1f1f;
font-family: "Economica";
font-size: 49px;
float: left;
color: white;
margin-top: 5px;
font-weight: bold;
}
#google {
margin-left: 45px;
}
img {
opacity: 0.3;
position: relative;
z-index: -3;
}
a {
text-decoration: none;
color: white;
}
#Events {
top: 120px;
left: 50px;
background-color: black;
width: 245px;
height: 370px;
position: absolute;
border-radius: 21px;
z-index: -2;
}
#eventList {
padding-top: 130px;
padding-left: 30px;
}
.event {
display: block;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 40px;
}
.lines {
width: 200px;
margin: 0;
margin-top: 6px;
margin-bottom: 0;
}
.highlight {
Padding-top: 20px;
padding-bottom: 17px;
padding-left: 44px;
padding-right: 44px;
}
#select a:hover {
background-color: #383838;
transition: ease 0.2s;
}
#eventList a:hover {
background-color: rgba(255, 255, 255, 0.4);
color: #ffe700;
transition: ease 0.7s;
}
.eventLight {
padding-right: 70px;
padding-top: 17px;
border-radius: 6px;
padding-left: 10px;
padding-bottom: 3px;
}
#upComing {
height: 300px;
position: absolute;
padding-left: 450px;
font-family: "economica";
font-size: 65px;
color: white;
padding-top: 175px;
}
#box {
background-color: rgba(255, 255, 255, 0.3);
width: 800px;
height: 195px;
border-radius: 10px;
font-size: 35px;
padding-left: 10px;
}
#entireBox {
width: 810px;
height: 195px;
border-radius: 17px;
border: 5px solid black;
margin-top: 40px;
}
#drake {
background-color: rgba(255, 255, 255, 0.3);
width: 410px;
height: 135px;
border-radius: 10px;
font-family: "economica";
font-size: 35px;
color: white;
padding-left: 15px;
padding-top: 5px;
}
#drakeBorder {
width: 425px;
height: 140px;
border-radius: 15px;
border: 5px solid black;
}
#ovo {
height: 200px;
position: absolute;
padding-left: 450px;
padding-top: 545px;
}
#circle1 {
width: 10px;
height: 10px;
background-color: white;
position: absolute;
margin-left: 485px;
margin-top: 30px;
border: 3px solid black;
border-radius: 50px;
}
#circle1 {
width: 10px;
height: 10px;
background-color: white;
position: absolute;
margin-left: 485px;
margin-top: 30px;
border: 3px solid black;
border-radius: 50px;
}
#circle2 {
width: 10px;
height: 10px;
background-color: white;
position: absolute;
margin-left: 635px;
margin-top: 30px;
border: 3px solid black;
border-radius: 50px;
}
#circle3 {
width: 10px;
height: 10px;
background-color: white;
position: absolute;
margin-left: 829px;
margin-top: 30px;
border: 3px solid black;
border-radius: 50px;
}
#circle4 {
width: 10px;
height: 10px;
background-color: white;
position: absolute;
margin-left: 1010px;
margin-top: 30px;
border: 3px solid black;
border-radius: 50px;
}
#wembley {
position: absolute;
border: 0;
width: 95px;
height: 37px;
margin-top: -27px;
opacity: 1;
}
#mobile {
margin: 0;
margin-top: 0;
width: 250px;
height: 1000px;
background-color: #333333;
margin-left: -600px;
position: absolute;
z-index: -5;
}
.slider {
border: none;
background-color: white;
height: 3px;
width: 45px;
margin-top: 10px;
border-radius: 15px;
transition: ease 1s;
}
#slideButton {
background-color: rgba(255, 255, 255, 0);
border: 0;
margin-top: 12px;
margin-left: 15px;
padding-right: 7px;
padding-top: 7px;
position: fixed;
border-radius: 5px;
padding-left: 18px;
visibility: hidden;
}
#slideButton:focus {
outline: none;
}
#slideButton:hover {
background-color: rgba(100, 100, 100, 0.1);
transition: ease 0.6s;
}
#listMobile {
margin-top: 100px;
margin-left: -318px;
}
.smallList {
display: block;
padding-top: 15px;
padding-bottom: 15px;
padding-left: 0;
font-size: 45px;
}
#line {
position: fixed;
margin-top: 83px;
width: 250px;
border: none;
height: 2px;
background-color: #646464;
}
.rainbow-button {
width: 134px;
height: 70px;
background-image: linear-gradient(90deg, #00C0FF 0%, #FFCF00 49%, #FC4F4F 80%, #00C0FF 100%);
display: flex;
justify-content: center;
font-size: 28px;
margin-left: 350px;
margin-top: 0;
font-family: economica;
position: fixed;
color: #ffe700;
}
.rainbow-button:after {
content: attr(title);
width: 134px;
height: 67px;
background-color: #1f1f1f;
display: flex;
align-items: center;
justify-content: center;
}
.rainbow-button:hover {
background-color: #383838;
animation: slidebg 2s linear infinite;
}
#keyframes slidebg {
to {
background-position: 20vw;
}
}
body {
overflow: hidden;
}
.holder {
width: 500px;
height: 250px;
position: fixed;
margin-top: -220px;
}
.holder .circle {
border-radius: 100% 100% 0 0;
position: absolute;
bottom: 0;
left: 0;
transform: translateX(-50%);
transform-origin: bottom center;
}
.holder .circle:nth-child(1) {
border: 2px solid white;
border-bottom: none;
border-radius: 0px 0px 0 0;
width: 0px;
height: 0px;
z-index: 15;
animation: circle-1 10s infinite ease-in-out;
}
#keyframes circle-1 {
0% {
transform: translateX(-50%) rotate(0deg);
}
100% {
transform: translateX(-50%) rotate(-360deg);
}
}
.holder .circle:nth-child(2) {
border: 2px solid white;
border-bottom: none;
border-radius: 11px 11px 0 0;
width: 11px;
height: 5.5px;
z-index: 14;
animation: circle-2 10s infinite ease-in-out;
}
#keyframes circle-2 {
0% {
transform: translateX(-50%) rotate(0deg);
}
100% {
transform: translateX(-50%) rotate(-720deg);
}
}
.holder .circle:nth-child(3) {
border: 2px solid white;
border-bottom: none;
border-radius: 22px 22px 0 0;
width: 22px;
height: 11px;
z-index: 13;
animation: circle-3 10s infinite ease-in-out;
}
#keyframes circle-3 {
0% {
transform: translateX(-50%) rotate(0deg);
}
100% {
transform: translateX(-50%) rotate(-1080deg);
}
}
.holder .circle:nth-child(4) {
border: 2px solid white;
border-bottom: none;
border-radius: 33px 33px 0 0;
width: 33px;
height: 16.5px;
z-index: 12;
animation: circle-4 10s infinite ease-in-out;
}
#keyframes circle-4 {
0% {
transform: translateX(-50%) rotate(0deg);
}
100% {
transform: translateX(-50%) rotate(-1440deg);
}
}
.holder .circle:nth-child(5) {
border: 2px solid white;
border-bottom: none;
border-radius: 44px 44px 0 0;
width: 44px;
height: 22px;
z-index: 11;
animation: circle-5 10s infinite ease-in-out;
}
#keyframes circle-5 {
0% {
transform: translateX(-50%) rotate(0deg);
}
100% {
transform: translateX(-50%) rotate(-1800deg);
}
}
.holder .circle:nth-child(6) {
border: 2px solid white;
border-bottom: none;
border-radius: 55px 55px 0 0;
width: 55px;
height: 27.5px;
z-index: 10;
animation: circle-6 10s infinite ease-in-out;
}
#keyframes circle-6 {
0% {
transform: translateX(-50%) rotate(0deg);
}
100% {
transform: translateX(-50%) rotate(-2160deg);
}
}
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="IceArenaHome.css">
<title>
Ice Arena
</title>
<link href="https://fonts.googleapis.com/css?family=Economica" rel="stylesheet">
</head>
<body>
<div id="mainPage">
<div id="ovo">
<div id="drakeBorder">
<div id="drake">
Be here when rappers <span style="color:#ffe700;">X</span> and <span style="color:#ffe700;">Y</span> will be performing live on stage.
</div>
</div>
</div>
<div id="upComing">
Upcoming Events:
<div id="entireBox">
<div id="box">
Make sure you are here when <br>these two teams clash in the<span style="opacity:0;">.............<!-- i used these full stops to push my text to the right --> ......</span> <span style="color:#ffe700; font-size:40px;">Manchester United vs Ajax</span><br> biggest match in European <br> football the Europa league final.
</div>
</div>
</div>
<img src="http://xoio.de/wp-content/uploads/2013/08/GMP_Tokyo_Stadium_Concert_interiorvisual_by_xoio1.jpg" alt="concert stadium" style="width:100%; position:absolute; padding-top:70px; height:930px">
<div id="navBar">
<div id="circle1" class="circles">
</div>
<div id="circle2" class="circles">
</div>
<div id="circle3" class="circles">
</div>
<div id="circle4" class="circles">
</div>
<div id="Logo">
<div class="holder">
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
</div> <span id="google">Ice Arena</span>
</div>
<ul id="select">
<li>
<a class="highlight" style="color:#ffe700;">Home
</a> </li>
<li><a class="highlight" href="IceArenaGallery.html">
Gallery
</a> </li>
<li> <a class="highlight" href="IceArenaOrderForm.html">
Order Form
</a> </li>
<li> <a class="highlight" href="#">
The Arena
</a></li>
<li><a class="highlight" href="#">
Contact Us
</a> </li>
</ul>
</div>
<ul id="eventList">
<li class="event"><a class="eventLight" href="#">
All<strong style="opacity:0;">.....................</strong>
</a>
<hr class="lines">
</li>
<li class="event"><a class="eventLight" href="#">
Sports <strong style="opacity:0;">.............</strong>
</a>
<hr class="lines"> </li>
<li class="event"><a class="eventLight" href="#">
Music<strong style="opacity:0;">...............</strong>
</a>
<hr class="lines">
</li>
<li class="event"><a class="eventLight" href="#">
Family<strong style="opacity:0;">..............</strong>
</a>
<hr class="lines">
</li>
<li class="event"><a class="eventLight" href="#">
Comedy<strong style="opacity:0;">............</strong>
</a>
<hr class="lines"> </li>
<li class="event"><a class="eventLight" href="#">
Performance<strong style="opacity:0;">...</strong>
</a></li>
</ul>
<div id="Events" style="opacity:0.4;">
</div>
</div>
</body>
</html>
Q1
How can I remove the white line under the navigation bar on section 1/2? I have tried changing the html layout incase I a line gap was the issue which caused this to occur. However, I have had no luck trying to resolve this problem.
Q2
How can I remove the white above the footer on section2?
body {
margin: 0;
padding: 0;
}
.navbar.navbar-default {
background-color: #4D5061;
height: 10vh;
z-index: 100;
}
.navbar.navbar-default ul {
list-style-type: none;
text-align: right;
}
.navbar.navbar-default ul li {
display: inline-block;
}
.dropdown-menu li {
text-align: center
}
.dropdown .dropdown-menu {
background-color: #4D5061;
}
.dropdown .dropdown-menu a {
color: white;
}
.navbar.navbar-default ul li a {
display: inline-block;
padding: 3.5vh 8px 4px;
color: white;
text-decoration: none;
font-size: 14pt;
font-family: 'Roboto', sans-serif;
}
.navbar.navbar-default ul li:after {
content: '';
position: absolute;
right: 50%;
bottom: 0;
left: 50%;
height: 3px;
background-color: #FFFFFF;
border-radius: 9px;
transition: all .2s;
}
.navbar.navbar-default ul li a:hover {
color: white;
background-color: rgba(20, 50, 40, 0.5)
}
.nav.navbar-nav,
.nav.navbar-nav>li {
float: none;
}
.navbar.navbar-default ul li:hover:after {
right: 0;
left: 0;
}
.navbar.navbar-default ul.dropdown-menu li,
.navbar.navbar-default ul.dropdown-menu li a {
position: relative;
display: block;
}
#logo {
padding-top: 2vh;
padding-left: 20px;
float: left;
}
.hero {
background: url("https://static.pexels.com/photos/7064/man-notes-macbook-computer.jpg") center center no-repeat;
;
background-attachment: fixed;
position: relative;
background-size: cover;
width: 100%;
max-width: 100%;
width: 100vw;
height: 100%;
}
section {
position: relative;
padding: 10vh 0 0;
min-height: 100vh;
}
.section1 {
height: 100vh;
text-align: center;
color: white;
}
.section2 {
background-color: dimgrey;
text-align: center;
color: white;
min-height: 90vh;
}
.fa-angle-down {
color: #4D5061;
position: absolute;
bottom: 0px;
}
.fa-angle-up {
color: #4D5061;
position: absolute;
bottom: 0px;
}
.footer {
height: 3vh;
background-color: #4D5061;
padding: 0;
right: 0;
bottom: 0;
left: 0;
}
.nav-title {
font-size: 14pt;
margin: 0;
top: 35px;
left: 8px;
width: 100%;
position: absolute;
text-align: center;
color: white;
font-family: 'Roboto', sans-serif;
}
.s1-welcome {
font-family: 'Roboto', sans-serif;
color: white;
font-size: 45pt;
font-size: 2.5em;
text-align: center;
margin: 0;
}
.footertext {
font-size: 14pt;
color: white;
font-family: 'Roboto', sans-serif;
text-align: center;
}
.contact-text {
font-size: 35pt;
font-weight: bold;
color: white;
font-family: 'Roboto', sans-serif;
text-align: center;
}
p {
font-size: 20pt;
color: white;
font-family: 'Roboto', sans-serif;
text-align: center;
}
.profile.box {
bottom: 0;
height: 50%;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 0;
width: 50%;
}
.shape {
border-radius: 25px;
display: inline-block;
background: #4D5061;
content: url(http://i1126.photobucket.com/albums/l611/ldocherty1/IMG_0730_zpsiz4dqc47.jpg);
color: white;
height: 250px;
margin: auto;
padding: 3px;
width: 250px;
}
.fa {
padding: 20px;
font-size: 20px;
text-align: center;
text-decoration: none;
margin: 7px 6px;
border-radius: 50%;
}
.fa:hover {
opacity: 0.7;
}
.fa-twitter {
background: #55ACEE;
color: white;
}
.fa-linkedin {
background: #007bb5;
color: white;
}
.icon-style {
position: relative;
top: 10px;
}
.arrow1 {
color: white;
position: relative;
}
#import url(http://fonts.googleapis.com/css?family=Montserrat:400,700);
#feedback-page {
text-align: center;
}
#form-main {
width: 100%;
float: left;
padding-top: 0px;
}
#form-div {
background-color: rgba(72, 72, 72, 0.4);
padding-left: 35px;
padding-right: 35px;
padding-top: 35px;
padding-bottom: 50px;
width: 850px;
height: 500px;
float: left;
left: 50%;
position: absolute;
margin-top: 30px;
margin-left: -260px;
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
}
.feedback-input {
color: #3c3c3c;
font-family: Helvetica, Arial, sans-serif;
font-weight: 500;
font-size: 18px;
border-radius: 0;
line-height: 22px;
background-color: #fbfbfb;
padding: 13px 13px 13px 54px;
margin-bottom: 10px;
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
border: 3px solid rgba(0, 0, 0, 0);
}
.feedback-input:focus {
background: #fff;
box-shadow: 0;
border: 3px solid #3498db;
color: #3498db;
outline: none;
padding: 13px 13px 13px 54px;
}
.focused {
color: #30aed6;
border: #30aed6 solid 3px;
}
#name {
background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#name:focus {
background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
background-size: 30px 30px;
background-position: 8px 5px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#email {
background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#email:focus {
background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#comment {
background-image: url(http://rexkirby.com/kirbyandson/images/comment.svg);
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
textarea {
width: 100%;
height: 150px;
line-height: 150%;
resize: vertical;
}
input:hover,
textarea:hover,
input:focus,
textarea:focus {
background-color: white;
}
#button-blue {
font-family: 'Montserrat', Arial, Helvetica, sans-serif;
float: left;
width: 100%;
border: #fbfbfb solid 4px;
cursor: pointer;
background-color: #3498db;
color: white;
font-size: 24px;
padding-top: 22px;
padding-bottom: 22px;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
transition: all 0.3s;
margin-top: -4px;
font-weight: 700;
}
#button-blue:hover {
background-color: rgba(0, 0, 0, 0);
color: #0493bd;
}
.submit:hover {
color: #3498db;
}
.ease {
width: 0px;
height: 74px;
background-color: #fbfbfb;
-webkit-transition: .3s ease;
-moz-transition: .3s ease;
-o-transition: .3s ease;
-ms-transition: .3s ease;
transition: .3s ease;
}
.submit:hover .ease {
width: 100%;
background-color: white;
}
#media only screen and (max-width: 580px) {
#form-div {
left: 3%;
margin-right: 3%;
width: 88%;
margin-left: 0;
padding-left: 3%;
padding-right: 3%;
}
}
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<h1 class="nav-title">Liam Docherty's Digital Portfolio</h1>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>Home
</li>
<li class="dropdown">
About Me <span class="caret"></span>
<ul class="dropdown-menu">
<li>Action
</li>
<li>Contact
</li>
<li>Something else here
</li>
<li>Separated link
</li>
<li>One more separated link
</li>
</ul>
</li>
<li class="dropdown">
Units <span class="caret"></span>
<ul class="dropdown-menu">
<li>Action
</li>
<li>Another action
</li>
<li>Something else here
</li>
<li>Separated link
</li>
<li>One more separated link
</li>
</ul>
</li>
<li>Clients
</li>
<li>Contact Me
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<section id="section1" class="section1">
<div class="hero">
<div class="profile box">
<div class="shape"></div>
</div>
</div>
<h2 class="s1-welcome">WELCOME TO MY PORTFOLIO</h2>
<div class="arrow1">
<i class="fa fa-angle-down" style="font-size:100px;"></i>
</div>
</section>
<section id="contact-me" class="contact_section section2">
<h2 class="contact-text">Get in touch</h2>
<p>Wanna get in touch or talk to me about a project?</p>
<p>Fill the form below or send an email to liam_docherty#outlook.com</p>
<div id="form-main">
<div id="form-div">
<form class="form" id="form1">
<p class="name">
<input name="name" type="text" class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" placeholder="Name" id="name" />
</p>
<p class="email">
<input name="email" type="text" class="validate[required,custom[email]] feedback-input" id="email" placeholder="Email" />
</p>
<p class="text">
<textarea name="text" class="validate[required,length[6,300]] feedback-input" id="comment" placeholder="Comment"></textarea>
</p>
<div class="submit">
<input type="submit" value="SEND" id="button-blue" />
<div class="ease"></div>
</div>
</form>
</div>
<div class="arrow2">
<i class="fa fa-angle-up" style="font-size:100px;"></i>
</div>
</section>
<script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<footer>
<div class="footer">
<h2 class="footertext">Copyright © 2017 Liam Docherty's Site. All rights reserved.</h2>
</div>
</footer>
</body>
</html>
These are your problem:
<h2 class="contact-text">Get in touch</h2>
<p>Wanna get in touch or talk to me about a project?</p>
<p>Fill the form below or send an email to liam_docherty#outlook.com</p>
Remove those and then bam it works. You are also missing a closing div in that section.
Although not a complete answer, I would recommend looking at these three lines and the CSS related. Also, you are using bootstrap so you should look at any styles that bootstrap might be applying.
if you remove space in section remove h2 margin you have space use padding is batter. please check i thing it's batter .
<body>
<style>
body {
margin: 0;
padding: 0;
}
.navbar.navbar-default {
background-color: #4D5061;
height: auto;
z-index: 100;
}
.navbar.navbar-default ul {
list-style-type: none;
text-align: right;
}
.navbar.navbar-default ul li {
display: inline-block;
}
.dropdown-menu li {
text-align: center
}
.dropdown .dropdown-menu {
background-color: #4D5061;
}
.navbar.navbar-default ul li ul {
display: none;
left: 0;
position: absolute;
top: 60px;
min-width: 240px;
z-index: 200;
}
.dropdown .dropdown-menu a {
color: white;
}
.navbar.navbar-default ul li a {
display: inline-block;
padding: 3.5vh 8px 4px;
color: white;
text-decoration: none;
font-size: 14pt;
font-family: 'Roboto', sans-serif;
}
.navbar.navbar-default ul li:after {
content: '';
position: absolute;
right: 50%;
bottom: 0;
left: 50%;
height: 3px;
background-color: #FFFFFF;
border-radius: 9px;
transition: all .2s;
}
.navbar.navbar-default ul li a:hover {
color: white;
background-color: rgba(20, 50, 40, 0.5)
}
.nav.navbar-nav,
.nav.navbar-nav>li {
float: none;
}
.navbar.navbar-default ul li:hover:after {
right: 0;
left: 0;
}
.navbar.navbar-default ul.dropdown-menu li,
.navbar.navbar-default ul.dropdown-menu li a {
position: relative;
display: block;
}
#logo {
padding-top: 2vh;
padding-left: 20px;
float: left;
}
.hero {
background: url("https://static.pexels.com/photos/7064/man-notes-macbook-computer.jpg") center center no-repeat;
;
background-attachment: fixed;
position: relative;
background-size: cover;
width: 100%;
max-width: 100%;
width: 100vw;
height: 100%;
}
.nav.navbar-nav {
margin: 10px 0 0;
}
section {
position: relative;
padding: 0vh 0 0;
min-height: 100vh;
}
.section1 {
height: 100vh;
text-align: center;
color: white;
}
.navbar.navbar-default ul li { position:relative;}
.navbar.navbar-default ul li:hover ul { display:block;}
.section2 {
background-color: dimgrey;
text-align: center;
color: white;
min-height: 90vh;
}
.fa-angle-down {
color: #4D5061;
position: absolute;
bottom: 0px;
}
.fa-angle-up {
color: #4D5061;
position: absolute;
bottom: 0px;
}
.footer {
height: 3vh;
background-color: #4D5061;
padding: 0;
right: 0;
bottom: 0;
left: 0;
}
.nav-title {
font-size: 14pt;
margin: 0;
top: 35px;
left: 8px;
width: 100%;
position: absolute;
text-align: center;
color: white;
font-family: 'Roboto', sans-serif;
}
.s1-welcome {
font-family: 'Roboto', sans-serif;
color: white;
font-size: 45pt;
font-size: 2.5em;
text-align: center;
margin: 0;
}
.footertext {
color: white;
font-family: "Roboto",sans-serif;
font-size: 14pt;
margin: 0;
padding: 20px 0;
text-align: center;
}
.contact-text {
color: white;
font-family: "Roboto",sans-serif;
font-size: 35pt;
font-weight: bold;
margin: 0;
padding: 30px 0 20px;
text-align: center;
}
p {
font-size: 20pt;
color: white;
font-family: 'Roboto', sans-serif;
text-align: center;
}
.profile.box {
bottom: 0;
height: 50%;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 0;
width: 50%;
}
.shape {
border-radius: 25px;
display: inline-block;
background: #4D5061;
content: url(http://i1126.photobucket.com/albums/l611/ldocherty1/IMG_0730_zpsiz4dqc47.jpg);
color: white;
height: 250px;
margin: auto;
padding: 3px;
width: 250px;
}
.fa {
padding: 20px;
font-size: 20px;
text-align: center;
text-decoration: none;
margin: 7px 6px;
border-radius: 50%;
}
.fa:hover {
opacity: 0.7;
}
.fa-twitter {
background: #55ACEE;
color: white;
}
.fa-linkedin {
background: #007bb5;
color: white;
}
.icon-style {
position: relative;
top: 10px;
}
.arrow1 {
color: white;
position: relative;
}
#import url(http://fonts.googleapis.com/css?family=Montserrat:400,700);
#feedback-page {
text-align: center;
}
#form-main {
width: 100%;
float: left;
padding-top: 0px;
}
#form-div {
background-color: rgba(72, 72, 72, 0.4);
padding-left: 35px;
padding-right: 35px;
padding-top: 35px;
padding-bottom: 50px;
width: 850px;
height: 500px;
float: left;
left: 50%;
position: absolute;
margin-top: 30px;
margin-left: -260px;
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
}
.feedback-input {
color: #3c3c3c;
font-family: Helvetica, Arial, sans-serif;
font-weight: 500;
font-size: 18px;
border-radius: 0;
line-height: 22px;
background-color: #fbfbfb;
padding: 13px 13px 13px 54px;
margin-bottom: 10px;
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
border: 3px solid rgba(0, 0, 0, 0);
}
.feedback-input:focus {
background: #fff;
box-shadow: 0;
border: 3px solid #3498db;
color: #3498db;
outline: none;
padding: 13px 13px 13px 54px;
}
.focused {
color: #30aed6;
border: #30aed6 solid 3px;
}
#name {
background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#name:focus {
background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
background-size: 30px 30px;
background-position: 8px 5px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#email {
background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#email:focus {
background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#comment {
background-image: url(http://rexkirby.com/kirbyandson/images/comment.svg);
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
textarea {
width: 100%;
height: 150px;
line-height: 150%;
resize: vertical;
}
input:hover,
textarea:hover,
input:focus,
textarea:focus {
background-color: white;
}
#button-blue {
font-family: 'Montserrat', Arial, Helvetica, sans-serif;
float: left;
width: 100%;
border: #fbfbfb solid 4px;
cursor: pointer;
background-color: #3498db;
color: white;
font-size: 24px;
padding-top: 22px;
padding-bottom: 22px;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
transition: all 0.3s;
margin-top: -4px;
font-weight: 700;
}
#button-blue:hover {
background-color: rgba(0, 0, 0, 0);
color: #0493bd;
}
.submit:hover {
color: #3498db;
}
.ease {
width: 0px;
height: 74px;
background-color: #fbfbfb;
-webkit-transition: .3s ease;
-moz-transition: .3s ease;
-o-transition: .3s ease;
-ms-transition: .3s ease;
transition: .3s ease;
}
.submit:hover .ease {
width: 100%;
background-color: white;
}
#media only screen and (max-width: 580px) {
#form-div {
left: 3%;
margin-right: 3%;
width: 88%;
margin-left: 0;
padding-left: 3%;
padding-right: 3%;
}
}
</style>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<h1 class="nav-title">Liam Docherty's Digital Portfolio</h1>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>Home
</li>
<li class="dropdown">
About Me <span class="caret"></span>
<ul class="dropdown-menu">
<li>Action
</li>
<li>Contact
</li>
<li>Something else here
</li>
<li>Separated link
</li>
<li>One more separated link
</li>
</ul>
</li>
<li class="dropdown">
Units <span class="caret"></span>
<ul class="dropdown-menu">
<li>Action
</li>
<li>Another action
</li>
<li>Something else here
</li>
<li>Separated link
</li>
<li>One more separated link
</li>
</ul>
</li>
<li>Clients
</li>
<li>Contact Me
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<section id="section1" class="section1">
<div class="hero">
<div class="profile box">
<div class="shape"></div>
</div>
</div>
<h2 class="s1-welcome">WELCOME TO MY PORTFOLIO</h2>
<div class="arrow1">
<i class="fa fa-angle-down" style="font-size:100px;"></i>
</div>
</section>
<section id="contact-me" class="contact_section section2">
<h2 class="contact-text">Get in touch</h2>
<p>Wanna get in touch or talk to me about a project?</p>
<p>Fill the form below or send an email to liam_docherty#outlook.com</p>
<div id="form-main">
<div id="form-div">
<form class="form" id="form1">
<p class="name">
<input name="name" type="text" class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" placeholder="Name" id="name" />
</p>
<p class="email">
<input name="email" type="text" class="validate[required,custom[email]] feedback-input" id="email" placeholder="Email" />
</p>
<p class="text">
<textarea name="text" class="validate[required,length[6,300]] feedback-input" id="comment" placeholder="Comment"></textarea>
</p>
<div class="submit">
<input type="submit" value="SEND" id="button-blue" />
<div class="ease"></div>
</div>
</form>
</div>
<div class="arrow2">
<i class="fa fa-angle-up" style="font-size:100px;"></i>
</div>
</section>
<script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<footer>
<div class="footer">
<h2 class="footertext">Copyright © 2017 Liam Docherty's Site. All rights reserved.</h2>
</div>
</footer>
</body>
For the section 1:
#section1{padding-top:0;}
For your second question
first: remove this from the #form-div:
float: left;
position: absolute;
margin-top:30px;
margin-left:-260px;
Add this to #form-div:
margin-left: auto;
margin-right:auto;
remove this from #form-main:
float:left;
move your <footer> in the section(id=contact-me) before the </section> and after the </div>
I am trying to show different tab content when clicking on a link using pure CSS by following this W3Schools tutorial. However, it is not working for me.
Again, it has to be pure CSS, no JavaScript!
Here's my code:
/* landscape-screen.css */
/*** General Settings ***/
* {
margin: 0;
padding: 0;
}
html,
body {
width: 100%;
height: 100%;
}
/*Main Wrapper Styling*/
#main-wrapper {
min-width: 960px;
height: 100%;
}
/* Banner styling*/
.header {
width: 100%;
height: 10%;
background-color: #7a6868;
}
/* "Welcome" photo in the banner position */
#welcome {
margin-left: 30%;
}
/* General wrapper settings */
.inner-wrapper-settings {
width: 100%;
height: 100%;
}
/* Left navigation menu styling */
.aside {
width: 180px;
height: 100%;
background-color: #cd4409;
/*display: inline-block; */
/* So that Nav Bar will be next to its section */
text-align: center;
float: left;
}
/* Right main Section styling */
.section {
/*display: inline-block; */
/* So that the section will be next to Nav Bar */
width: calc(100% - 180px);
height: 100%;
background-color: #eec712;
float: right
}
/*Footer styling*/
.footer {
background-color: black;
width: 100%;
height: 80px;
clear: both;
color: white;
}
/*** Tooltip***/
.tooltip {
display: inline;
position: relative;
}
.tooltip:hover:before {
border: solid;
border-color: #333 transparent;
border-width: 6px 6px 0 6px;
bottom: 20px;
content: "";
left: 50%;
position: absolute;
z-index: 99;
}
.tooltip:hover:after {
background: #333;
background: rgba(0, 0, 0, .8);
border-radius: 5px;
bottom: 26px;
color: #fff;
content: attr(title);
left: 20%;
padding: 5px 15px;
position: absolute;
z-index: 98;
width: 220px;
}
/* sidebar-links.css */
ul {
padding: 0;
margin-top: 30px;
}
li {
margin-bottom: 30px;
padding: 0px;
}
a {
color: white;
text-decoration: none;
}
a:hover {
color: #f0d248;
}
a:visited {
color: white;
}
/*form-responsive.css:*/
#import url(http://fonts.googleapis.com/css?family=Montserrat:400,700);
html {
/*background:url(http://thekitemap.com/images/feedback-img.jpg) no-repeat;*/
background-size: cover;
height: 100%;
}
#feedback-page {
text-align: center;
}
#form-main {
width: 100%;
float: left;
padding-top: 0px;
}
#form-div {
background-color: rgba(72, 72, 72, 0.4);
padding-left: 35px;
padding-right: 35px;
padding-top: 35px;
padding-bottom: 50px;
width: 450px;
float: left;
left: 50%;
position: absolute;
margin-top: 30px;
margin-left: -260px;
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
}
.feedback-input {
color: #3c3c3c;
font-family: Helvetica, Arial, sans-serif;
font-weight: 500;
font-size: 18px;
border-radius: 0;
line-height: 22px;
background-color: #fbfbfb;
padding: 13px 13px 13px 54px;
margin-bottom: 10px;
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
border: 3px solid rgba(0, 0, 0, 0);
}
.feedback-input:focus {
background: #fff;
box-shadow: 0;
border: 3px solid #3498db;
color: #3498db;
outline: none;
padding: 13px 13px 13px 54px;
}
.focused {
color: #30aed6;
border: #30aed6 solid 3px;
}
/* Icons ---------------------------------- */
#name {
background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#name:focus {
background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
background-size: 30px 30px;
background-position: 8px 5px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#email {
background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#email:focus {
background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
#comment {
background-image: url(http://rexkirby.com/kirbyandson/images/comment.svg);
background-size: 30px 30px;
background-position: 11px 8px;
background-repeat: no-repeat;
}
textarea {
width: 100%;
height: 150px;
line-height: 150%;
resize: vertical;
}
input:hover,
textarea:hover,
input:focus,
textarea:focus {
background-color: white;
}
#button-blue {
font-family: 'Montserrat', Arial, Helvetica, sans-serif;
float: left;
width: 100%;
border: #fbfbfb solid 4px;
cursor: pointer;
background-color: #3498db;
color: white;
font-size: 24px;
padding-top: 22px;
padding-bottom: 22px;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
transition: all 0.3s;
margin-top: -4px;
font-weight: 700;
}
#button-blue:hover {
background-color: rgba(0, 0, 0, 0);
color: #0493bd;
}
.submit:hover {
color: #3498db;
}
.ease {
width: 0px;
height: 74px;
background-color: #fbfbfb;
-webkit-transition: .3s ease;
-moz-transition: .3s ease;
-o-transition: .3s ease;
-ms-transition: .3s ease;
transition: .3s ease;
}
.submit:hover .ease {
width: 100%;
background-color: white;
}
#media only screen and (max-width: 580px) {
#form-div {
left: 3%;
margin-right: 3%;
width: 88%;
margin-left: 0;
padding-left: 3%;
padding-right: 3%;
}
}
.section div {
display: none;
}
.section:target div {
display: inline-block;
}
<!--Layout Main Wrapper-->
<div id="main-wrapper">
<div class="header">
<!-- The banner-->
<img id="logo" src="Resources/Images/logo.png" width="184" height="47" alt="logo" />
<img id="welcome" src="Resources/Images/Welcome.png" width="180" height="40" alt="Welcome" />
</div>
<!--
-->
<div id="content-wrapper" class="inner-wrapper-settings">
<div class="aside">
<!--The Navigation Menu (left side)-->
<ul>
<li><a title="Link for blog" class="tooltip" href="#blog">Blog</a></li>
<li><a title="Link for Contacts" class="tooltip" href="#contacts">Contacts</a></li>
</ul>
</div>
<!--
-->
<div class="section">
<!--The Section of the layout (right side)-->
<div id="blog">
<span>Blog</span>
</div>
<div id="contacts">
<div id="form-main">
<div id="form-div">
<form class="form" id="form1">
<p class="name">
<input name="name" type="text" class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" placeholder="Name" id="name" />
</p>
<p class="email">
<input name="email" type="text" class="validate[required,custom[email]] feedback-input" id="email" placeholder="Email" />
</p>
<p class="text">
<textarea name="text" class="validate[required,length[6,300]] feedback-input" id="comment" placeholder="Comment"></textarea>
</p>
<div class="submit">
<input type="submit" value="SEND" id="button-blue" />
<div class="ease"></div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!--
-->
<div class="footer">
<!--The foot of the layout (down side)-->
bla bla
</div>
</div>
jsFiddle
Currently, when I click on "Blog" or on "Contacts", it doesn't show anything.
Can you please show me how to fix it?
change the css like below
.section > div {display: none;}
.section > div:target { display: block;}
and remove # from id name
DEMO
try removing the character "#" from your div ids :
<div id="blog">
<div id="contacts">