1
I am starting to use flexbox but I have a giant problem that I cannot solve in several layouts. Both the header and Nav and li are hidden in the Mobile Solution, Iphone 320x568 and there is a white list throughout the site. I’ve tried max width on @media and @media screen and nothing.
Any suggestions? Please <3
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Infinity</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="shortcut icon" href="images/logo.png">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
</head>
<body>
<header>
<a href="#"><img src="images/logo2.png" alt="Infinity"></a>
<nav>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Contact</a></li>
</nav>
</header>
</body>
</html>
CSS : /* RESET */
* {
margin:0;
padding: 0;
font-size: 100%;
box-sizing: border-box;
font-family: 'Oswald', sans-serif;
}
nav,ul {
list-style: none;
}
a {
text-decoration: none;
cursor: pointer;
}
/* HEADER */
header {
background-color: #353535;
max-width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 1px 50px;
}
header img {
width: 200px;
}
header nav {
display: flex;
}
header li a {
color: white;
padding: 30px;
font-size: 1.4rem;
}
header li a:hover {
color:#606060;
}
header li{
margin: 0 15px;
}
header li:first-child {
margin-left: 0;
}
header li:last-child {
margin-right:0;
}
@media (max-width: 700px) {
header {
flex-direction: column;
}
header img {
margin-bottom: 15px;
}
}
@media (max-width: 320px){
header a {
flex-direction: column;
}
}
Thanks a lot. You’re the man!!!!!!!!!!!!!!!!!!
– Robert Landigo
@Matheeusluiiz good that helped you, if your question has already been answered consider marking the answer as accepted, in this icon next to the answer, so the question is not pending on the site as Question without Answer Accepted. Good luck with the project. And any doubt just give the touch
– hugocsl