Absolutely positioning the shark

We've got our menu in place, but the shark clearly sits on top of the nav. We need it to be aligned horizontally, more or less. We need to fix the shark so it overhangs the nav bar as well. We'll also want the entire nav to remain stuck to the top of the browser window:

So let's go to our CSS and add position: absolute to the nav figure selector. Create a new selector underneath the nav ruleset. We'll call it nav figure and give it a position property with the value of absolute:

/****************nav****************/nav {  background-color: #fff;}nav figure{  position: absolute;}nav img {  width: 160px;}

Right ...

Get Mastering CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.