Display certain li elements in a single row
As shown in the screenshot: I would like to have the "social icons" displayed in a single row to fit the whole menu container but they somehow always end up in different rows, I have tried multiple display methods to no avail.
If anyone could come up with a solution I would appreciate it!
9 Replies
you have
display: grid
on hamburger hover
for the more
is that needed ?Grid is what gave me the most similar result to what I wanted, trying block or flex ended up in a weird layout. Not sure about how creating more divs would be a plausible solution, though.
also had to manually insert a height value in ":hover .menu" as auto or fit-content didn't work
if you want to keep using it you can do this
but if you remove it it will work just like you want it to
Tried pasting the code, it still shows up like in the screenshot. Do you think I should use another display method, then?
Just kinda frustrated as it felt like I was close to finishing but I don't mind starting from scratch trying another thing
there must be something else in your code breaking it
your code without the use of grid
Yeah... it certainly is weird, it is true that this is basically a responsive navbar that's inheriting stuff so maybe that's what's causing it.
you gotta check dev tools to see what is going on. The code you posted should work as shown in the codepen 🙂