L
L
Lev Rozanov2022-04-19 17:04:57
css
Lev Rozanov, 2022-04-19 17:04:57

How to make a horizontal dropdown menu in a container but with a full-width background?

Good day!

Please tell me how to make a dropdown, multi-level menu, the content of which is limited by the container, but the background should be full width.

The main thing that I would like to do is only through ul > li > ul and without JS.

How to do it in separate blocks or with JS I know if it's possible to do this only with CSS.

It turns out like this:
625ec0fe46fcf127949855.png

And it should be like this:
625ec113be396813098095.png

Sandbox

Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
imko, 2022-04-19
@MetisKot

washed down with it a pseudo-element with a width of 100vw and an absolute position, center - left: 50%; transform: translateX(-50%)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question