Hi I'm currently working on a website project for a "fictional plane company". I want to be able to center the "main div" but for some reason I have a lot of margin at the right side. I've tried setting margin
to 0 and setting width
to 100%, but I can't figure out the problem.
.main{
position: absolute;
margin: 0px;
align-items: center;
width: 80%;
line-height: 2em;
display: flex;
flex-direction: column;
}
<div class="main">
<div class="">
<h1>Bestill fin flyreise</h1>
<select class="" name="">
<option value=""><-- Fly fra--></option>
<option value="">Sarpsborg</option>
<option value="">Fredrikstad</option>
<option value="">Askim</option>
<option value="">Moss</option>
<option value="">Halden</option>
</select>
<select class="" name="">
<option value=""><-- Fly fra--></option>
<option value="">Sarpsborg</option>
<option value="">Fredrikstad</option>
<option value="">Askim</option>
<option value="">Moss</option>
<option value="">Halden</option>
</select>
<p>Utreisedato</p>
<input type="date" name="" value="">
<p>Antall reisende</p>
<input type="number" name="" value="" max="5">
<label for="">
<input type="radio" name="" value=""> VIP plass (250,-)
</label>
<button type="button" name="button">Bestill flyreise</button>
</div>
</div>
JSFiddle: https://jsfiddle.net/znvgx143/