body {
margin: 0;
font-family: Arial,
Helvetica,
sans-serif;
}
.topnav {
overflow: hidden;
background-color: #333;
}
.topnav a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #ddd;
color: black;
}
.topnav a.active {
background-color: #04aa6d;
color: white;
}
.topnav .icon {
display: none;
}
@media screen and (max-width: 600px) {
.topnav a:not(:first-child) {
display: none;
}
.topnav a.icon {
float: right;
display: block;
}
}
@media screen and (max-width: 600px) {
.topnav.responsive {
position: relative;
}
.topnav.responsive .icon {
position: absolute;
right: 0;
top: 0;
}
.topnav.responsive a {
float: none;
display: block;
text-align: left;
}
}
/* select dropdown css code */
select {
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
appearance: none;
outline: 0;
box-shadow: none;
border: 0 !important;
background: #5c6664;
background-image: none;
flex: 1;
padding: 0 0.5em;
color: #fff;
cursor: pointer;
font-size: 1em;
font-family: "Open Sans", sans-serif;
}
select::-ms-expand {
display: none;
}
.select {
position: relative;
display: flex;
width: 20em;
height: 3em;
line-height: 3;
background: #5c6664;
overflow: hidden;
border-radius: 0.25em;
}
.select::after {
content: "\25BC";
position: absolute;
top: 0;
right: 0;
padding: 0 1em;
background: #2b2e2e;
cursor: pointer;
pointer-events: none;
transition: 0.25s all ease;
}
.select:hover::after {
color: #23b499;
}
<div class="topnav" id="myTopnav">
<a href="#home" class="active">Red FMTuning</a>
<a href="#news" class="aligntune">Choose a tune from ur favourite</a>
<a href="#contact">
<div class="select">
<select name="format" id="format">
<option selected>Choose a book format</option>
<option value="pdf">PDF</option>
<option value="txt">txt</option>
<option value="epub">ePub</option>
<option value="fb2">fb2</option>
<option value="mobi">mobi</option>
</select>
</div>
</a>
<a href="#about" class="alignout">About</a>
<a href="javascript:void(0);" class="icon" @click="myFunction()">
<i class="fa fa-bars"></i>
</a>
</div>
https://i.sstatic.net/08t0T.png
As shown in the image above, you can see that all the elements like "tuning", "Choose a tune from your favorite", "Choose a book format", "About". The contents are not properly aligned, especially the dropdown ("Choose a book format") is out of alignment with other content and overlaps when clicked on.
I want to align all the elements until it reaches approximately 1200px as shown below.
https://i.sstatic.net/6z5Rb.png
Code Link: https://jsfiddle.net/se8pa7m3/2/