I've been stuck on a problem for over 2 days and I need to ask for help. On Desktop browsers the icons are suppose to left align and in mobile browsers they are are suppose to center align.
Here is the site so far.
Inspect Site Here
I've created a website where the layout is comprised of stacked sections where height and width values of each section are defined using VH percentages to get a specific layout.
This is an example of how a section is defined in the CSS.
.content3 {
height: 100vh;
width: 100%;
display: table;
background: #FFFFFF url('../img/chair.png') no-repeat center center;
background-size: 60%;
}
Here is how I defined the footer's CSS.
.footer {
height: 40vh;
width: 100%;
background: #312D3B;
}
Here is the HTML for the .footer
<section class="footer">
<div class="Social">
<img class="icons" src="img/dribbble.svg">
<img class="icons2" src="img/twitter.svg">
<img class="icons3" src="img/instagram.svg">
</div>
Here is the CSS for the .Social class
.Social {
height: 100%;
float: left;
position: relative;
}
Here is the CSS for the .icons class
.icons {
bottom: 0;
left: 0;
margin: auto;
position: absolute;
right: 0;
top: 0;
padding-left: 3.5em;
}
Here is the CSS for the .icons2 class
.icons2 {
bottom: 0;
left: 4.5em;
margin: auto;
position: absolute;
right: 0;
top: 0;
padding-left: 3.5em;
}
Here is the css for the icons3 class
.icons3 {
bottom: 0;
left: 9em;
margin: auto;
position: absolute;
right: 0;
top: 0;
padding-left: 3.5em;
}
Please help. This is my first question ever on this site.
You can use flexbox to help you with this issue, just replace style.css code with this one
CSS:
/* --------------------------------
Primary style
-------------------------------- */
*, *::after, *::before {
box-sizing: border-box;
}
body {
font-family: sans-serif;
line-height: 1;
margin: 0;
width: 100%;
height: 100%;
background: #1C1D21;
}
/* --------------------------------
Final project
-------------------------------- */
main {
position: relative;
z-index: 1;
height: 100vh;
overflow: hidden;
box-shadow: 0 0 50px #000;
transition: transform .5s;
}
.nav-open main {
transform: scale(.8);
}
.intro {
height: 90vh;
width: 100%;
display: table;
background: #FCC732 url('../img/WatchByMaz2.png') no-repeat center center;
background-size: 90%;
}
.content {
height: 100vh;
width: 100%;
display: table;
background: #FFFFFF url('../img/OculusConsumerByMaz.png') no-repeat center center;
background-size: 90%;
}
.content2 {
height: 100vh;
width: 100%;
display: table;
background: #FCC732 url('../img/speedingAppByMaz.png') no-repeat center center;
background-size: 90%;
}
.content3 {
height: 100vh;
width: 100%;
display: table;
background: #FFFFFF url('../img/chair.png') no-repeat center center;
background-size: 60%;
}
.footer {
height: 40vh;
width: 100%;
background: #312D3B;
}
.main-header {
position: relavtive;
background: #fff;
width: 100%;
top: 0;
}
section .center {
display: table-cell;
vertical-align: bottom;
text-align: center;
padding-bottom: 4em;
}
.btn {
-webkit-border-radius: 28;
-moz-border-radius: 28;
border-radius: 28px;
font-family: 'lulo_cleanone' , Arial, sans-serif;
color: #312D3B;
font-size: 16px;
padding: 10px 20px 10px 20px;
border: solid #312D3B 2px;
text-decoration: none;
}
.btn:hover {
text-decoration: none;
}
.logo {
position: fixed;
z-index: 1;
top: 43px;
left: 44px;
white-space: nowrap;
}
h1 {
font-family: 'lulo_cleanone_bold' , Arial, sans-serif;
display: table-cell;
vertical-align: middle;
text-align: center;
font-size: 90px;
color: #312D3B;
}
.nav-trigger {
position: fixed;
z-index: 4;
top: 40px;
right: 46px;
height: 44px;
width: 44px;
overflow: hidden;
color: transparent;
white-space: nowrap;
text-indent: 100%;
}
.nav-trigger span,
.nav-trigger span::before,
.nav-trigger span::after {
position: absolute;
height: 4px;
width: 40px;
background: #000000;
}
.nav-trigger span {
width: 29px;
}
.nav-trigger span {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
transition: background .3s;
}
.nav-trigger span::before,
.nav-trigger span::after {
content: '';
top: 0;
left: 0;
transition: background .3s, transform .3s;
}
.nav-trigger span::before {
transform: translateY(-12px);
}
.nav-trigger span::after {
transform: translateY(12px);
}
.nav-trigger:hover span,
.nav-trigger:hover span::before,
.nav-trigger:hover span::after {
background: #000000;
}
.nav-open .nav-trigger span {
background: transparent;
}
.nav-open .nav-trigger span::before,
.nav-open .nav-trigger span::after {
background: #FFFFFF;
}
.nav-open .nav-trigger span::before {
transform: rotate(-45deg);
}
.nav-open .nav-trigger span::after {
transform: rotate(45deg);
}
.overlay {
position: fixed;
z-index: 2;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #1C1D21;
opacity: 0;
visibility: hidden;
transition: opacity .5s, visibility .5s;
}
.nav-open .overlay {
opacity: .6;
visibility: visible;
}
.nav-container {
position: fixed;
z-index: 3;
top: 0;
right: 0;
height: 100%;
width: 90%;
max-width: 460px;
padding: 2em 3.5em;
background: #312D3B;
overflow: hidden;
transform: translateZ(0);
transform: translateX(100%);
transition: transform .5s cubic-bezier(.07,.23,.34,1);
}
.nav-open .nav-container {
transform: translateX(0);
}
.nav-container h2 {
font-size: 12px;
font-family: 'lulo_cleanone' , Arial, sans-serif;
text-transform: uppercase;
color: #AAAAAA;
margin: 2.3em 0;
}
.nav {
list-style: none;
padding: 0;
}
.nav a {
display: block;
padding: .4em 0;
font-size: 30px;
font-weight: bold;
font-family: 'lulo_cleanone' , Arial, sans-serif;
text-decoration: none;
color: #FFFFFF;
transform: translateZ(0);
}
.nav-open .nav a {
animation: slide-in .4s .2s backwards;
}
.nav-open .nav li:nth-of-type(2) a {
animation-delay: .3s;
}
.nav-open .nav li:nth-of-type(3) a {
animation-delay: .4s;
}
.nav-open .nav li:nth-of-type(4) a {
animation-delay: .5s;
}
.nav-open .nav li:nth-of-type(5) a {
animation-delay: .6s;
}
#keyframes slide-in {
0% {
opacity: 0;
transform: translateX(80px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
.Social {
height: 100%;
display: flex;
justify-content: space-between;
width: 60%;
margin: 0 auto;
}
.icons {
}
.icons2 {
padding-left: 5.5em;
}
.icons3 {
padding-left: 6em;
}
.portfolio_nav {
height: 20vh;
width: 100%;
background: #312D3B;
}
.left_tab {
width: 49%;
height:100%;
background: #312D3B;
float: left;
position: relative;
}
.right_tab {
width: 49%;
height:100%;
background: #FFC600;
float: right;
position: relative;
}
.arrow {
max-height: 100%;
max-width: 100%;
width: auto;
height: auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
.middle2 {
display: table-cell;
vertical-align: middle;
text-align: center;
}
#font-face {
font-family: 'lulo_cleanone_bold';
src: url('../yellow_design_studio_-_lulo_clean_one_bold-webfont.eot');
src: url('../yellow_design_studio_-_lulo_clean_one_bold-webfont.eot?#iefix') format('embedded-opentype'),
url('../yellow_design_studio_-_lulo_clean_one_bold-webfont.woff2') format('woff2'),
url('../yellow_design_studio_-_lulo_clean_one_bold-webfont.woff') format('woff'),
url('../yellow_design_studio_-_lulo_clean_one_bold-webfont.ttf') format('truetype'),
url('../yellow_design_studio_-_lulo_clean_one_bold-webfont.svg#lulo_cleanone_bold') format('svg');
font-weight: normal;
font-style: normal;
}
#font-face {
font-family: 'lulo_cleanone';
src: url('../yellow_design_studio_-_lulo_clean_one-webfont.eot');
src: url('../yellow_design_studio_-_lulo_clean_one-webfont.eot?#iefix') format('embedded-opentype'),
url('../yellow_design_studio_-_lulo_clean_one-webfont.woff2') format('woff2'),
url('../yellow_design_studio_-_lulo_clean_one-webfont.woff') format('woff'),
url('../yellow_design_studio_-_lulo_clean_one-webfont.ttf') format('truetype'),
url('../yellow_design_studio_-_lulo_clean_one-webfont.svg#lulo_cleanone') format('svg');
font-weight: normal;
font-style: normal;
}
/* --------------------------------
Desktop Media Queries
-------------------------------- */
#media screen and (min-width: 700px) {
.intro {
height: 100vh;
width: 100%;
display: table;
background: #FCC732 url('../img/WatchByMaz2.png') no-repeat center center;
background-size: 60%;
}
.content {
height: 100vh;
width: 100%;
display: table;
background: #F6F3F3 url('../img/OculusConsumerByMaz.png') no-repeat center center;
background-size: 60%;
}
.content2 {
height: 100vh;
width: 100%;
display: table;
background: #FCC732 url('../img/speedingAppByMaz.png') no-repeat center center;
background-size: 60%;
}
.content3 {
height: 100vh;
width: 100%;
display: table;
background: #FFFFFF url('../img/chair.png') center no-repeat;
background-size: 30%;
}
.Social {
display: flex;
justify-content: space-around;
height: 100%;
width: 30%;
margin: 0 auto;
}
.icons {
}
.icons2 {
padding-left: 3.5em;
}
.icons3 {
padding-left: 3.5em;
}
Here's a way to do it. Remove all absolute positions of .icon, .icon2and.icon3
Add this code on desktop :
.Social {
height: 100%;
float: left;
position: relative;
width: 100%;
text-align: left;
line-height: 40vh;
}
And this code on mobile with a media query for example :
#media (max-width: 640px) {
.Social {
text-align: center;
}
}
Change padding-left values for mobile like this :
.icons { padding-left: 1em; }
.icons2 { padding-left: 1em; }
.icons3 { padding-left: 1em; }
And keep padding-left values for desktop like this for example :
.icons { padding-left: 3.5em; }
.icons2 { padding-left: 3.5em; }
.icons3 { padding-left: 3.5em; }
I've tested it, it should works.
Related
I'm not knowing how to increase the height of vitaminpic, which is under container. I'm still new to development, and I know this seems like an amateur mistake. I tried everything I can but it's not working. I believe it has to do with with the fact that it is under the container. I'm trying to make a website that sells vitamins, still new to it but I'm still trying.
#import url('https://fonts.googleapis.com/css2?family=Syne+Mono&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}
.background {
width: 100%;
height: 100vh;
background-color: #e0d1cb;
position: relative;
overflow: hidden;
z-index: 2;
}
.nav {
position: fixed;
top: 0;
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
min-height: 8vh;
background-color: #e0d1cb;
font-family: 'Syne Mono', monospace;
z-index: 3;
}
.nav-links {
display: flex;
justify-content: space-around;
width: 30%;
font-family: 'Syne Mono', monospace;
}
.nav-links li {
list-style: none;
font-family: 'Syne Mono', monospac
}
.nav-links a {
color: rgb(0, 0, 0);
text-decoration: none;
letter-spacing: 2px;
font-weight: bold;
font-size: 14px;
font-family: 'Syne Mono', monospac
}
.burger {
display: none;
}
.burger div {
width: 25px;
height: 3px;
background-color: rgb(226, 226, 226);
margin: 5px;
transition: all 0.3s ease;
}
#media screen and (max-width: 1024px) {
.nav-links {
width: 60%;
}
}
#media screen and (max-width: 768px) {
body {
overflow-x: hidden;
}
.nav-links {
position: fixed;
right: 0px;
height: 92vh;
top: 8vh;
background-color: #e0d1cb;
display: flex;
flex-direction: column;
align-items: center;
width: 20%;
transform: translateX(100%);
transition: transform 0.5s ease-in;
}
.nav-links li {
opacity: 0;
}
.burger {
display: block;
cursor: pointer;
}
}
.nav-active {
transform: translateX(0%);
}
#keyframes navLinkFade {
from {
opacity: 0;
transform: translateX(50px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.toggle .line1 {
transform: rotate(-45deg) translate(-5px, 6px);
}
.toggle .line2 {
opacity: 0;
}
.toggle .line3 {
transform: rotate(45deg) translate(-5px, -6px);
}
#import url('https://fonts.googleapis.com/css2?family=Syne+Mono&display=swap');
.logo {
resize: both;
font-family: 'Syne Mono', monospace;
}
.link::after {
content: '';
display: block;
width: 0;
height: 2px;
background: #000000;
transition: width .3s;
}
.link:hover::after {
width: 100%;
transition: width .3s;
}
.header {
width: 100%;
background-color: rgba(0, 0, 0, 0.5)
}
.header ul {
text-align: center;
}
.header ul li {
list-style: none;
display: inline-block;
}
.header ul li a {
display: block;
text-decoration: none;
text-transform: uppercase;
color: white;
font-size: 100%;
letter-spacing: 2px;
font-weight: 600;
padding: 25px;
transition: width .3s;
}
.content {
color: #fbfcfd;
position: absolute;
top: 50%;
left: 8%;
transform: translateY(-50%);
z-index: 2;
}
.heading1 {
font-size: 300%;
margin-bottom: 10px 0 30px;
background: transparent;
position: relative;
animation: text 5s 1;
left: 120%;
}
#keyframes text {
0% {
color: transparent;
margin-bottom: -40px;
}
30% {
letter-spacing: 4px;
margin-bottom: -40px;
}
85% {
letter-spacing: 3px%;
margin-bottom: -40px;
}
}
.welcome {
font-size: 30px;
position: relative;
}
.container {
position: absolute;
height: 80%;
width: 30%;
background: #dfcac1;
top: 50%;
left: 35%;
transform: translate(-43%, -60%);
}
.container img {
size: ;
}
.vitaminpic {
width: 100%;
transform: translate(10%, 80%);
padding: 0 10;
}
<head>
<link rel="stylesheet" href="home.css">
</head>
<header class="site-header"></header>
<div class="background">
<div class="nav">
<h1 class="logo">Realvite</h1>
<ul class="nav-links">
<li>
<a href="#" class="link1">
<div class="link1">Home</div>
</a>
</li>
<li>Shop</li>
<li>Contact</li>
</ul>
<div class="burger">
<div class="line1"></div>
<div class="line2"></div>
<div class="line3"></div>
</div>
</div>
</nav>
<div class="container">
<img src="/images/capsule-1079838_1920.jpg" alt="" class="vitaminpic">
</div>
<p style="font-size: 1px;">قيل قديقال</p>
<div class="content">
<small class="welcome"></small>
<h1 class="heading1"></h1>
</div>
</div>
<script src="script.js"></script>
If I were you I would use Bootstrap columns, because not only are these easily configurable, but importing bootstrap also allows you to use a wide variety of HTML, CSS and Javascript libraries which are widely supported. Here's the link - https://getbootstrap.com
In the meantime though, I would recommend removing this:
.container img {
size: ;
}
and changing your container width to 50% to see if that works, because currently you've set your container to 30% width, whereas your image is larger than that, so it isn't fitting inside the container. If 50% doesn't work then try a few different values to try and get it to fit, but as mentioned I would recommend Bootstrap, then you can use "col-md-4" and set the background for that, would probably be much more convenient for you in the long run! :)
can someone please help me. I'm facing an issue where my page doesn't scroll down and the paragraphs don't appear in the body but on the header of my page. I have removed all unnecessary overflow elements from the CSS but that did not do anything.
https://codepen.io/arvindr2002/pen/oNzzMQb.
Thank you.
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-family: 'Raleway', sans-serif;
background-color: black;
}
header {
background-image: url(../images/Game.jpg);
height: 100%;
width: 100%;
-webkit-background-size: cover;
background-size: cover;
background-position: right-side;
position: fixed;
}
nav {
position: fixed;
z-index: 10;
left: 0;
right: 0;
top: 0;
padding: 0 5%;
height: 45px;
background-color: #E94B3CFF;
}
nav .logo {
float: left;
width: 40%;
height: 100%;
display: flex;
align-items: center;
font-size: 24px;
color: #fff;
}
nav a:hover {
border-top: 2px red;
border-bottom: 4px solid white;
padding: 6px 0;
}
nav .nav-area {
float: right;
padding: 0;
margin: 0;
width: 60%;
height: 100%;
display: flex;
justify-content: space-around;
align-items: center;
}
nav .nav-area li {
list-style: none;
}
nav .nav-area a {
display: block;
padding: 1em;
font-size: 16px;
font-weight: bold;
color: #fff;
text-decoration: none;
}
#nav-toggle {
position: absolute;
top: -100px;
}
nav .icon-burger {
display: none;
position: absolute;
right: 5%;
top: 50%;
transform: translateY(-50%);
}
nav .icon-burger .line {
width: 30px;
height: 5px;
background-color: #fff;
margin: 5px;
border-radius: 3px;
transition: all .3s ease-in-out;
}
#media screen and (max-width: 768px) {
nav .logo {
float: none;
width: auto;
justify-content: center;
}
nav .nav-area { /* transforing toggle-bar */
float: none;
position: fixed;
z-index: 9;
left: 0;
right: 0;
top: 100px;
bottom: 100%;
width: auto;
height: auto;
flex-direction: column;
justify-content: space-evenly;
background-color: rgba(0,0,0,.8);
box-sizing: border-box;
transition: all .5s ease-in-out;
}
nav .a {
font-size: 20px;
}
nav :checked ~ .nav-area {
bottom: 0;
}
nav .icon-burger {
display: block;
}
nav :checked ~ .icon-burger .line:nth-child(1) {
transform: translateY(10px) rotate(225deg);
}
nav :checked ~ .icon-burger .line:nth-child(3) {
transform: translateY(-10px) rotate(-225deg);
}
nav :checked ~ .icon-burger .line:nth-child(2) {
opacity: 0;
}
}
.welcome-text {
position: fixed;
width: 600px;
height: 300px;
margin: 25% 30%;
text-align: center;
}
.welcome-text h1 {
text-align: center;
color: #fff;
text-transform: uppercase;
font-size: 60px;
}
.welcome-text h1 span {
color: #E94B3CFF;
}
.glow{
position: relative;
display: inline-block;
padding: 20px 15px;
margin: 10px 1;
color: #E94B3CFF;
text-decoration: none;
text-transform: uppercase;
transition: 0.5s;
letter-spacing: 4px;
overflow: hidden;
margin-right: 20px;
}
.glow:hover{
background: #E94B3CFF;
color: #050801;
box-shadow: 0 0 5px #E94B3CFF,
0 0 25px #E94B3CFF,
0 0 50px #E94B3CFF,
0 0 200px #E94B3CFF;
-webkit-box-reflect:below 1px linear-gradient(transparent, #0005);
}
.glow span{
position: absolute;
display: block;
}
.glow span:nth-child(1){
top: 0;
left: 0;
width: 100%;
height: 2px;
background: linear-gradient(90deg,transparent,#E94B3CFF);
animation: animate1 1s linear infinite;
}
#keyframes animate1{
0%{
left: -100%;
}
50%,100%{
left: 100%;
}
}
.glow span:nth-child(2){
top: -100%;
right: 0;
width: 2px;
height: 100%;
background: linear-gradient(180deg,transparent,#E94B3CFF);
animation: animate2 1s linear infinite;
animation-delay: 0.25s;
}
#keyframes animate2{
0%{
top: -100%;
}
50%,100%{
top: 100%;
}
}
.glow span:nth-child(3){
bottom: 0;
right: 0;
width: 100%;
height: 2px;
background: linear-gradient(270deg,transparent,#E94B3CFF);
animation: animate3 1s linear infinite;
animation-delay: 0.50s;
}
#keyframes animate3{
0%{
right: -100%;
}
50%,100%{
right: 100%;
}
}
.glow span:nth-child(4){
bottom: -100%;
left: 0;
width: 2px;
height: 100%;
background: linear-gradient(360deg,transparent,#E94B3CFF);
animation: animate4 1s linear infinite;
animation-delay: 0.75s;
}
#keyframes animate4{
0%{
bottom: -100%;
}
50%,100%{
bottom: 100%;
}
}/*resposive*/
I get a really strange behavior on a very simple html landing page.
The page is the following: http://fw2019.gosrl.webfactional.com/
If you try to click on any link (FB icon, Instagram icon, years of the previous edition) the yellow shape on the background suddenly move to the right.
The page is pure html + css, with no javascript attached.
I've tried to:
- deactivate any transition/animation when hovering Social Icons
- check if I get the same behavior at a lower resolution -> YES
html,
body {
margin: 0;
height: 100%;
font-family: "Open Sans", arial, sans-serif;
}
.main-image {}
.main-image img {
margin: 30px auto;
display: block;
max-width: 600px;
width: 100%;
}
.content-wrapper,
.fake-content-wrapper {
position: absolute;
text-align: center;
width: 1636px;
height: 562px;
background: url(/wp-content/asset/grid-svg-4-01.svg);
overflow: hidden;
margin: 0 auto;
z-index: 99;
}
.fake-content-wrapper {
position: absolute;
overflow: visible;
left: 50%;
top: -130px;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
background: transparent;
z-index: 56;
}
.content-wrapper p {
text-align: center;
margin-bottom: 5px;
margin-top: 0;
}
.content-wrapper h1 {
text-align: center;
margin-top: 0;
}
.main-container {
display: table;
width: 100%;
height: 100%;
}
.main-content {
vertical-align: middle;
position: relative;
height: 100%;
padding: 0;
margin: 0;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
align-items: center;
justify-content: center;
}
.titolo {
display: inline-block;
width: 772px;
height: 208px;
position: absolute;
top: 176px;
left: 345px;
background: #fff;
margin: 0;
padding: 32px 25px;
box-sizing: border-box;
margin-left: 1px;
margin-top: 1px;
font-family: titling-gothic-fb-wide, sans-serif;
font-style: normal;
font-weight: 700;
text-transform: uppercase;
font-size: 64px;
line-height: 70px;
z-index: 999;
text-align: left;
}
.logo-container {
background: #000;
width: 171px;
height: 138px;
position: absolute;
left: 1120px;
top: 212px;
padding: 28px;
box-sizing: border-box !important;
z-index: 999;
}
.logo-container img {
width: 100%;
}
.sponsor-container {
position: absolute;
right: 260px;
top: 37px;
background: #fff;
width: 428px;
height: 68px;
padding: 8px;
box-sizing: border-box;
text-align: center;
z-index: 999;
}
.date-container {
box-sizing: border-box;
background: #fff;
position: absolute;
width: 944px;
left: 346px;
top: 422px;
text-align: center;
z-index: 999;
font-family: "Space Mono", monospace;
padding: 6px 10px;
}
.date-container>div {
display: inline-block;
text-transform: uppercase;
padding: 0;
margin-right: 10px;
font-size: 56px;
line-height: 100%;
}
.date-container .light {
font-weight: 400;
}
.date-container .bold {
font-weight: 700;
}
.blue-box {
box-sizing: border-box;
width: 256px;
height: 0;
background-color: rgba(0, 157, 255, 1);
position: absolute;
background-position: -2px -2px;
right: 2px;
bottom: 2px;
height: 138px;
z-index: 0 !important;
animation-name: enlarge;
animation-duration: 5s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
animation-delay: 1s;
animation-timing-function: linear;
}
#keyframes enlarge {
from {
height: 0;
}
to {
height: 560px;
}
}
#keyframes slide {
0% {
transform: translateY(0);
}
100% {
transform: translateY(-1000px);
}
}
.red-circle {
position: absolute;
left: 40px;
top: 2px;
height: 558px;
width: 562px;
display: inline-block;
box-sizing: border-box;
background-color: #ff003f;
background-position: 130px 136px;
border: 2px solid #000;
border-radius: 1000000px;
z-index: 9;
}
.skate-park {
/* width: 1636px;
height: 1200px; */
position: absolute;
display: block;
background: url(http://fw2019.gosrl.webfactional.com/wp-content/uploads/2019/07/skate-bg-2.png);
/* left: -47px;)
top: 102px; */
background-size: cover;
top: -45px;
left: 300px;
height: 200vh;
width: 100vw;
}
.fake-content-wrapper#circle {
top: 203px;
}
.fake-content-wrapper#rect {
top: 333px;
}
.content-wrapper#skate {
overflow: hidden;
background: none;
position: fixed;
left: -10%;
height: 200vh;
width: 200vw;
position: fixed;
}
.content-wrapper#skate .skate-park {
position: relative;
/* top: -140px; */
}
/* ANIMAZIONE */
/* .blue-box {
animation-name: bluebox;
animation-duration: 20s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
#keyframes bluebox {
0% {transform: translate(0,0);}
6.39% {transform: translate(0,-210px);}
43.61% {transform: translate(-1376px,-210px);}
55.58% {transform: translate(-1376px,210px);}
92.8% {transform: translate(0px,210px);}
100% {transform: translate(0px,0);}
} */
.previous h3,
.previous a {
display: inline-block;
margin-right: 10px;
}
.previous a:last-child {
margin-right: 0;
}
.previous h3 {
font-family: titling-gothic-fb-narrow, sans-serif;
margin-block-start: 0px;
margin-block-end: 0px;
margin-inline-start: 0px;
margin-inline-end: 0px;
font-weight: bold;
margin-right: 10px;
font-weight: 500;
}
.previous a {
font-family: "Space Mono", monospace;
color: #000;
text-decoration: none;
margin-right: 5px;
}
.previous a:hover {
text-decoration: underline;
}
.content-wrapper#footer {
overflow: visible;
background: none;
}
.previous,
.social {
position: absolute;
bottom: -40px;
top: auto;
right: 0;
padding-top: 10px;
padding-bottom: 10px;
}
.social {
bottom: -50px;
left: 0;
right: auto;
}
.social img {
height: 30px;
}
.social a {
margin-right: 5px;
}
.social a img {
transition: all 0.5s ease;
}
/* .social a:hover img {
transform: rotateY(360deg);
} */
#media screen and (max-width: 1919px) and (min-width: 1366px) {
.content-wrapper,
.fake-content-wrapper {
width: 1292px;
}
.titolo,
.date-container {
left: 173px;
}
.date-container {
width: 772px;
left: 174px;
}
.logo-container {
left: 948px;
}
.fake-content-wrapper#circle {
top: 196px;
}
.fake-content-wrapper#rect {
top: 326px;
}
/* .skate-park {
left: -360px;
} */
.date-container>div {
font-size: 46px;
padding-top: 5px;
padding-bottom: 5px;
}
.blue-box {
bottom: -200px;
top: auto;
width: 170px;
}
#keyframes enlarge {
from {
height: 0;
}
to {
height: 760px;
}
}
}
#media screen and (max-width: 1365px) and (min-width: 1024px) {
.content-wrapper {
width: 862px;
}
.sponsor-container {
right: 88px;
}
.titolo,
.date-container {
left: 1px;
width: 686px;
}
.date-container {
left: 2px;
}
.date-container>div {
font-size: 40px;
left: 2px;
padding-top: 8px;
padding-bottom: 8px;
}
.blue-box {
bottom: 2px;
top: auto;
width: 170px;
}
.logo-container {
left: 689px;
}
.content-wrapper#skate {
left: -20%;
width: 200%;
}
}
#media screen and (max-width: 1023px) and (min-width: 768px) {
.content-wrapper {
width: 604px;
}
.sponsor-container {
right: 2px;
}
.titolo {
left: 1px;
font-size: 60px;
width: 600px;
}
.date-container {
left: 2px;
width: 600px;
}
.date-container>div {
font-size: 35px;
margin-right: 4px;
padding-top: 11px;
padding-bottom: 11px;
}
.logo-container {
left: 2px;
top: 37px;
}
.blue-box {
width: 170px;
}
.content-wrapper#skate {
left: -30%;
}
}
#media screen and (max-width: 767px) and (min-width: 375px) {
.content-wrapper {
width: 346px;
}
.titolo {
left: 1px;
font-size: 41px;
line-height: 43px;
height: 138px;
width: 342px;
padding-top: 8px;
}
.logo-container {
top: 37px;
left: 2px;
}
.date-container {
width: 342px;
left: 2px;
top: 352px;
padding: 4.5px;
}
.date-container>div {
font-size: 18px;
line-height: 18px;
margin-right: 0;
padding-top: 0;
padding-bottom: 0;
}
.sponsor-container {
left: 2px;
width: 342px;
bottom: 37px;
top: auto;
}
.sponsor-container img {
width: 100%;
padding-left: 10px;
padding-right: 10px;
box-sizing: border-box;
}
.previous h3 {
display: block;
text-align: right;
}
.previous {
bottom: -60px;
}
.blue-box {
width: 170px;
}
.content-wrapper#skate {
left: -50%;
}
.skate-park {
top: -100px;
left: 300px;
width: 150vw;
}
.titolo {
font-size: 32px;
padding-top: 5px;
}
}
#media screen and (max-width: 374px) {
.content-wrapper {
width: 259.5px;
}
.logo-container {
top: 37px;
left: 2px;
}
.titolo {
left: 1px;
font-size: 28px;
line-height: 32px;
width: 256px;
height: 173px;
}
.date-container {
left: 2px;
width: 256px;
top: 387px;
height: 68px;
}
.date-container>div {
font-size: 14px;
margin: 0;
padding-top: 21px;
}
.sponsor-container {
width: 256px;
left: 2px;
bottom: 2px;
top: auto;
}
.sponsor-container img {
width: 100%;
padding-left: 10px;
padding-right: 10px;
box-sizing: border-box;
padding-top: 8px;
}
.previous h3 {
display: block;
text-align: right;
}
.previous {
bottom: -60px;
}
.blue-box {
width: 84px;
}
.content-wrapper#skate {
left: -50%;
width: 400vw;
}
.previous {
display: block;
width: 100%;
clear: both;
text-align: right;
bottom: -100px;
}
.social {
text-align: left;
}
.skate-park {
left: 200px;
}
.main-content {
align-items: baseline;
}
body {
padding-top: 25px;
padding-bottom: 25px;
}
.content-wrapper#skate {
top: 0;
}
.content-wrapper#skate {
top: -400px;
}
}
/* CELL ORIZZONTALI */
#media screen and (max-height: 500px) and (orientation: landscape) {
.main-content {
align-items: baseline;
}
body {
padding-top: 25px;
padding-bottom: 25px;
}
.content-wrapper#skate {
top: 0;
}
}
/* RETINA */
#media screen and (-webkit-min-device-pixel-ratio: 2),
(min-width: 1921px) {
.skate-park {
left: 13.5%;
top: -10%;
}
}
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<title>Festiwall 2019 | 9 - 15 Settembre 2019 | Ragusa</title>
<link rel="stylesheet" href="https://use.typekit.net/qse6gsn.css">
<link href="https://fonts.googleapis.com/css?family=Space+Mono:400,700&display=swap" rel="stylesheet">
</head>
<body>
<div class="main-container">
<div class="main-content">
<div class="content-wrapper" id="circle">
<div class="red-circle"></div>
</div>
<div class="content-wrapper" id="skate">
<div class="skate-park"></div>
</div>
<div class="content-wrapper" id="rect">
<div class="blue-box"></div>
</div>
<div class="content-wrapper">
<h2 class="titolo">Public Art<br>Festival</h2>
<div class="logo-container">
<img src="/wp-content/uploads/2019/07/festiwall-2019-logo.png" alt="Festiwall 2019 logo">
</div>
<div class="sponsor-container">
<img src="/wp-content/uploads/2019/07/festiwall-2019-sponsor.png" alt="Festiwall 2019 Sponsor">
</div>
<div class="date-container">
<div class="light">09/15</div>
<div class="bold">September</div>
<div class="light">2019</div>
<div class="bold">Ragusa</div>
</div>
</div>
<div class="content-wrapper" id="footer">
<div class="social">
<img src="/wp-content/uploads/2019/07/fw2019-icons-_0001_fb.png" alt="Facebook">
<img src="/wp-content/uploads/2019/07/fw2019-icons-_0000_inst.png" alt="Instagram">
</div>
<div class="previous">
<h3>Edizioni precedenti</h3>
2015 / 2016 / 2017 / <a href="http://www.festiwall.it/2018"
title="Festiwall 2016">2018</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Thank you for those who are willing to give support :)
Antonio
I'm unable to find the parse error in my css. The mobile website looks responsive in firefox but not Chrome. I am assuming that the parse error is affecting the scaling.
I've been trying to find the error with W3 CSS Validator. Not giving me enough to find the error other than stating "parse error". Might have missed RBRACE but scanned code and couldn't find one missing. Nor any typo.
#media only screen and (max-width: 600px) {
body {
font-size: 16px;
}
#nav {
height: 3.75em;
position: fixed;
top: 0;
width: 100%;
transition: 1s;
border-radius: 0em;
}
#nav .scrolled {
background-color: transparent;
}
#logo {
position: relative;
margin-top: 0.15em;
margin-left: 0.0625em;
height: 1.5em;
}
.m-hidden {
visibility: hidden;
}
.burger {
margin-top: -19.3em;
margin-left: 20.625em;
float: right;
visibility: visible;
position: absolute;
display: inline-block;
cursor: pointer;
}
.bar1, .bar2, .bar3 {
width: 1.5625em;
height: 0.125em;
background-color: white;
margin: 0.375em 0;
transition: 0.4s;
}
.change .bar1 {
-webkit-transform: rotate(-45deg) translate(-5px, 3px) ;
transform: rotate(-45deg) translate(-5px, 3px) ;
}
.change .bar2 {
opacity: 0;
}
.change .bar3 {
-webkit-transform: rotate(45deg) translate(-8px, -8px) ;
transform: rotate(45deg) translate(-8px, -8px) ;
}
.overlay {
height: 100%;
width: 100%;
position: fixed;
z-index: 1; /* Sit on top */
background-color: rgb(0,0,0); /* Black fallback color */
background-color: rgba(0,0,0, 0.9); /* Black w/opacity */
overflow-x: hidden; /* Disable horizontal scroll */
transition: 0.5s; /* 0.5 second transition effect to slide in or slide down the overlay (height or width, depending on reveal) */
}
.overlay-content {
position: relative;
top: 25%; /* 25% from the top */
width: 100%; /* 100% width */
text-align: center; /* Centered text/links */
margin-top: 1.875em; /* 30px top margin to avoid conflict with the close button on smaller screens */
}
.overlay a {
padding: 0.5em;
text-decoration: none;
font-size: 1.875em;
color: #818181;
display: block; /* Display block instead of inline */
transition: 0.3s; /* Transition effects on hover (color) */
}
.overlay a:hover, .overlay a:focus {
color: #f1f1f1;
text-decoration: none;
}
#media screen and (max-height: 450px) {
.overlay a {font-size: 1.25em}
.overlay .closebtn {
font-size: 2.5em;
top: 15px;
right: 35px;
}
}
.cover {
height: 100%;
}
.cover h2 {
margin-left: -0.2em;
margin-top: 6em;
font-size: 2.5em;
text-align: left;
}
.who {
height: 80%;
}
.who h1 {
position: relative;
margin-top: 1em;
margin-left: 2em;
font-size: 3.125em;
text-shadow: 5px 0px white;
text-align: center;
}
.who h2 {
margin-left: 1.5625em;
float: left;
font-size: 0.9375em;
width: 18.75em;
text-align: center;
}
.who a {
position: absolute;
margin-top: 0em;
margin-left: 0em;
float: right;
color: lightgrey;
font-size: 0.9375em;
text-decoration: underline;
https://stackoverflow.com/help visibility: hidden;
}
.service {
height: 95%;
/* background-image: url('../img/mobile/red.jpg');*/
}
.service h1{
margin-top: -4.375em;
font-size: 2em;
}
.service h2{
width: 70%;
font-size: 0.9375em;
}
.service_2 {
margin: 0em;
display: table;
width: 100%;
height: 95%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
color: white;
}
.service_2 .inner {
display: table-cell;
vertical-align: middle;
width: 100%;
max-width: none;
}
.service_2 .content {
text-align: right;
}
.service_2 img {
padding-top: 1em;
height: 6.5em;
}
.service_2 h1 {
font-family: haboro, serif;
font-weight: bold;
font-size: 2em;
text-align: right;
margin-left: -12em;
}
.service_2 h2 {
margin-right: 0em;
float: right;
text-align: right;
font-size: 0.9375em;
width: 18.75em;
}
.service_3 {
height: 95%;
margin-top: -14.7em;
}
.service_3 h1{
font-size: 2em;
}
.service_3 h2{
width: 70%;
font-size: 0.9375em;
}
.service_3 span {
font-size: 0.9375em;
}
.portfolio-title {
margin-top: 0em;
padding: 5em;
text-align: center;
}
.portfolio-title h1 {
font-size: 2.5em;
}
.portfolio-title hr {
width: 10em;
}
.portfolio-title h3 {
font-size: 0.9375em;
color: white;
}
.box-wrap {
display: table;
padding: 0em;
}
.zoom {
position: relative;
}
.box-content h1 {
height: 100%;
width: 100%;
display: table-cell;
vertical-align: middle;
text-align: center;
}
.frame {
display: table;
float: none;
height: 16em;
width: 100%;
}
.frame img {
height: 16em;
width: 100%;
}
.frame p {
op: 65%;
}
.frame2 {
display: table;
float: none;
height: 16em;
width: 100%;
}
.frame2 img {
height: 16em;
width: 100%;
}
.frame2 p {
top: 65%;
}
.frame3 {
display: table;
float: none;
height: 16em;
width: 100%;
}
.frame3 img {
height: 16em;
width: 100%;
}
.frame4 {
display: table;
float: none;
height: 16em;
width: 100%;
}
.frame4 img {
height: 16em;
width: 100%;
}
.frame4 p {
top: 65%;
}
.frame5 {
display: table;
float: none;
height: 16em;
width: 100%;
}
.frame5 img {
height: 16em;
width: 100%;
}
.frame6 {
display: table;
float: none;
height: 16em;
width: 100%;
}
.frame6 img {
height: 16em;
width: 100%;
}
.project-btn {
display: table;
height: 3.125em;
width: 100%;
background-color: #C7C4BF;
color: black;
text-align: center;
margin-bottom: 0em;
}
.project-btn h3 {
padding-top: 0em;
font-size: 0.9375em;
}
.project-btn a {
color: black;
}
.project-btn a:hover {
text-decoration: none;
color: grey;
}
.contact {
height: 60%;
margin-bottom: 33.3em;
}
.contact h1 {
margin: 0em;
font-size: 1.5625em;
}
.contact-btn {
margin-top: 1.25em;
height: 2.5em;
width: 9.375em;
font-size: 0.9375em;
}
.contact-btn:hover {
font-size: 9.375em;
}
footer {
height: 80%;
}
.footercontent {
margin-left: -12em;
}
footer img {
height: 3.125em;
margin-bottom: 0.9375em;
}
footer p:nth-child(4) {
font-size: 0.75em;
}
footer .foot {
font-family: haboro, serif;
font-size: 1em;
padding-bottom: 0.0625em;
}
footer .break {
margin-left: 2em;
margin-top: -0.3125em;
border-bottom: 1px solid white;
border-width: 1px;
width: 4.375em;
}
footer a {
color: white;
text-decoration: none;
}
footer a:hover {
text-decoration: none;
color: grey;
}
footer i {
font-size: 1.25em;
margin-bottom: 0.625em;
}
.footer-icons {
font-size: 0.625em;
margin-right: 1em;
}
.fmobile {
margin-left: 0.3125em;
position: absolute;
visibility: visible;
align-items: center;
}
}
There is a text https://stackoverflow.com/help in your .who a. Remove this line.
.who a {
position: absolute;
margin-top: 0em;
margin-left: 0em;
float: right;
color: lightgrey;
font-size: 0.9375em;
text-decoration: underline;
visibility: hidden;
}
The property op does not exist. Do uou mean top or opacity ??
.frame p {
op: 65%;
}
.projects {
position: relative;
background-color: black;
li {
position: relative;
width: calc(100% / 3);
display: inline-block;
cursor: pointer;
vertical-align: top;
overflow: hidden;
.bg-placeholder {
position: relative;
width: 100%;
img {
position: relative;
display: block;
width: 100%;
height: auto !important;
}
}
.bg {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
transition: transform cubic-bezier(0.165, 0.84, 0.44, 1) $time;
img {
position: relative;
display: block;
width: 100%;
height: auto !important;
}
}
.gradient {
position: absolute;
// width: 100%;
height: 80%;
left: -2px;
right: -1px;
top: auto;
bottom: -1px;
transform: translate3d(0,0,0);
transition: height cubic-bezier(0.165, 0.84, 0.44, 1) $time;
img {
height: 100%;
}
}
.content {
position: absolute;
width: 100%;
bottom: 0;
height: 35%;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.content-titles {
position: relative;
text-align: center;
width: 98%;
z-index: 2;
span {
font-size: 15px;
line-height: 1.4;
transition: opacity ease $time;
opacity: 0.7;
display: inline-block;
}
}
.content-title {
span {
font-family: "Gotham-Bold";
color: #fff;
text-transform: uppercase;
}
}
.content-sub-title {
margin-top: 3px;
span {
font-family: "Gotham-Book";
color: #d5a83d;
}
}
}
.cover-up {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
// opacity: 0;
// visibility: hidden;
// background-color: #000;
// transition: all ease $time;
display: flex;
justify-content: center;
align-items: center;
z-index: 3;
.text {
position: relative;
width: 100%;
text-align: center;
transform: translateY(100%);
opacity: 0;
visibility: hidden;
transition: all ease $time;
span {
display: inline-block;
font-family: "Gotham-Light";
color: #fff;
font-size: 24px;
text-transform: uppercase;
color: #d5a83d;
}
}
}
.desktop &:hover {
.bg {
transform: scale(1.12);
transition: all 0.3s ease;
}
.gradient {
height: 200%;
transition: all 0.3s ease;
}
.content{
.content-titles {
span {
opacity: 1;
}
}
}
.cover-up {
.text {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
}
}
}
}
Under some conditions, the projects dom looks like -1px offest to its parent. Why does this happen? Just occurs in safari, chrome & ff work just fine.
The red background-color in pic 1 is the color I gave to .projects 's parent dom. I found the red line mainly caused by translate3d(0,0,0) in .gradient, but if I remove this style, the hover effect will shake.
Please help me, Thanks!