S
S
sergey19892015-12-26 23:11:00
css
sergey1989, 2015-12-26 23:11:00

How to make such a submenu?

Good day. Can't stretch submenu background to full screen height. With the root points, it seems that the issue was resolved, but the problem is with the sub-point.

What it looks like:
17dd8468985648518ceb679f9f77f45c.JPG

How it should:
0e1ab12791d84cd19678a7ad565f2e03.JPG

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pretor DH, 2015-12-26
@sergey1989

For a block containing sub-items
display: inline-block;
position: absolute;
top:0;
bottom:0;
For a block containing items
position: absolute;
A block containing sub-items must follow the item.
JSfiddle
PS Using ul li for menus is somewhat wrong. Once there was a big controversy. And we came to the conclusion that it is more semantically not to use it. And do not produce extra blocks, tag A always has to be invested in LI. But many people remain unconvinced.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question