I have the following HTML code: https://jsfiddle.net/qdukjf5w/
As you can see it looks pretty good:
Other folks added more things (e.g. header, footer, etc..) and so they included their own css styling which gave the page a beautiful header/footer, but ruined the original HTML body of the page
https://jsfiddle.net/p7o6x5u8/
Is there a way to make the page look like this by limiting the included css styling ONLY to the headers/footers?
css style sheet:
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600&display=swap");
* {
font-family: 'Montserrat', sans-serif;
margin: 0;
padding: 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
outline: none;
border: none;
text-decoration: none !important;
-webkit-transition: all .2s linear;
transition: all .2s linear;
}
html {
font-size: 62.5%;
overflow-x: hidden;
scroll-behavior: smooth;
scroll-padding-top: 6rem;
}
html::-webkit-scrollbar {
width: 1rem;
}
html::-webkit-scrollbar-track {
background: transparent;
}
html::-webkit-scrollbar-thumb {
background: #512a10;
}
@-webkit-keyframes fadeIn {
0% {
-webkit-transform: translateY(-2rem);
transform: translateY(-2rem);
opacity: 0;
}
}
@keyframes fadeIn {
0% {
-webkit-transform: translateY(-2rem);
transform: translateY(-2rem);
opacity: 0;
}
}
section {
padding: 5rem 1rem;
}
.link-btn {
margin-top: 1rem;
padding: 1rem 3rem;
display: inline-block;
border: 0.1rem solid #512a10;
color: #512a10;
background: none;
cursor: pointer;
font-size: 1.7rem;
}
.link-btn:hover {
background: #512a10;
color: #fff;
}
.demopara {
line-height: 2;
}
.heading {
text-align: center;
margin-bottom: 4rem;
font-size: 3rem;
text-transform: capitalize;
color: #222;
}
.header {
z-index: 1000;
padding: 4rem 0;
}
.header.active {
padding: 2rem 0;
background: #512a10;
}
.header .logo {
font-size: 2.5rem;
color: #fff;
font-weight: bolder;
}
.header .nav a {
font-size: 2rem;
margin-right: 2rem;
color: #fff;
}
.header .nav a:hover {
text-decoration: underline !important;
text-underline-offset: .5rem;
}
.header .icons div {
font-size: 2.5rem;
color: #fff;
margin-left: 2rem;
cursor: pointer;
}
.header #menu-btn {
display: none;
}
.login-form {
position: fixed;
top: 0;
left: 0;
z-index: 1100;
height: 100%;
width: 100%;
background: rgba(0, 0, 0, 0.8);
display: none;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
padding: 2rem;
}
.login-form.active {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.login-form form {
width: 50rem;
padding: 4rem;
background: #fff;
text-align: center;
position: relative;
-webkit-animation: fadeIn .2s linear;
animation: fadeIn .2s linear;
}
.login-form form #close-login-form {
position: absolute;
top: -4rem;
right: 0;
font-size: 3rem;
cursor: pointer;
color: #fff;
}
.login-form form #close-login-form:hover {
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
}
.login-form form .logo {
font-size: 2.5rem;
color: #512a10;
font-weight: bolder;
}
.login-form form h3 {
padding: 1rem 0;
font-size: 2rem;
text-transform: capitalize;
color: #222;
margin-top: 1rem;
}
.login-form form .box {
width: 100%;
padding: 1.2rem 1.4rem;
border: 0.1rem solid #512a10;
font-size: 1.6rem;
margin: 1rem 0;
}
.login-form form .flex {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
gap: .5rem;
margin: 1rem 0;
}
.login-form form .flex label {
font-size: 1.5rem;
line-height: 2;
color: #666;
margin-bottom: 0;
cursor: pointer;
}
.login-form form .flex a {
font-size: 1.5rem;
color: #512a10;
margin-left: auto;
}
.login-form form .flex a:hover {
text-decoration: underline !important;
}
.login-form form .link-btn {
width: 100%;
margin-bottom: 2rem;
}
.login-form form .account {
padding: 1.5rem .5rem;
background: #eee;
font-size: 1.5rem;
line-height: 2;
color: #666;
margin-bottom: 0;
}
.login-form form .account a {
color: #512a10;
}
.login-form form .account a:hover {
text-decoration: underline !important;
}
.home {
background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.7)), to(rgba(0, 0, 0, 0.7))), url(../images/home-bg.jpg) no-repeat;
background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(../images/home-bg.jpg) no-repeat;
background-size: cover;
background-position: center;
background-attachment: fixed;
}
.home span {
font-size: 2.5rem;
color: #fff;
}
.home h4 {
padding: 1rem 0;
font-size: 6rem;
color: #fff;
}
.home .link-btn {
color: #fff;
border-color: #fff;
}
.about span {
font-size: 2.5rem;
color: #512a10;
}
.about .title {
padding-top: 1rem;
font-size: 3rem;
text-transform: capitalize;
color: #222;
}
.about p {
padding: 1rem 0;
font-size: 1.6rem;
line-height: 2;
color: #666;
margin-bottom: 0;
}
.about .icons-container {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-top: 3rem;
gap: 1.5rem;
}
.about .icons-container .icons {
padding: 2rem;
background: #eee;
text-align: center;
-webkit-box-flex: 1;
-ms-flex: 1 1 14rem;
flex: 1 1 14rem;
}
.about .icons-container .icons i {
font-size: 4rem;
margin-bottom: 1.5rem;
color: #512a10;
}
.about .icons-container .icons h3 {
font-size: 1.5rem;
text-transform: capitalize;
color: #222;
}
.contact .contact-info-container {
display: -ms-grid;
display: grid;
-ms-grid-columns: (minmax(30rem, 1fr))[auto-fit];
grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
gap: 2rem;
margin-bottom: 3rem;
}
.contact .contact-info-container .box {
border: 0.1rem solid #512a10;
padding: 3rem 2rem;
border: 0.1rem solid #512a10;
text-align: center;
}
.contact .contact-info-container .box:hover i {
background: #512a10;
color: #fff;
}
.contact .contact-info-container .box i {
height: 6rem;
width: 6rem;
line-height: 6rem;
border: 0.1rem solid #512a10;
color: #512a10;
font-size: 2rem;
margin-bottom: 1rem;
}
.contact .contact-info-container .box h3 {
font-size: 2rem;
text-transform: capitalize;
color: #222;
padding: 1rem 0;
}
.contact .contact-info-container .box p {
font-size: 1.5rem;
line-height: 2;
color: #666;
margin-bottom: 0;
}
.contact form h3 {
font-size: 3rem;
text-transform: capitalize;
color: #222;
padding-bottom: 1rem;
}
.contact form .box {
margin: .7rem 0;
border: 0.1rem solid #512a10;
font-size: 1.6rem;
width: 100%;
padding: 1.2rem 1.4rem;
}
.contact form .box:focus {
background: #512a10;
color: #fff;
}
.contact form .box:focus::-webkit-input-placeholder {
color: #eee;
}
.contact form .box:focus:-ms-input-placeholder {
color: #eee;
}
.contact form .box:focus::-ms-input-placeholder {
color: #eee;
}
.contact form .box:focus::placeholder {
color: #eee;
}
.contact form textarea {
height: 15rem;
resize: none;
}
.footer {
text-align: center;
}
.footer .logo {
font-size: 3rem;
color: #512a10;
font-weight: bolder;
}
.footer .credit {
margin: 2rem 0;
font-size: 2rem;
text-transform: capitalize;
color: #222;
}
.footer .credit span {
text-decoration: underline !important;
}
.footer .share {
margin-top: 3rem;
}
.footer .share a {
height: 5rem;
width: 5rem;
line-height: 5rem;
font-size: 2rem;
border: 0.1rem solid #512a10;
color: #512a10;
margin: 0 .3rem;
}
.footer .share a:hover {
background: #512a10;
color: #fff;
}
@media (max-width: 991px) {
html {
font-size: 55%;
scroll-padding-top: 8rem;
}
.home h3 {
font-size: 4rem;
}
section {
padding: 3rem 0;
}
}
@media (max-width: 768px) {
.login-form form {
padding: 3rem 2rem;
}
.login-form form h3 {
font-size: 1.7rem;
}
.header {
padding: 4rem 2rem;
}
.header.active {
padding: 2rem;
}
.header #menu-btn {
display: inline-block;
}
.header #menu-btn.fa-times {
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
}
.header .nav {
position: absolute;
top: 99%;
left: 0;
right: 0;
background: #fff;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-flow: column;
flex-flow: column;
padding: 1rem 0;
-webkit-clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
}
.header .nav.active {
-webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.header .nav a {
margin: 1rem 2rem;
color: #222;
}
.contact .map {
height: 25rem;
}
}
@media (max-width: 450px) {
html {
font-size: 50%;
}
}
/*# sourceMappingURL=style.css.map */