CSS question/How to rest two divs on top of each other

I´ve got a question about a space between two div elements that I´m unsure how to rectify. I´m including a link to my CodePen, if someone could offer some advice.

The issue is a space between .nav-bar and .image-wrap
I want the nav-bar to rest on top of .image-wrap and unsure how to go about it.


would be nice to see an illustration of the desired outcome.
I understood you to say, how to move the line that currently has the words “Login / Register / Your Cart” down to be touching the area that has the “The Retailer’s Guide to our Computer Systems”?

Sorry. Let me clarify.
Login and Register should be on the top left. Your Cart(0) should be top right.

The gray navbar with " * Home * POS Systems…Support" should rest on top of The Retailer´s Guide…".

There is a blue space between them right now and I´m unsure how to get rid of it. Per @RandallDawson I set the bottom-margin on nav-bar ul to 0 but this did not rectify the situation.

Does this clarify the situation?

Use your browser’s dev tools inspector to figure out what is causing the space. Arrow over the elements and it will show you which one is adding the margin that is causing it. I think your first instinct is correct, but there is no such property as bottom-margin, I’d reverse those :slight_smile:

1 Like

Thanks for the advice. Actually @RandallDawson ´s advice worked fine. Wrong element applied to.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.