E
E
evgenyforever2019-01-07 08:27:48
css
evgenyforever, 2019-01-07 08:27:48

How to make the submenu located diagonally and in the center of the screen?

5c32e34c05f93336235233.jpeg
Tell me how to make it so that the submenu is displayed horizontally, not vertically, and at the same time, what would be exactly in the center of the screen, including the subcategory icon (example: correct display when hovering over the "Product catalog").
There is a code, please fix it (to make it look like in the picture above).

click on the button in the center "Edit on CodePen"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
evgenyforever, 2019-01-07
@evgenyforever

I solved the problem in the following way:
1)

#mainMenu .drop .nextColumn{
line-height: 21px;
list-style: none;
float: left;
width: 20%;
padding: 0;
  margin: 0;
}

Changed to:
#mainMenu .drop .nextColumn{	
line-height: 21px;	
list-style: none;
float: left;
padding: 0;
margin: 0;
width: 100%;	
display: flex;	
}

2)
#mainMenu .drop .nextColumn > li{	
margin-top: 12px;
display: block;
}

Changed to:
#mainMenu .drop .nextColumn > li{
display: table-cell;
width: 100%;
text-align: center;
}

3) In #mainMenu .drop{
changed padding: 24px 0px;
on padding: 51px 0px;
https://codepen.io/anon/pen/NeMvRV

A
A person from Kazakhstan, 2019-01-07
@LenovoId

So ? https://codepen.io/topicstarter/pen/WLJZgO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question