I'm trying to make buttons and divs with diagonal sides. When I make a medium sized box (300px x 200px) it kinda works (I used :after and a rotated div), but for smaller elements like the menu and buttons it doesn't align properly. I've been stuck on this for a few hours, and don't know how to properly make them. I've also tried suggestions and examples on here and Google, but couldn't fit them to my case. If it is possible I would like to use an ul for the menu part.
Here is a image of what I want to achieve:
This is what I got so far: https://jsfiddle.net/3ywsrufa/ (see the jsfiddle for all of the code). It is not working properly, but you get the idea of what I was trying to do.
.box .box-top:after {
position: absolute;
height: 150%;
width: 100%;
z-index: 90;
content: " ";
-webkit-transform: rotate(1deg);
-moz-transform: rotate(1deg);
-o-transform: rotate(1deg);
-ms-transform: rotate(1deg);
transform: rotate(1deg);
transform-origin: 15% 0;
-webkit-transform-origin: 15% 0;
-ms-transform-origin: 15% 0%;
left: 0px;
top: 0px;
background: #fff;
}