Nav bar and div spacing

・1 min read

Hello friends!

I'm in the middle of rebuilding my portfolio. At least to practice with the coding skills thus far and to have something more genuine (the one I have now is made in Adobe Muse :\ )

Would someone mind looking at my code? I'm having trouble where my navbar and div meet for the blog post. I had to insert 4 br tags to get it to space properly but I feel like (or know) there's a better way to do it.

Thanks friends :)

(also, sorry if my code isn't the cleanest)

DISCUSS (2)
 

You added float: right; to your navbar to align it to the right, this causes this float effect. This pulls the nav to the right side of the content. Read more about float on MDN

In your case you could do (instead of the float: right;)

.nav {
    display: flex;
    justify-content: flex-end;
}

If you have more questions, just let me know 🙂

 

You're an angel! That fixed it on my blog page and all across the other pages I had. Thank you so much!!!!

Classic DEV Post from Aug 8 '18

Got My First Pull Request Accepted and Merged

Holy Shit, I Made Something That Someone Else Was Like "Ya, that works." Check...

developer. Google Women Techmaker. LTUX co-organizer. Pearl Jam's biggest fan.

Sore eyes?

dev.to now has dark mode.

Go to the "misc" section of your settings and select night theme ❤️