I'm struggling to position an image on the top right corner of my page, specifically in the header. Despite searching for help on Stack Overflow and other online resources, I can't seem to figure it out.
Currently, here is what I have:
https://i.sstatic.net/oRWvR.png https://i.sstatic.net/RYnDp.pngThe second picture illustrates what I am trying to achieve. Below is a snippet of my code:
header {
margin-top: 10px;
font-family: verdana;
line-height: 2em;
background-color: rgb(187, 204, 232);
}
header img {
max-width: 100%;
float: right;
width: 100px;
height: 100px;
margin-top: -50px
}
<body>
<header>
<h1>CSS in Action</h1>
<img id="logoImage" src="https://upload.wikimedia.org/wikipedia/commons/d/d5/CSS3_logo_and_wordmark.svg">
</header>
<nav>
<ul>
<li>Topic 1</li>
<li>Topic 2</li>
<li>Topic 3</li>
<li>Topic 4</li>
</ul>
</nav>
<div class="content">
<section>
<h1>Topic 1</h1>
<img src="pic1.jpg">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
<p>
<strong>Lorem ipsum</strong> dolor sit <a href="http://www.aau.at" target="_blank">amet</a>, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam <a href="erat.html" target="_blank">erat</a>.
</p>
</section>
<section>
<h1>Topic 2</h1>
<img src="pic2.jpg"> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam <strong>nonumy</strong> eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
sit <a href="http://www.aau.at" target="_blank">amet</a>.
</p>
</section>
<section>
<h1>Topic 3</h1>
<img src="pic3.jpg"> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
</p>
</section>
</div>
<footer>
<ul>
<li>Impressum</li>
<li>Legal</li>
<li>Contact</li>
</ul>
</footer>