F. Mcgee F. Mcgee - 6 months ago 10
CSS Question

How to place an image properly with CSS

I'm having trouble with placing an image in the correct spot in my CSS.

I have links in the left side of the page and would like an image to the top right of the nav bar.

Unsure on how that's done.

Answer

like this:

HTML

<nav>
   <img src="image.png" alt="image">
</nav>

CSS

nav{
       position:relative;
    }
    nav img{
       position:absolute;
       top:0;
       right:0;
    }
Comments