I am trying to make a simple page, with 3 div's, 1 is top div, stands as header, other 2 are each next to other with small gap. So far so good, this is how my code looks like:
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div id="main">
<div class="head">GIMP & Inscape galerija</div>
<div class="content"><button>Test</button></div>
<div class="outcome">Here is the outcome, that will come, when i will press buttons</div>
</div>
</body>
</html>
and CSS
body {
background-image: url("../img/background.jpg");
background-repeat: no-repeat;
}
#main {
width: 1400px;
margin: 0 auto;
position: relative;
}
.head {
width: 1400px;
height: 100px;
margin: 0 auto;
border: solid 1px;
border-radius: 25px;
text-align: center;
line-height: normal;
display: flex;
justify-content:center;
align-content:center;
flex-direction:column;
margin-top: 50px;
}
.content {
width: 350px;
margin: 0 auto;
height: 600px;
border: solid 1px;
margin: 35px 0px 0px 0px;
border-radius: 10px;
display: inline-block;
}
.outcome {
width: 991px;
height: 600px;
border: solid 1px;
margin: 0 auto;
margin-left:50px;
border-radius: 10px;
display: inline-block;
}
Before I add any buttons, it's okay, everything is in line as it should be. When I add buttons, my outcome div moves down, and it happens for each button I tried. Would be nice if someone can tell me, what's wrong with that and maybe find some mistakes on the code.