Hello! I'm starting in frontend and am having some problems with compiling code in different browsers. Developing a header and a Canvas style menu I came across the totally broken layout in Safari8. I used some css tags from render engines --webkit and the like, but the problem persists.
Below is the layout in Chrome and the same in Safari besides the code.
html,
body {
margin: 0;
width: 100vw;
font-family: sans-serif;
}
header input#menu {
display: none;
}
header .control {
padding: 10px;
width: 30px;
height: 20px;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
border: 1px solid #cccccc;
}
header .control span {
width: 30px;
height: 4px;
background: #cccccc;
display: block;
}
.container {
display: flex;
width: 100%;
padding: 10px 30px;
}
.navbar ul {
list-style: none;
padding-left: 0;
}
.navbar ul li {
display: inline-block;
}
.navbar ul li a {
text-decoration: none;
}
header {
display: flex;
width: 100vw;
height: 60px;
background-color: #333;
}
header .container {
align-items: center;
justify-content: space-between;
}
header .container div.logo {
color: #cccccc;
}
#canvas {
cursor: pointer;
width: 300px;
height: 100vh;
background-color: #333;
position: absolute;
}
#canvas nav.navbar {
width: 100%;
position: absolute;
top: 0px;
}
#canvas nav.navbar ul li {
display: flex;
flex-direction: column;
}
#canvas nav.navbar ul li a.link {
width: 80%;
padding: 15px 30px;
color: #cccccc;
transition: all .1s linear;
}
#canvas nav.navbar ul li a.link:hover {
background-color: #4d4d4d;
}
<header>
<div class="container">
<input type="checkbox" name="menu" id="menu">
<label class="control" for="menu" id="btn-menu">
<span></span>
<span></span>
<span></span>
</label>
<div class="logo">Logo</div>
</div>
</header>
<div id="canvas">
<nav class="navbar">
<ul>
<li><a href="#" class="link">Home</a>
</li>
<li><a href="#" class="link">About</a>
</li>
<li><a href="#" class="link">Blog</a>
</li>
<li><a href="#" class="link">Contato</a>
</li>
</ul>
</nav>
</div>