I am trying to get scroll-behavior to work on this site. I have put the scroll-container, put ids, fixed css, but it is just not working. Any ideas as to why smooth-scrolling is NOT working on this?
What I need is the navbar area smooth scroll to the appropriate areas on the page. So Menu to Menu, Deals to Deals, About to About etc...I can't figure out why the smooth scrolling isn't working. Any ideas? Thanks!
/* Main Body Styles */
body {
margin: 0;
width: 100%;
height: auto;
box-sizing: border-box;
text-align: center;
background-color: #f9f9f9;
background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%238b8b8b' fill-opacity='0.07' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
font-family: var(--main-font);
}
a {
cursor: pointer;
outline: none;
text-decoration: none;
}
hr {
border: 0;
height: 1px;
margin: 0 0 1.5em 0;
background-image: -webkit-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
background-image: -moz-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
background-image: -ms-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
background-image: -o-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
}
.hr2 {
margin: 0 auto;
width: 50%;
}
.scroll-box {
scroll-behavior: smooth;
overflow-y: scroll;
}
:root {
--main-box-shadow:-5px 6px 59px -4px rgba(77,77,77,1);
--main-color: #d30404;
--main-text-shadow: 0px 3px 6px rgba(150, 150, 150, 1);
--fancy-font: 'Rock Salt', cursive;
--main-font: 'Raleway', sans-serif;
}
/* Header */
.header-image {
background-image: url('/Users/rogerjorns/Desktop/DinosMain/assets/img/header.jpg');
background-size:cover;
background-position: center;
background-attachment: fixed;
width: 100%;
height: 40em;
}
.header-wrapper {
padding-top: 1.5em;
}
.header-logo {
margin: 0;
padding-bottom: 1.25em;
color: #d30404;
font-family: 'Rock Salt', cursive;
font-size: 5em;
text-shadow: -2px 2px 7px rgba(0, 0, 0, .25);
letter-spacing: .115em;
}
.menu-btn {
border: none;
border-radius: 2em;
padding: 1em 3.25em;
background: #d30404;
color: #efefef;
box-shadow: 0px 30px 95px -15px rgba(0,0,0,.5);
font-size: 1.15em;
}
/* Hours of Operation */
.hours-wrapper {
background-color: red;
}
.hours-header {
margin: 0;
}
.hours-list {
list-style: none;
padding: 0;
}
/* Navbar */
.nav {
margin: 0;
}
.menu-box {
background-image: url('/Users/rogerjorns/Desktop/DinosMain/assets/img/menu.jpg');
}
.deals-box {
background-image: url('/Users/rogerjorns/Desktop/DinosMain/assets/img/dough.jpg');
}
.about-box {
background-image: url('/Users/rogerjorns/Desktop/DinosMain/assets/img/storefront.jpg');
}
.contact-box {
background-image: url('/Users/rogerjorns/Desktop/DinosMain/assets/img/oven.jpg');
}
.box-logo {
margin: 0;
padding: 1.5em;
color: white;
font-size: 2em;
font-family: 'Rock Salt', cursive;
text-shadow: -2px 2px 7px rgba(0, 0, 0, .25);
}
.box {
box-shadow: inset -1px 1px 43px -9px rgba(0,0,0,1);
background-position: center;
background-size: cover;
background-attachment: scroll;
width: 100%;
height: 10em;
}
/* Menu */
.menu-title {
color: #d30404;
font-family: 'Rock Salt', cursive;
font-size: 4em;
margin: 0;
padding: 1em 0 .25em 0;
text-shadow: var(--main-text-shadow);
}
.menu-gallery {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.menu-item {
margin: 2em 0;
}
.menu-pic {
width: auto;
height: 15em;
margin: .5em;
box-shadow: -12px 11px 39px -12px rgba(0,0,0,0.81);
}
.pic2,
.pic6 {
width: 95%;
}
.menu-heading {
font-family: 'Raleway', sans-serif;
font-weight: bolder;
font-size: 1.5em;
}
/* Deals */
.deal-wrapper {
padding: 1.5em 0;
}
.deals {
margin: 0;
color: #d30404;
font-family: 'Rock Salt', cursive;
font-size: 3em;
text-shadow: var(--main-text-shadow);
}
.deal-img {
width: auto;
height: 15em;
margin: 1em;
box-shadow: -12px 11px 39px -12px rgba(0,0,0,0.81);
}
/* About */
.about {
color: #d30404;
font-family: 'Rock Salt', cursive;
font-size: 3.5em;
margin: 0;
text-shadow: var(--main-text-shadow);
}
.store-pic {
margin: 2em 0;
width: 100%;
height: auto;
box-shadow: -1px 3px 17px -4px rgba(150,150,150,0.8);
}
.about-par {
font-family: 'Raleway', sans-serif;
font-size: 1.115em;
line-height: 180%;
padding: 1.35em 0;
margin: 0 auto;
max-width: 33ch;
}
/* Reviews */
.review-wrapper {
padding-top: 2em;
}
.review {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
font-family: 'Nunito', sans-serif;
font-style: italic;
max-width: 32ch;
margin: 0 auto;
}
.fa-yelp {
color: #d32323;
}
.fa-facebook-f {
color: #3b5998;
}
/* Footer */
.footer-wrapper {
background-color: #d30404;
box-shadow: inset 0px 1px 52px -10px rgba(0, 0, 0, .115);
width: 100%;
height: 5em;
display: flex;
justify-content: center;
}
.footer-social {
display: flex;
justify-content: space-around;
padding: .75em 0;
}
.social {
color: white;
text-shadow: -3px 2px 5px rgba(0, 0, 0, 0.25);
}
.footer-cred {
font-size: .75em;
color: white;
text-shadow: -3px 2px 5px rgba(0, 0, 0, 0.25);
}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dinos Pizza</title>
<link rel="stylesheet" href="/Users/rogerjorns/Desktop/DinosMain/assets/index.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Raleway|Rock+Salt|Nunito" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
</head>
<body>
<!-- Header -->
<header class="header-image">
<div class="header-wrapper">
<h1 class="header-logo">Dino's Pizza</h1>
</div>
Check our Menu
</header>
<!-- Hours of Operation -->
<div class="hours-wrapper">
<h2 class="hours-header">Hours of Operation</h2>
<ul class="hours-list">
<li class="hours">** Closed Mondays **</li>
<li class="hours">Tues - Thurs: 11am - 8pm</li>
<li class="hours">Fri - Sat: 11am - 9pm</li>
<li class="hours">Sun: 2pm - 8pm</li>
</ul>
</div>
<!-- Navbar -->
<div class="nav">
<div href="#menu" class="menu-box box">
<h2 class="box-logo">Menu</h2>
</div>
<div href="#deals" class="deals-box box">
<h2 class="box-logo">Deals</h2>
</div>
<div href="#about" class="about-box box">
<h2 class="box-logo">About Us</h2>
</div>
<div href="#contact" class="contact-box box">
<h2 class="box-logo">Contact</h2>
</div>
</div>
<scroll-container>
<!-- Menu -->
<div class="menu-wrapper">
<h1 id="menu" class="menu-title title scrolling-box">Menu</h1>
<hr>
<div class="menu-gallery">
<div class="menu-item">
<img class="menu-pic pic1" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/allmeat.jpg" alt="">
<h3 class="menu-heading">All-Meat</h3>
<p class="menu-price">$11.95</p>
</div>
<div class="menu-item">
<img class="menu-pic pic2" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/hawaiian.jpg" alt="">
<h3 class="menu-heading">Hawaiian</h3>
<p class="menu-price">$11.95</p>
</div>
<div class="menu-item">
<img class="menu-pic pic3" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/veggie.jpg" alt="">
<h3 class="menu-heading">Veggie</h3>
<p class="menu-price">$11.95</p>
</div>
<div class="menu-item">
<img class="menu-pic pic4" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/onetopping.jpg" alt="">
<h3 class="menu-heading">One Topping</h3>
<p class="menu-price">$11.95</p>
</div>
<div class="menu-item">
<img class="menu-pic pic5" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/twotopping.jpg" alt="">
<h3 class="menu-heading">Two Topping</h3>
<p class="menu-price">$11.95</p>
</div>
<div class="menu-item">
<img class="menu-pic pic6" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/cheesybread.jpg" alt="">
<h3 class="menu-heading">Cheesy Bread</h3>
<p class="menu-price">$11.95</p>
</div>
</div>
</div>
<hr>
<!-- Deals -->
<div class="deal-wrapper">
<scroll-page><h2 id="deals" class="deals scrolling-box">Deals</h2></scroll-page>
<hr class="hr2">
<img class="deal-img" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/deal.jpg" alt="">
<img class="deal-img" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/deal2.jpg" alt="">
</div>
<!-- About Us -->
<hr>
<div class="about-wrapper">
<h2 id="about" class="about scrolling-box">About Us</h2>
<hr class="hr2">
<img class="store-pic" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/storefront.jpg" alt="">
<hr class="hr2">
<p class="about-par">With aspirations to go into the restaurant business for many years,
our dream became a reality in May 2014 when we opened the doors to Dino's Pizza in the great city of Blue Mound, TX.
With a passion to serve up the best-tasting pizza and wings in town, made from quality ingredients,
we look forward to having you as a guest at our restaurant or delivering straight to your door.</p>
<br>
<p class="about-par">At Dino's Pizza we pride ourselves in serving our customers with the utmost professionalism, friendliness, integrity and cleanliness.
We make our pizza dough fresh from scratch daily.
Dino's is committed to serving delicious, hot home-made tasting pizzas and savory wings day in and day out.</p>
<br>
<p class="about-par">Dino's Pizza is family-owned and operated.
Our freshly made dough, homemade sauce, and real shredded cheese make a difference you will definitely taste!
And our appetizing, flavorful chicken wingsand dessert options are second to none!</p>
<p class="about-par">Don't just take our word for it...check out what our loyal customers have to say
on Yelp, then order and be prepared to taste
and experience awesomeness for yourself! The Dino's Way!</p>
</div>
<hr class="hr2">
<!-- Reviews -->
<div class="review-wrapper">
<h3 class="review">"I've never had anything less than an outstanding meal from Dino's."</h3>
<p> - Brittani <i class="fab fa-yelp"></i></p>
</div>
<div class="review-wrapper">
<h3 class="review">"Pizza was some of the best I've ever eaten! We will definitely be ordering again."</h3>
<p> - Michelle <i class="fab fa-yelp"></i></p>
</div>
<div class="review-wrapper">
<h3 class="review">"This is by far the Best pizza near me. I haven't bought pizza from anywhere else since..."</h3>
<p> - Kevin <i class="fab fa-facebook-f"></i></p>
</div>
<div class="review-wrapper">
<h3 class="review">"I couldn't stop eating the pizza. There's something in the crust they use that is impossible to describe other than heavenly."</h3>
<p> - Matthew <i class="fab fa-yelp"></i></p>
</div>
<div class="review-wrapper">
<h3 class="review">"I've yet to find the perfect pizza place until now and you guys nail it every time!"</h3>
<p> - J.C. <i class="fab fa-yelp"></i></p>
<div class="review-wrapper">
<h3 class="review">"The staff is super friendly and the pizza is awesome!! This is by far the best pizza I've had in Texas!!!"</h3>
<p> - Benjamin <i class="fab fa-facebook-f"></i></p>
</div>
<!-- Contact -->
<div class="footer-wrapper">
<footer>
<div class="footer-social">
<i class="fab fa-yelp social"></i>
<i class="fab fa-facebook-f social"></i>
<i class="fab fa-twitter social"></i>
</div>
<div class="footer-cred">
<p>Created by</p>
</div>
</footer>
</div>
</scroll-container>
</body>
</html>
You just need to add scroll-behavior: smooth; to your html style.
See the below Snippet:
/* Main Body Styles */
body {
margin: 0;
width: 100%;
height: auto;
box-sizing: border-box;
text-align: center;
background-color: #f9f9f9;
background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%238b8b8b' fill-opacity='0.07' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
font-family: var(--main-font);
}
html{
scroll-behavior: smooth;
}
a {
cursor: pointer;
outline: none;
text-decoration: none;
}
hr {
border: 0;
height: 1px;
margin: 0 0 1.5em 0;
background-image: -webkit-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
background-image: -moz-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
background-image: -ms-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
background-image: -o-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
}
.hr2 {
margin: 0 auto;
width: 50%;
}
.scroll-box {
scroll-behavior: smooth;
overflow-y: scroll;
}
:root {
--main-box-shadow:-5px 6px 59px -4px rgba(77,77,77,1);
--main-color: #d30404;
--main-text-shadow: 0px 3px 6px rgba(150, 150, 150, 1);
--fancy-font: 'Rock Salt', cursive;
--main-font: 'Raleway', sans-serif;
}
/* Header */
.header-image {
background-image: url('/Users/rogerjorns/Desktop/DinosMain/assets/img/header.jpg');
background-size:cover;
background-position: center;
background-attachment: fixed;
width: 100%;
height: 40em;
}
.header-wrapper {
padding-top: 1.5em;
}
.header-logo {
margin: 0;
padding-bottom: 1.25em;
color: #d30404;
font-family: 'Rock Salt', cursive;
font-size: 5em;
text-shadow: -2px 2px 7px rgba(0, 0, 0, .25);
letter-spacing: .115em;
}
.menu-btn {
border: none;
border-radius: 2em;
padding: 1em 3.25em;
background: #d30404;
color: #efefef;
box-shadow: 0px 30px 95px -15px rgba(0,0,0,.5);
font-size: 1.15em;
}
/* Hours of Operation */
.hours-wrapper {
background-color: red;
}
.hours-header {
margin: 0;
}
.hours-list {
list-style: none;
padding: 0;
}
/* Navbar */
.nav {
margin: 0;
}
.menu-box {
background-image: url('/Users/rogerjorns/Desktop/DinosMain/assets/img/menu.jpg');
}
.deals-box {
background-image: url('/Users/rogerjorns/Desktop/DinosMain/assets/img/dough.jpg');
}
.about-box {
background-image: url('/Users/rogerjorns/Desktop/DinosMain/assets/img/storefront.jpg');
}
.contact-box {
background-image: url('/Users/rogerjorns/Desktop/DinosMain/assets/img/oven.jpg');
}
.box-logo {
margin: 0;
padding: 1.5em;
color: white;
font-size: 2em;
font-family: 'Rock Salt', cursive;
text-shadow: -2px 2px 7px rgba(0, 0, 0, .25);
}
.box {
box-shadow: inset -1px 1px 43px -9px rgba(0,0,0,1);
background-position: center;
background-size: cover;
background-attachment: scroll;
width: 100%;
height: 10em;
}
/* Menu */
.menu-title {
color: #d30404;
font-family: 'Rock Salt', cursive;
font-size: 4em;
margin: 0;
padding: 1em 0 .25em 0;
text-shadow: var(--main-text-shadow);
}
.menu-gallery {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.menu-item {
margin: 2em 0;
}
.menu-pic {
width: auto;
height: 15em;
margin: .5em;
box-shadow: -12px 11px 39px -12px rgba(0,0,0,0.81);
}
.pic2,
.pic6 {
width: 95%;
}
.menu-heading {
font-family: 'Raleway', sans-serif;
font-weight: bolder;
font-size: 1.5em;
}
/* Deals */
.deal-wrapper {
padding: 1.5em 0;
}
.deals {
margin: 0;
color: #d30404;
font-family: 'Rock Salt', cursive;
font-size: 3em;
text-shadow: var(--main-text-shadow);
}
.deal-img {
width: auto;
height: 15em;
margin: 1em;
box-shadow: -12px 11px 39px -12px rgba(0,0,0,0.81);
}
/* About */
.about {
color: #d30404;
font-family: 'Rock Salt', cursive;
font-size: 3.5em;
margin: 0;
text-shadow: var(--main-text-shadow);
}
.store-pic {
margin: 2em 0;
width: 100%;
height: auto;
box-shadow: -1px 3px 17px -4px rgba(150,150,150,0.8);
}
.about-par {
font-family: 'Raleway', sans-serif;
font-size: 1.115em;
line-height: 180%;
padding: 1.35em 0;
margin: 0 auto;
max-width: 33ch;
}
/* Reviews */
.review-wrapper {
padding-top: 2em;
}
.review {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
font-family: 'Nunito', sans-serif;
font-style: italic;
max-width: 32ch;
margin: 0 auto;
}
.fa-yelp {
color: #d32323;
}
.fa-facebook-f {
color: #3b5998;
}
/* Footer */
.footer-wrapper {
background-color: #d30404;
box-shadow: inset 0px 1px 52px -10px rgba(0, 0, 0, .115);
width: 100%;
height: 5em;
display: flex;
justify-content: center;
}
.footer-social {
display: flex;
justify-content: space-around;
padding: .75em 0;
}
.social {
color: white;
text-shadow: -3px 2px 5px rgba(0, 0, 0, 0.25);
}
.footer-cred {
font-size: .75em;
color: white;
text-shadow: -3px 2px 5px rgba(0, 0, 0, 0.25);
}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dinos Pizza</title>
<link rel="stylesheet" href="/Users/rogerjorns/Desktop/DinosMain/assets/index.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Raleway|Rock+Salt|Nunito" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
</head>
<body>
<!-- Header -->
<header class="header-image">
<div class="header-wrapper">
<h1 class="header-logo">Dino's Pizza</h1>
</div>
Check our Menu
</header>
<!-- Hours of Operation -->
<div class="hours-wrapper">
<h2 class="hours-header">Hours of Operation</h2>
<ul class="hours-list">
<li class="hours">** Closed Mondays **</li>
<li class="hours">Tues - Thurs: 11am - 8pm</li>
<li class="hours">Fri - Sat: 11am - 9pm</li>
<li class="hours">Sun: 2pm - 8pm</li>
</ul>
</div>
<!-- Navbar -->
<div class="nav">
<div href="#menu" class="menu-box box">
<h2 class="box-logo">Menu</h2>
</div>
<div href="#deals" class="deals-box box">
<h2 class="box-logo">Deals</h2>
</div>
<div href="#about" class="about-box box">
<h2 class="box-logo">About Us</h2>
</div>
<div href="#contact" class="contact-box box">
<h2 class="box-logo">Contact</h2>
</div>
</div>
<scroll-container>
<!-- Menu -->
<div class="menu-wrapper">
<h1 id="menu" class="menu-title title scrolling-box">Menu</h1>
<hr>
<div class="menu-gallery">
<div class="menu-item">
<img class="menu-pic pic1" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/allmeat.jpg" alt="">
<h3 class="menu-heading">All-Meat</h3>
<p class="menu-price">$11.95</p>
</div>
<div class="menu-item">
<img class="menu-pic pic2" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/hawaiian.jpg" alt="">
<h3 class="menu-heading">Hawaiian</h3>
<p class="menu-price">$11.95</p>
</div>
<div class="menu-item">
<img class="menu-pic pic3" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/veggie.jpg" alt="">
<h3 class="menu-heading">Veggie</h3>
<p class="menu-price">$11.95</p>
</div>
<div class="menu-item">
<img class="menu-pic pic4" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/onetopping.jpg" alt="">
<h3 class="menu-heading">One Topping</h3>
<p class="menu-price">$11.95</p>
</div>
<div class="menu-item">
<img class="menu-pic pic5" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/twotopping.jpg" alt="">
<h3 class="menu-heading">Two Topping</h3>
<p class="menu-price">$11.95</p>
</div>
<div class="menu-item">
<img class="menu-pic pic6" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/cheesybread.jpg" alt="">
<h3 class="menu-heading">Cheesy Bread</h3>
<p class="menu-price">$11.95</p>
</div>
</div>
</div>
<hr>
<!-- Deals -->
<div class="deal-wrapper">
<scroll-page><h2 id="deals" class="deals scrolling-box">Deals</h2></scroll-page>
<hr class="hr2">
<img class="deal-img" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/deal.jpg" alt="">
<img class="deal-img" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/deal2.jpg" alt="">
</div>
<!-- About Us -->
<hr>
<div class="about-wrapper">
<h2 id="about" class="about scrolling-box">About Us</h2>
<hr class="hr2">
<img class="store-pic" src="/Users/rogerjorns/Desktop/DinosMain/assets/img/storefront.jpg" alt="">
<hr class="hr2">
<p class="about-par">With aspirations to go into the restaurant business for many years,
our dream became a reality in May 2014 when we opened the doors to Dino's Pizza in the great city of Blue Mound, TX.
With a passion to serve up the best-tasting pizza and wings in town, made from quality ingredients,
we look forward to having you as a guest at our restaurant or delivering straight to your door.</p>
<br>
<p class="about-par">At Dino's Pizza we pride ourselves in serving our customers with the utmost professionalism, friendliness, integrity and cleanliness.
We make our pizza dough fresh from scratch daily.
Dino's is committed to serving delicious, hot home-made tasting pizzas and savory wings day in and day out.</p>
<br>
<p class="about-par">Dino's Pizza is family-owned and operated.
Our freshly made dough, homemade sauce, and real shredded cheese make a difference you will definitely taste!
And our appetizing, flavorful chicken wingsand dessert options are second to none!</p>
<p class="about-par">Don't just take our word for it...check out what our loyal customers have to say
on Yelp, then order and be prepared to taste
and experience awesomeness for yourself! The Dino's Way!</p>
</div>
<hr class="hr2">
<!-- Reviews -->
<div class="review-wrapper">
<h3 class="review">"I've never had anything less than an outstanding meal from Dino's."</h3>
<p> - Brittani <i class="fab fa-yelp"></i></p>
</div>
<div class="review-wrapper">
<h3 class="review">"Pizza was some of the best I've ever eaten! We will definitely be ordering again."</h3>
<p> - Michelle <i class="fab fa-yelp"></i></p>
</div>
<div class="review-wrapper">
<h3 class="review">"This is by far the Best pizza near me. I haven't bought pizza from anywhere else since..."</h3>
<p> - Kevin <i class="fab fa-facebook-f"></i></p>
</div>
<div class="review-wrapper">
<h3 class="review">"I couldn't stop eating the pizza. There's something in the crust they use that is impossible to describe other than heavenly."</h3>
<p> - Matthew <i class="fab fa-yelp"></i></p>
</div>
<div class="review-wrapper">
<h3 class="review">"I've yet to find the perfect pizza place until now and you guys nail it every time!"</h3>
<p> - J.C. <i class="fab fa-yelp"></i></p>
<div class="review-wrapper">
<h3 class="review">"The staff is super friendly and the pizza is awesome!! This is by far the best pizza I've had in Texas!!!"</h3>
<p> - Benjamin <i class="fab fa-facebook-f"></i></p>
</div>
<!-- Contact -->
<div class="footer-wrapper">
<footer>
<div class="footer-social">
<i class="fab fa-yelp social"></i>
<i class="fab fa-facebook-f social"></i>
<i class="fab fa-twitter social"></i>
</div>
<div class="footer-cred">
<p>Created by</p>
</div>
</footer>
</div>
</scroll-container>
</body>
</html>
You can test scroll behaviour at jsfiddle as well
Related
I'm a newbie at html and css, please could someone help me out.I'm trying to get the 'Full Stack Development' and icon further away from the picture. Also, stretch 'Full Stack Development' text out a bit. Please explain it in a simple way I could understand.
how I want it to look like
Vs this is how its turn out to be
HTML CODE:
<body>
<nav class="header">
<a href='' ><img src='' height="50px" alt='logo'/></a>
<ul class="menu">
<li> Home</li>
<li> Education</li>
<li> Experience</li>
<li> Projects</li>
<li> Contact Me</li>
</ul>
</nav>
<div id="container">
<img src="" alt="">
<div class="text">
<h1 class="greeting-text" style="color: rgb(0, 28, 85);"></h1>
<h2 class="greeting-nickname" style="color: rgb(0, 28, 85);">( You can call me)</h2>
<h3>
<p class="greeting-text-p subTitle" style="color: rgb(122, 122, 145);">
</p>
</h3>
<p>
<a class="rounded-button" href="">
<ion-icon name="logo-instagram" size="large"></ion-icon>
</a>
<a class="rounded-button" href="">
<ion-icon name="logo-linkedin" size="large"></ion-icon>
<a class="rounded-button" href="">
<ion-icon name="logo-github" size="large"></ion-icon>
</a>
<a class="rounded-button" href="">
<ion-icon name="mail-outline" size="large"></ion-icon>
</a>
<div id="Contact">
See My Resume
</div>
</P>
<div class="container">
<h2 class="heading"> What I Do?</h2>
<img src="fSD1.png" alt="what I Do">
<h1 class="name" style="color: rgb(3, 2, 8);"> Full Stack Development</h1>
<p class="icon">
<ion-icon name="logo-html5"></ion-icon>
<ion-icon name="logo-css3"></ion-icon>
<ion-icon name="logo-nodejs"></ion-icon>
<ion-icon name="logo-python"></ion-icon>
<ion-icon name="logo-javascript"></ion-icon>
<ion-icon name="logo-react"></ion-icon>
</p>
</div>
</div>
</div>
<script type="module" src="https://unpkg.com/ionicons#5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons#5.5.2/dist/ionicons/ionicons.js"></script>
</body>
</html>
CSS CODE:
body
{
margin:0%;
font-family: Hoefler Text, Helvetica, sans-serif;
background-color: rgb(233, 245, 248);
color: black;
}
header{
margin: 3% 10% 3% 10%;
padding: 37px 161px;
align-items: center;
}
.menu{
list-style-type: none;
margin: 0;
padding: 0;
float: right;
}
.menu li{
display: inline-block;
padding: 20px 40px;
font-size: 20px;
}
.menu li a:hover{
color: rgb(0, 216, 247);
border-bottom: 5px solid #03090a;
}
#container{
margin: 0 20px 15px 20px;
text-align: right;
float: right;
}
img{
max-width: 400px;
padding: 10px 10px 10px 10px;
}
.heading{
display: grid;
grid-template-columns: repeat(3, 1fr);
align-items: center;
column-gap: 1.6rem;
margin-top: 400px;
padding: 0px 0px 0px 200px;
}
.heading::before, .heading::after{
content: "";
height: 2px;
background-color: #03090a;
display: flex;
}
.text{
text-align: justify;
font-family: Hoefler Text;
font-size: 20px;
padding: 10px 600px 30px 20px;
float: left;
position: relative;
bottom: 600px;
}
#Contact{
background-color: rgb(37, 198, 235);
color: rgba (0,0,0,.8);
display: inline-block;
padding: 2% 4%;
font-size: 16px;
font-weight: 501;
float: left;
}
a:link, a:visited, a:hover, a:active {
text-decoration: none;
color: rgb(1, 0, 0);
}
#containerone{
margin: 0 20px 15px 20px;
text-align: left;
float: left;
}
.title{
text-align: justify;
font-family: Hoefler Text;
font-size: 20px;
padding: 10px 20px 20px 700px;
align-items: right;
position: relative;
bottom: 500px;
}
.studies{
font-size: 50px;
position: none;
bottom: 300px;
text-align: center;
}
img{
max-width: 500px;
padding: 10px 10px 10px 10px
}
/* This is where I need help in */
.name{
text-align: right;
font-family: Hoefler Text;
font-size: 35px;
padding: 10px 10px 10px 400px;
align-items: right;
position: relative;
bottom: 400px;
}
.icon{
text-align: right;
font-size: 37px;
padding: 10px 10px 200px 550px;
align-items: right;
position: relative;
bottom: 400px;
}
*{
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
::selection{
background-color: #333;
color: rgb(255, 230, 0);
}
::-moz-selection{
background-color: #333;
color: rgb(255, 255, 255);
}
::-webkit-scrollbar{
width: 10px;
}
::-webkit-scrollbar-thumb{
background-color: rgb(255, 198, 198);
-webkit-border-radius: 10px;
}
::-webkit-scrollbar-track{
background-color: #f8f8f8;
}
header{
width: 100%;
z-index: 100;
}
.nav-list, #left-navbar, #right-navbar{
display: flex;
}
.img-logo{
width: 200px;
transform: translateX(-20px);
}
#right-navbar{
transform: translateX(300px);
}
.nav-list{
position: fixed;
width: 1152px;
top: 0;
left: 110px;
background-color: rgb(255, 255, 255);
list-style-type: none;
padding: 20px;
box-shadow: 0px 0px 9.5px 0px black;
}
.n{
text-decoration: none;
color: black;
font-size: 14px;
font-weight: 700;
}
.nav-link{
text-decoration: none;
padding: 10px;
color: black;
font-size: 14px;
font-weight: 700;
}
.nav-link:hover{
border-bottom: 4px solid rgb(255, 0, 0);
transition: all ease-out .5s;
}
.n:hover{
border-bottom: 4px solid rgb(255, 0, 0);
transition: all ease-out .5s;
}
#free-web-hosting{
background-color: #f8f8f8;
height: 100vh;
padding: 230px 100px;
overflow-y: hidden;
background-image: url(https://images2.imgbox.com/d7/c9/XyznzmUz_o.png);
background-repeat: no-repeat;
background-position-x: 600px;
background-position-y: 170px;
}
button{
background-color: #ff5d64;
border-radius: 5px;
box-shadow: .5px .5px 20px .5px rgb(212, 209, 209);
border: none;
padding: 12px;
}
.fwh-img{
transform: translate(470px, -250px);
z-index: 1;
}
.fas, .nav-link{
position: relative;
top: 19px;
}
.bg-red{
border: none;
border-radius: 5px;
background-color: red;
color: white;
margin: 0px 40px;
padding: 10px 25px;
box-shadow: 0px 0px 10px 0px rgb(255, 140, 140);
}
#sponsors{
display: flex;
justify-content: center;
align-items: center;
}
.sponsors-img{
padding: 10px 40px;
margin-top: 30px;
}
#all-starts{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 60px 0px;
}
#pricing-container{
display: flex;
justify-content: center;
align-items: center;
}
.pricing{
width: 280px;
height: 100vh;
box-shadow: 0px 0xp 10px 0px;
border: 1px solid black;
}`enter code here`
.pricing1, .see-more{
display: flex;
flex-direction: column;
}
#media (max-width: 768px) {
#free-web-hosting{
background-image: none;
text-align: center;
line-break: loose;
}
#sponsors{
display: flex;
flex-wrap: wrap;
}
#pricing-container{
display: flex;
flex-wrap: wrap;
}
#all-starts{
text-align: center;
display: flex;
flex-wrap: wrap;
}
}
<!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="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="shortcut icon" href="https://images2.imgbox.com/a5/2f/URZJk3ro_o.png" type="image/x-icon">
<script src="https://kit.fontawesome.com/fa9f85711d.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="000web.css">
<title>Free Web Hosting - Host a Website for Free with Cpanel, PHP</title>
</head>
<body>
<header>
<nav id="nav-bar">
<ul class="nav-list">
<div id="left-navbar">
<img class="img-logo" src="https://svgshare.com/i/YPv.svg" alt="logo">
<li><a class="n" href="#"><span class="nn" style="color: rgb(255, 20, 20); font-size: 14px; font-weight: 900; border: none;">SALE</span><br>Cheap Web Hosting</a></li>
<li><a class="nav-link" href="#">Website Builder</a></li>
<li><a class="nav-link" href="#">Forum</a></li>
</div>
<div id="right-navbar">
<span class="fas fa-globe"></span>
<li><a style="color: rgb(255, 25, 25); border: none;" class="nav-link" href="#">SIGN IN</a></li>
<li><a class="nav-link bg-red" href="#">GO PREMIUM</a></li>
</div>
</ul>
</nav>
</header>
<main>
<div id="free-web-hosting">
<div id="con">
<h3 class="h33" style="font-size: 45px; color: #2b464c; font-weight: 700;">Free Web Hosting</h3>
<p style="margin: 30px 0px; line-height: 25px;"><span style="color: rgb(253, 67, 67);">Zero</span> cost website hosting with PHP,<br> MySQL, cPanel & no ads!</p>
<button style="color: rgb(255, 255, 255);">GET STARTED</button><br>
</div>
</div>
<div id="sponsors">
<img class="sponsors-img" src="https://svgshare.com/i/YQe.svg" alt="php logo">
<img class="sponsors-img" src="https://svgshare.com/i/YQp.svg" alt="cloudflare logo">
<img class="sponsors-img" src="https://svgshare.com/i/YR0.svg" alt="nginx logo">
<img class="sponsors-img" src="https://svgshare.com/i/YNt.svg" alt="cloudlinux logo">
<img class="sponsors-img" src="https://svgshare.com/i/YNu.svg" alt="intel logo">
<img class="sponsors-img" src="https://svgshare.com/i/YR1.svg" alt="wordpress logo">
<img class="sponsors-img" src="https://svgshare.com/i/YNM.svg" alt="mysql logo">
</div>
<div id="all-starts">
<h1>It All Starts Here</h1>
<p>Choose one of the premium plans and enjoy all the greatest features, industry leading performance and top of<br>the class 24/7 live support on the market. Unlimited hardware resources, free domain, SSL & SSH also included!</p>
</div>
<div id="pricing-container">
<div class="pricing pricing1">
<h4>$000/mo</h4>
<li class="fas fa-check">1 Website</li>
<li class="fas fa-check">300 MB Disk Space</li>
<li class="fas fa-check">Limited Bandwidth (3 GB)</li>
<li class="fas fas fa-times">No Email Account</li>
<li class="fas fas fa-times">24/7/365</li><br>
<div class="see-more">
<span>See all features</span>
<li>FREE SIGN UP</li>
</div>
</div>
<div class="pricing"></div>
<div class="pricing"></div>
<div class="pricing"></div>
</div>
</main>
</body>
</html>
I completed responsive web design last 3 weeks on freecodecamp, and I have been building pages looking at other websites to improve my portfolio, but this web page I'm building is very difficult, can you please into the code and tell me where I went wrong. I thought that I was overusing the <li> that is why it is behaving this wa
y.
See here
enter image description here
Wrap Your list elements in a ul tag and give it a negative z-index styling
<ul style="z-index: -1000 !important;">
<li class="fas fa-check">1 Website</li>
<li class="fas fa-check">300 MB Disk Space</li>
<li class="fas fa-check">Limited Bandwidth (3 GB)</li>
<li class="fas fas fa-times">No Email Account</li>
<li class="fas fas fa-times">24/7/365</li>
</ul><br />
This Works
PRO TIP:
Always make sure to put your <li> </li> elements in an immediate container for better and easy styling
You could do something like
<ul><li></li></ul>
If you use position fixed the next element will be positioned at the previous element's position. if you want your navbar to be fixed you have to do something like this:
<div class="relative">
<div class="navbar fixed">
</div>
</div>
<div class="relative">
</div>
I'm new in Frontend development, I'm doing a "resume website".
I have two columns and 2 rows, I'm using grid containers.
As you can see on the screenshot my second column has the same height as the first while I would like it to be "sensitive". (Suppress all that empty space while the second block under it comes closer). Sorry for my English. I will add my code under the screenshot.
Results of my 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">
<script type="text/javascript"> (function() { var css = document.createElement('link'); css.href = 'https://use.fontawesome.com/releases/v5.1.0/css/all.css'; css.rel = 'stylesheet'; css.type = 'text/css'; document.getElementsByTagName('head')[0].appendChild(css); })(); </script>
<link href="https://fonts.googleapis.com/css?family=Comfortaa:300,400,700&display=swap" rel="stylesheet">
<meta name="description" content="Resume Maria Macarena ">
<meta name="author" content="Pierre ">
<title>Resume Macarena </title>
<link rel="stylesheet" href="../Normalize.css" >
<link rel="stylesheet" type="text/css" href="essai.css">
</head>
<body>
<div class="grid-container">
<aside class="grid-item aside">
<div class="container photo">
<img src="Maca_profil.jpg" alt="profile picture">
<div class="bottom-left">Macarena </div>
</div>
<div class="row">
<ul>
<li><i class="fas fa-suitcase"></i> Lawyer</li>
<li><i class="fas fa-home"></i> Las Condes, Santiago, Chile</li>
<li><i class="fas fa-at"></i> Email: </li>
<li><i class="fas fa-phone-alt"></i> +********</li>
</ul>
<hr>
</div>
<div class="row">
<h2><i class="fas fa-asterisk"></i> Skills</h2>
<ul>
<li>Microsoft Excel
<div class="container progressBar">
<div class="skills excel">80%</div>
</div></li>
<li>Microsoft Word
<div class="container progressBar">
<div class="skills word">100%</div>
</div></li>
<li>Etc..</li>
</ul>
<h2><i class="fas fa-asterisk"></i> Languages</h2>
<ul>
<li>Español
<div class="container progressBar">
<div class="skills spanish">100%</div>
</div></li>
<li>English
<div class="container progressBar">
<div class="skills english">80%</div>
</div></li>
<li>Français
<div class="container progressBar">
<div class="skills french">20%</div>
</div></li>
</ul>
</div>
</aside>
<section class="grid-item item2">
<div class="contenu">
<h2><i class="fas fa-suitcase"></i> WORK EXPERIENCE</h2>
<h3>EY Consulting</h3><p> <i class="far fa-calendar-alt"></i> November 2014 – March 2017</p>
<ul>
<li><span class="souligne">Position</span>: Senior lawyer at the Santiago business tax advisory group.</li>
<li><span class="souligne">Relevant duties</span>: compilation, study and processing of relevant information on the specific business line of the client. Research and draft memorandums concerning the design of efficient tax structures for multinational clients. Involved in complex repatriation cases before Chilean Tax Authorities. Planning and implementation of corporate restructuring.</li>
</ul>
<hr>
<h3>Chilean Judicial Assistance Corporation</h3>
<p><i class="far fa-calendar-alt"></i> November 2013 – May 2014</p>
<ul>
<li><span class="souligne">Position</span>: Compulsory Government Internship</li>
<li><span class="souligne">Relevant duties</span>: disposal of judicial and extrajudicial civil cases</li>
</ul>
<hr>
<h3>Bordachar, Alvear, Meneses, Montes y Cía.</h3>
<p><i class="far fa-calendar-alt"></i> March 2012 – August 2012</p>
<ul>
<li><span class="souligne">Position</span>: Corporate Law Clerk</li>
<li><span class="souligne">Relevant duties</span>: legal services to Chilean and foreign clients undertaking business in Chile.</li>
</ul>
</div>
</section>
<div class="grid-item item3">
<h2><i class="fas fa-graduation-cap"></i> ACADEMIC BACKGROUND</h2>
<ul>
<li><h5>Pontifical Catholic University of Chile</h5>
<h6><i class="far fa-calendar-alt"></i> 2015 </h6>
<p>Advanced diploma “Litigation and New Procedures”</p> </li><hr>
<li><h5>Arbitration Academy (Paris, France)</h5>
<h6><i class="far fa-calendar-alt"></i> 2012 </h6>
<p>Diploma "International Academy for Arbitration Law"</p><hr></li>
<li><h5>Catholic University of Chile</h5>
<h6><i class="far fa-calendar-alt"></i> 2008 – 2012</h6><p>Bachelor of Laws, Pontifical</p> <hr></li>
<li><h5>High and Elementary School, Sagrado Corazón de Apoquindo</h5>
<h6><i class="far fa-calendar-alt"></i> 1998 – 2007</h6></li>
</ul>
</div>
</div>
<footer class="container footer">
<div class="row">
</div>
</footer>
</body>
* {
box-sizing: border-box;
font-family: 'Comfortaa', cursive;
}
#media only screen and (max-width: 768px) {
}
.grid-container {
padding: 10px;
background-color: darkgrey;
}
/* ASIDE */
.aside {
margin: 10px 10px 0px 20px;
background-color: #E0E2E3;
opacity: .9;
height: auto;
border-radius: 5px;
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.photo {
width: 100%;
position: relative;
text-align: center;
color: #282828;
}
img {
width: 100%;
height: auto;
}
/* Bottom left text */
.bottom-left {
position: absolute;
bottom: 8px;
left: 10px;
font-weight: 600;
font-size: 30px;
}
ul {
list-style-type: none;
margin: 15px;
padding: 0px;
line-height: 25px;
padding-bottom: auto;
}
i {
color: #1689AC;
}
/* BODY */
.aside, .item2, .item3 {
padding-bottom: 5px;
}
h2, h3 {
margin-left: 15px;
}
h2 {
padding-top: 15px;
padding-bottom: 15px;
font-weight: 700;
}
p {
margin-top: -15px;
padding-left: 15px;
font-weight: 500;
}
.item2 {
background-color: #E0E2E3;
opacity: .9;
margin: 10px 10px 0px 20px;
height: auto;
border-radius: 5px;
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.item3 {
grid-column-start: 2;
background-color: #E0E2E3;
opacity: .9;
margin: 10px 10px 0px 20px;
height: auto;
border-radius: 5px;
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.item3 h5, h6, p {
line-height: 20px;
}
.item3 h5 {
font-size: 1em;
display: inline;
}
.item3 h6 {
font-weight: 500;
margin-top: 5px;
font-size: .9em;
padding: 0px 0px 0px 15px;
margin-bottom: 10px;;
}
.item3 p {
margin-top: auto;
font-weight: 100;
}
/* PROGRESS BARS */
.progressBar {
width: 100%;
height: 20px;
background-color: #9DA3A4;
border-radius: 20px;
}
.skills {
height: inherit;
text-align: right;
padding-right: 5px;
font-size: .7em;
color: white;
border-radius: 20px;
}
.excel {width: 80%; background-color: #1689AC;}
.word {width: 100%;background-color: #1689AC;}
.spanish {width: 100%; background-color: #1689AC;}
.english {width: 80%; background-color: #1689AC;}
.french {width: 20%; background-color: #1689AC;}
/* FOOTER */
.footer {
display: flex;
flex-direction: column;
height: 100px;
text-align: center;
background-color: ;
}
#media only screen and (min-width: 768px) {
.grid-container {
display: grid;
grid-template-columns: 35% 65% ;
}
.item2, .item3 {
margin: 10px 10px 0px 5px;
}
}
Just put your "items" inside one grid container.
<section class="grid-item">
<div class="item2">...WORK EXPERIENCE</div>
<div class="item3">...ACADEMIC BACKGROUND</div>
</section>
https://jsfiddle.net/zq1g7nh6/
You need to define 2 columns in a row and in the second column, there should be mulitiple rows. for example (basic structure):
<div class='row'>
<div class="col"> some content </div>
<div class="col">
<div class="row"> some content</div>
<div class="row"> some content</div>
</div>
</div>
* {
box-sizing: border-box;
font-family: 'Comfortaa', cursive;
}
#media only screen and (max-width: 768px) {
}
.grid-container {
padding: 10px;
background-color: darkgrey;
}
/* ASIDE */
.aside {
margin: 10px 10px 0px 20px;
background-color: #E0E2E3;
opacity: .9;
height: auto;
border-radius: 5px;
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.photo {
width: 100%;
position: relative;
text-align: center;
color: #282828;
}
img {
width: 100%;
height: auto;
}
/* Bottom left text */
.bottom-left {
position: absolute;
bottom: 8px;
left: 10px;
font-weight: 600;
font-size: 30px;
}
ul {
list-style-type: none;
margin: 15px;
padding: 0px;
line-height: 25px;
padding-bottom: auto;
}
i {
color: #1689AC;
}
/* BODY */
.aside, .item2, .item3 {
padding-bottom: 5px;
}
h2, h3 {
margin-left: 15px;
}
h2 {
padding-top: 15px;
padding-bottom: 15px;
font-weight: 700;
}
p {
margin-top: -15px;
padding-left: 15px;
font-weight: 500;
}
.item2 {
background-color: #E0E2E3;
opacity: .9;
margin: 10px 10px 0px 20px;
height: auto;
border-radius: 5px;
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.item3 {
grid-column-start: 2;
background-color: #E0E2E3;
opacity: .9;
margin: 10px 10px 0px 20px;
height: auto;
border-radius: 5px;
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.item3 h5, h6, p {
line-height: 20px;
}
.item3 h5 {
font-size: 1em;
display: inline;
}
.item3 h6 {
font-weight: 500;
margin-top: 5px;
font-size: .9em;
padding: 0px 0px 0px 15px;
margin-bottom: 10px;;
}
.item3 p {
margin-top: auto;
font-weight: 100;
}
/* PROGRESS BARS */
.progressBar {
width: 100%;
height: 20px;
background-color: #9DA3A4;
border-radius: 20px;
}
.skills {
height: inherit;
text-align: right;
padding-right: 5px;
font-size: .7em;
color: white;
border-radius: 20px;
}
.excel {width: 80%; background-color: #1689AC;}
.word {width: 100%;background-color: #1689AC;}
.spanish {width: 100%; background-color: #1689AC;}
.english {width: 80%; background-color: #1689AC;}
.french {width: 20%; background-color: #1689AC;}
/* FOOTER */
.footer {
display: flex;
flex-direction: column;
height: 100px;
text-align: center;
background-color: ;
}
#media only screen and (min-width: 768px) {
.grid-container {
display: grid;
grid-template-columns: 35% 65% ;
}
.item2, .item3 {
margin: 10px 10px 0px 5px;
}
}
<div class="grid-container">
<aside class="grid-item aside">
<div class="container photo">
<img src="Maca_profil.jpg" alt="profile picture">
<div class="bottom-left">Macarena </div>
</div>
<div class="row">
<ul>
<li><i class="fas fa-suitcase"></i> Lawyer</li>
<li><i class="fas fa-home"></i> Las Condes, Santiago, Chile</li>
<li><i class="fas fa-at"></i> Email: </li>
<li><i class="fas fa-phone-alt"></i> +********</li>
</ul>
<hr>
</div>
<div class="row">
<h2><i class="fas fa-asterisk"></i> Skills</h2>
<ul>
<li>Microsoft Excel
<div class="container progressBar">
<div class="skills excel">80%</div>
</div>
</li>
<li>Microsoft Word
<div class="container progressBar">
<div class="skills word">100%</div>
</div>
</li>
<li>Etc..</li>
</ul>
<h2><i class="fas fa-asterisk"></i> Languages</h2>
<ul>
<li>Español
<div class="container progressBar">
<div class="skills spanish">100%</div>
</div>
</li>
<li>English
<div class="container progressBar">
<div class="skills english">80%</div>
</div>
</li>
<li>Français
<div class="container progressBar">
<div class="skills french">20%</div>
</div>
</li>
</ul>
</div>
</aside>
<section class="grid-item">
<div class="item2">
<div class="contenu">
<h2><i class="fas fa-suitcase"></i> WORK EXPERIENCE</h2>
<h3>EY Consulting</h3>
<p> <i class="far fa-calendar-alt"></i> November 2014 – March 2017</p>
<ul>
<li><span class="souligne">Position</span>: Senior lawyer at the Santiago business tax advisory group.</li>
<li><span class="souligne">Relevant duties</span>: compilation, study and processing of relevant information on the specific business line of the client. Research and draft memorandums concerning the design of efficient tax structures for multinational clients. Involved in complex repatriation cases before Chilean Tax Authorities. Planning and implementation of corporate restructuring.</li>
</ul>
</div>
</div>
<div class="item3">
<h2><i class="fas fa-graduation-cap"></i> ACADEMIC BACKGROUND</h2>
<ul>
<li>
<h5>Pontifical Catholic University of Chile</h5>
<h6><i class="far fa-calendar-alt"></i> 2015 </h6>
<p>Advanced diploma “Litigation and New Procedures”</p>
</li>
<hr>
<li>
<h5>Arbitration Academy (Paris, France)</h5>
<h6><i class="far fa-calendar-alt"></i> 2012 </h6>
<p>Diploma "International Academy for Arbitration Law"</p>
<hr>
</li>
<li>
<h5>Catholic University of Chile</h5>
<h6><i class="far fa-calendar-alt"></i> 2008 – 2012</h6>
<p>Bachelor of Laws, Pontifical</p>
<hr>
</li>
<li>
<h5>High and Elementary School, Sagrado Corazón de Apoquindo</h5>
<h6><i class="far fa-calendar-alt"></i> 1998 – 2007</h6>
</li>
</ul>
</div>
</div>
</section>
<footer class="container footer">
<div class="row">
</div>
</footer>
I've made it so once you hover over the images on this page they become interactive and show a hyperlink. I've tried my best to make this responsive but for some reason to the left the images are sticking out and creating a gap between the white box and background image.
I would really appreciate it if someone could make an effort to help me out and educate me a little here :) Thank you!
Here's my code
/* Extra small devices (phones, up to 480px) */
#media screen and (max-width: 767px) {
}
/* Small devices (tablets, 768px and up) */
#media (min-width: 768px) and (max-width: 991px) {
}
/* tablets/desktops and up ----------- */
#media (min-width: 992px) and (max-width: 1199px) {
}
/* large desktops and up ----------- */
#media screen and (min-width: 1200px) {
{
font-size: 2.350em;
}
}
body {
width:100%;
margin:0;
padding:0;
max-width:100%;
font-size: 2.175em;
font-family: 'Oxygen', sans-serif;
font-weight: 300;
background: url(http://eyeofthestormproductions.com/css/background.jpg) no-repeat center center fixed;
background-size: cover;
box-shadow: inset 0 0 0 1000px rgba(0,0,0,.3);
}
.underh {
padding-top: 1.750em;
margin-left: 1.25em;
max-width: 100%;
}
.teamimg {
}
.team {
text-align: center;
padding-top: 5px;
margin-bottom: 25px;
font-family: 'Oxygen', sans-serif;
font-weight: 300;
font-size: 50px;
margin: auto;
}
.vspacer {
padding-top: 1.875em;
}
.video-container {
position:relative;
padding-bottom:56.25%;
padding-top:30px;
height:0;
overflow:hidden;
}
.video-container iframe, .video-container object, .video-container embed {
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
}
.container-fluid,.row{
width:100%;
margin:0;
padding:0;
max-width:100%;
}
.footertext {
font-family: 'Oxygen', sans-serif;
font-weight: 100;
font-size: 15px;
color: white;
margin-left: 30px;
opacity: 0.8;
text-align: right;
}
.lastbox {
font-family: 'Oxygen', sans-serif;
font-weight: 100;
font-size: 19px;
text-align: center;
}
.footer {
background-size: cover;
font-family: 'Oxygen', sans-serif;
margin:0;
padding:0;
box-shadow: inset 0 0 0 1000px rgba(0,0,0,.2);
padding: 10px 0 10px 0;
}
.boxmain {
background-color: white;
width: 100%;
min-height: 12.500em;
background-size: cover;
max-width: 100%;
margin-bottom: 100px;
padding-bottom: 15px;
}
.logo {
display: block;
width: 75%;
height: 96%;
margin: auto;
max-width: 100%;
margin-bottom: -30px;
}
.navbar .nav > li > a {
color: #F2F4F4;
font-family: 'Catamaran', sans-serif;
font-weight: 300;
font-size: 17px;
text-transform: uppercase;
padding-left: 35px;
text-decoration: none;
letter-spacing: 1px;
}
.navbar-default {
margin-top: 0px;
background: #000;
background: rgba(0,0,0,0.1);
border-color: transparent;
}
#media (min-width: 768px){
.navbar-nav {
float:none;
margin: 0 auto;
display: table;
table-layout: fixed;
}
}
.himage {
position: relative;
width: 300px;
border-radius: 15px;
height: 434.5px;
margin: 10px;
float: left;
}
.htext {
display: none;
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 400px;
box-shadow: inset 0 0 0 1000px rgba(0,0,0,.5);
text-align: center;
font-family: 'Oxygen', sans-serif;
font-weight: 300;
font-size: 17px;
padding-left: 5px;
padding-right: 5px;
}
.hheader {
font-family: 'Oxygen', sans-serif;
font-weight: 400;
font-size: 50px;
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 436px;
text-align: center;
padding-top: 100px;
box-shadow: inset 0 0 0 1000px rgba(0,0,0,.2);
}
.upage {
opacity: 0.7;
}
span {
color: white;
}
.servicesimg {
padding-top: 1.250em;
padding-bottom: 2.188em;
border-radius: 0.625em;
height: auto;
max-width: 100%;
padding-left: 1.25em;
margin-right: 1.25em;
}
.servicesheading {
margin-top: 0.325em;
font-family: 'Oxygen', sans-serif;
text-align: center;
margin-bottom: 0.02933333333333em;
font-weight: 300;
font-size: 35px;
}
.underhserv {
font-family: 'Oxygen', sans-serif;
font-weight: 300;
font-size: 95%;
padding-top: 3px;
margin-left: 1.25em;
max-width: 100%;
}
.teamimg {
padding-top: 0.450em;
padding-bottom: 1.188em;
border-radius: 0.625em;
height: auto;
max-width: 100%;
padding-left: 1.25em;
margin-right: 1.25em;
}
.connectsc {
margin-left: 1.25em;
margin-bottom: 15px;
}
.followb {
margin-left: 1.25em;
margin-bottom: -40px;
}
#likebox-wrapper * {
width: 100% !important;
margin-bottom: 5px;
}
.underhcontact {
padding-top: 1.750em;
margin-left: 1.25em;
max-width: 100%;
font-size: 30px;
font-family: 'Oxygen', sans-serif;
font-weight: 400;
}
.pgspacer {
margin-bottom: 60px;
}
.eventpadding {
margin-top: 1.250em;
margin-bottom: 2.188em;
}
.margin1 {
margin-top: 13px;
margin-bottom: 7px;
}
.breadcrumb {
border: 0px solid rgba(245, 245, 245, 1);
background-color: white;
margin-left: 1.25em;
font-family: 'Catamaran', sans-serif;
font-weight: 300;
}
.breadcrumb li {
font-size: 14px;
}
.breadcrumb a {
color: rgba(66, 139, 202, 1);
}
.breadcrumb a:hover {
color: rgba(42, 100, 150, 1);
}
.breadcrumb>.active {
color: rgba(153, 153, 153, 1);
}
.breadcrumb>li+li:before {
color: rgba(204, 204, 204, 1); content: "\002F\00a0";
}
.mediaheading {
margin-top: 0.325em;
font-family: 'Oxygen', sans-serif;
text-align: center;
margin-bottom: 0.7933333333333em;
font-weight: 300;
font-size: 35px;
}
.bottombox {
margin-top: 30px;
}
.caption {
display: inline-block;
position: relative;
overflow: hidden;
-webkit-transform: translateZ(0);
margin-right: 1.25em;
margin-top: 1.250em;
margin-bottom: 2.188em;
margin-left: 1.25em;
}
.caption::before {
content:' ';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: transparent;
transition: background .35s ease-out;
}
.imageh:hover + .caption::before {
box-shadow: inset 0 0 0 1000px rgba(0,0,0,.5);
}
.imageh {
position: absolute;
display: block;
height: 100%;
width: 100%;
z-index: 1;
}
.caption__overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: 10px;
color: white;
-webkit-transform: translateY(100%);
transform: translateY(100%);
transition: -webkit-transform .35s ease-out;
transition: transform .35s ease-out;
}
.imageh:hover + .caption .caption__overlay {
-webkit-transform: translateY(0);
transform: translateY(0);
}
.caption__media{
padding-top: 130px;
max-width: 100%;
}
.linkstyle {
padding-top: 20px;
font-family: 'Oxygen', sans-serif;
font-weight: 300;
}
.servicesspace {
margin-bottom: 30px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Eye Of The Storm Productions - Services </title>
<meta charset="utf-8">
<!--[if IE]>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="description" content="">
<script type="text/javascript" src='jQuery/jquery-1.9.1.min.js'></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- Google Fonts -->
<link href="http://fonts.googleapis.com/css?family=Shadows+Into+Light|Oswald:400,300,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Oxygen:300,400" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Catamaran" rel="stylesheet">
<!-- Css -->
<link rel="stylesheet" href="http://eyeofthestormproductions.com/gettingthere/css/bootstrap-grid.min.css" />
<link rel="stylesheet" href="http://eyeofthestormproductions.com/gettingthere/css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<!-- navbar -->
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li>home</li>
<li>artists</li>
<li class="upage">services</li>
<li>events</li>
</ul>
</div>
</nav>
<!-- navbar -->
<img class="logo img-fluid" alt="Eye Of The Storm" src="logo.png">
<div class="boxmain">
<div class="container-fluid">
<div class="row">
<div class="servicesspace"></div>
<div class="col-md-6 col-sm-12 col-xs-12">
<p class="servicesheading">Producer's & DJ'S</p>
<p class="underhserv">Music is at the heart and core of each one of us, so it is obviously important to us that we represent this through our selection of label DJ’s and Producers.
Eye Of The Storm hosts 5 DJ acts, and 5 Live acts,
which between them cover a diverse range of cutting-edge EDM.
Psytrance, Progressive Trance, Techno, Minimal, Glitch Hop and
Bass are the primary styles of music we aim to deliver, however we
strive for a unique, innovative sound that connects our heritage and vision.</p>
<span class="imageh"></span>
<div class="caption img-responsive">
<img src="http://eyeofthestormproductions.com/gettingthere/livemusic.png" />
<div class="caption__overlay">
<div class="caption__overlay__content">
<h1 style="text-align:center" id="hello" class="caption__media"><a style="color:white;" href="artists.html">OUR ARTISTS</a></h1>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12 col-xs-12">
<h1 class="servicesheading">Film and Photography</h1>
<p class="underhserv">Our fantastic media and photography crew are some of the best young event photographers in Australia.
With their dynamic and enthusiastic approach behind the lens, each photographer has developed a reputation for beautifully capturing any event in all scenarios.</p>
<br>
<span class="imageh"></span>
<div class="caption img-responsive">
<img src="http://eyeofthestormproductions.com/gettingthere/photography.png" />
<div class="caption__overlay">
<div class="caption__overlay__content">
<h1 style="text-align:center" id="hello" class="caption__media"><a style="color:white;" href="artists.html">OUR MEDIA TEAM</a></h1>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-12 col-xs-12">
<h1 class="servicesheading">Stage management</h1>
<p class="underhserv">We offer a professional team of stage managers all with countless hours of on-stage experience.
Working at a wide variety of events has lead to an extensive knowledge of electronic equipment and devices, sound, lighting, communication, organization and authority.
This knowledge and experience makes the Eye Of The Storm stage management team very effective and easy to work with.</p>
<span class="imageh"></span>
<div class="caption img-responsive">
<img src="http://eyeofthestormproductions.com/gettingthere/stagemanagment.png" />
<div class="caption__overlay">
<div class="caption__overlay__content">
<h1 style="text-align:center" id="hello" class="caption__media"><a style="color:white;" href="artists.html">STAGE MANAGEMENT TEAM</a></h1>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-sm-12 col-xs-12">
<h1 class="servicesheading">Stage Design and Construction</h1>
<p class="underhserv">Our friends from Fulcrum Designs provide all of our stages, shade sails, projections and 3D mapping.
From small, cost effective staging solutions, through to full size festival fit outs.
We have a number of professional labourers and experienced fabricators who all have helped in large festivals and productions across Australia.
As well as past and current employment in roles such as lighting technician, audio technician, décor, rigging, landscaping, cabinet making, welding, fabricating and hard physical labour.</p>
<span class="imageh"></span>
<div class="caption img-responsive">
<img src="http://eyeofthestormproductions.com/gettingthere/stagedesign.png" />
<div class="caption__overlay">
<div class="caption__overlay__content">
<h1 style="text-align:center" id="hello" class="caption__media"><a style="color:white;" href="artists.html">FULCRUM DESIGNS TEAM</a></h1>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-12 col-xs-12">
<h1 class="servicesheading">Graphic Design</h1>
<p class="underhserv">Eye of the Storm Productions works in collaboration with a range of
aspiring graphic designers capable of producing stunning artworks with intricate detail. Our range of
designer allows as to complete pieces and graphics projects very quickly,
regardless of what you need or when you need it, it's not an issue.</p>
<span class="imageh"></span>
<div class="caption img-responsive">
<img src="graphics.jpg" />
<div class="caption__overlay">
<div class="caption__overlay__content">
<h1 style="text-align:center" id="hello" class="caption__media"><a style="color:white;" href="artists.html">GRAPHIC DESIGN TEAM</a></h1>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="footer">
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12">
<div id="likebox-wrapper">
<iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Feyeofthestormpro&width=450&layout=standard&action=like&size=small&show_faces=true&share=true&height=80&appId" width="450" height="80" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
</div>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<p class="footertext">Copyright © 2017 Eye Of The Storm Productions. All Rights Reserved.</p>
<p class="footertext">Website developed by Charlie Fisher</p>
</div>
</div>
</div>
</div>
</body>
</html>
Also I was going to post this question separately but. The hyperlink on the interactive images doesn't work once clicked. I believe that there are some layers that are not allowing it to work. Is there anyway to bring it forward? Thanks!
Basically i want my see more button, when clicked to enlarge the image above it. So that the image appears in the middle of the page enlarged does anyone know of a way to do this, or a tutorial i could follow, would be much appreciated. by the way im fairly new to web design so a little help thanks!
Also the objects i want to change are under portfolio item
here is a link to the website:
http://www.mmicgt.com/michael_g/portfolio.html
HTML:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>{Michael Grace} Portfolio website - {Gracey design}</title>
<link href="css/gallery.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<ul id="navigation">
<li><img src="images/images/home_button2.gif" onmouseover="this.src='images/images/home_button1.gif'" onmouseout="this.src='images/images/home_button2.gif'"/>
</li>
<li><img src="images/images/about_button1.gif" onmouseover="this.src='images/images/about_button2.gif'" onmouseout="this.src='images/images/about_button1.gif'"/>
</li>
<li>
<div id="logo" style="padding:16px">
<img src="images/images/logo.png" />
</div>
</li>
<li><img src="images/images/gallery_button1.gif" onmouseover="this.src='images/images/gallery_button2.gif'" onmouseout="this.src='images/images/gallery_button1.gif'"/>
</li>
<li><img src="images/images/contact_button1.gif" onmouseover="this.src='images/images/contact_button2.png'" onmouseout="this.src='images/images/contact_button1.gif'"/>
</li>
</ul>
<div id="header">
<h1><img src="images/images/gallery_03.png" /></h1>
<h2>Portfolio.</h2>
</div>
<div id="line">
</div>
<div id="content">
<p>Did I mention I design stuff? I've had plenty of fun creating a bunch of designs for both Univeristy and for myself as personal projects. Here's a collection of some of my favs.
</p>
<div class="portfolio-item">
<img src="images/home/image1.gif" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image2.gif" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image3.gif" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image4.gif" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image5.png" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image6.png" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image7.png" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image8.gif" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
</div>
</div>
</div>
</body>
css:
body {
background: url(../images/images/bg_page.gif) center center;
font: 16px Helvetica, Arial, Sans-Serif;
color: #636363;
line-height: 24px;
}
#container {
width: 940px;
margin: 0 auto;
margin-top: 100px;
}
#header {
height: 177px;
background: url(../images/home/header.gif) top center;
padding: 52px 0 0 28px;
position: relative;
border-radius: 10px 10px 0px 0px;
}
#header h1 {
margin: 0px 0 20px 0;
}
#header h2 {
width: 510px;
font: 30px Helvetica, Arial, Sans-Serif;
color: #f2f0eb;
letter-spacing: 2px;
margin: 0 0 20px 0;
text-shadow: 0px 3px 3px #494949;
}
#logo {
width: 272px;
height: 214px;
position: absolute;
left: 49.5%;
top: 11%;
margin-left: -150px;
margin-top: -86px;
z-index: 2;
}
#navigation {
position: relative;
height: 60px;
}
#navigation li {
display: inline;
width: 160px;
height: 60px;
float: left;
padding: 13px 0 0 16px;
}
#navigation li:nth-child(1) {
margin: 0 0 0 -57px;
}
#navigation li:nth-child(2) {
margin: 0 0 0 0;
}
#navigation li:nth-child(3) {
margin: 0 0 0 0;
}
#navigation li:nth-child(4) {
margin: 0 0 0 77px;
}
#content {
height: 592px;
background: url(../images/home/bg_body.png) top center;
padding: 41px 69px 50px 28px;
overflow: hidden;
position: relative;
border-radius: 0px 0px 10px 10px;
}
#content h2 {
font: 30px Helvetica, Arial, Sans-Serif;
letter-spacing: 2px;
margin: 0 0 20px 0;
}
#content h3 {
font: 26px Helvetica, Arial, Sans-Serif;
letter-spacing: 2px;
margin: 0 0 20px 0;
}
#content p {
margin: 0 0 30px 0;
}
#content a {
color: #671111;
text-decoration: none;
}
#content a:hover {
color: #a12121;
}
#content .portfolio-item {
width: 190px;
padding: 1px;
background: #eee;
text-align: center;
float: left;
margin: 0 7px 14px 7px;
}
#content .portfolio-item p.btn {
margin: 0;
}
#content .portfolio-item p.btn a {
display: block;
width: 183px;
height: 29px;
padding: 7px 0 0 0;
background: url(images/images/background-seemore_03.gif);
font-weight: bold;
text-align: center;
text-transform: uppercase;
text-decoration: none;
}
#line {
height: 4px;
background: url(../images/home/line.gif) top center;
position: relative;
}
You should look for satisfying js lib for that. They are often easy-to-install and do not require any coding for basic usage. Here're some popular examples:
LightBox - Very popular lib
FancyBox - I used it for most of my projects, it's lightweight and really fancy
Theese libs support HTML content to show up, so you can add any content to youy pictures. They are recommended, because they are developed for a long time and stable enough. Good luck!
EDIT:
<!-- Usage example -->
See more
Link can have any inline content - image, text, etc.