I have a div that is a kind of container (which also has style) and I want to put another two div, one on the left with an image and the other on the right with options. I'm trying to do it but honestly I do not know why the second div does not come out.
What I am trying to achieve is this (sorry for the resolution):
My code is as follows:
.sub-menu1-container {
margin: 0 5%;
background: white;
height: 337px;
box-shadow: 1px 1px 15px grey;
position: relative;
z-index: -1;
}
.sub-menu1-img {
padding: 1% 10%;
position: absolute;
}
.sub-menu1-options {
background: grey;
position: absolute;
right: 10%;
height: 337px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="style.css">
<script src="jquery-3.2.1.min.js"></script>
<script src="jquery.js"></script>
</head>
<body>
<div class="sub-menu1-container">
<div class="sub-menu1-img">
<img src="http://www.ikea.com/PIAimages/0324126_PE517034_S5.JPG" style="width: 300px; height: 320px;">
</div>
<div class="sub-menu1-options">
</div>
</div>
</body>
</html>
But for some reason the div that should have a gray background does not come out. Can you help me?