I am trying to make my section & image be inlined with each other and I've tried setting display: inline;
on the image but it doesn't work.
body {
font-family: Glory;
margin: 0;
padding: 0;
}
@font-face {
font-family:"Glory";
src: url("../fonts/Glory.ttf") format("truetype");
}
header {
background-color: #5CDB95;
padding-bottom: 1%;
display: flex;
justify-content: space-between;
align-items: center;
}
header h1 {
color: #EDF5E1;
margin: 0% 1.5%;
}
header nav ul {
padding-left: 0;
list-style-type: none;
}
header nav ul li {
margin-right: 5vh;
margin-left: 15vh;
}
header nav ul li a {
color: #05386B;
text-decoration: none;
}
header nav ul li a:hover {
color: grey;
}
header nav ul li {
display: inline;
}
/* Section */
section {
margin-left: 2%;
width: 30%;
background-color: #5CDB95;
text-align: center;
}
section h2 {
margin-bottom: 0%;
}
section p {
margin-top: 0%;
background-color: #47c580;
}
.selfie {
float: right;
}
<header>
<h1>MIN WEBBSIDA</h1>
<nav>
<ul>
<li><a href="#">Historia</a></li>
<li><a href="#">Intressen</a></li>
<li><a href="#">Framtiden</a></li>
</ul>
</nav>
</header>
<section>
<h2>Vem är benim</h2>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Ea cupiditate eveniet libero numquam iste unde quisquam quam, tempore perferendis? Rerum assumenda delectus quisquam molestias. Cupiditate corporis non culpa illo repellat!</p>
</section>
<img class="selfie" width="30%" src="img/selfie.jpg">
I know it's a pretty rookie question but I just can't wrap my head around it.