A
A
andrey_levushkin2020-06-29 19:11:41
css
andrey_levushkin, 2020-06-29 19:11:41

What is responsible for menu sub-items in layout?

The site itself:
loves2020.tk

Initially I wanted to remove the line break in the MENU - removed:

.nav-menu{
  white-space: nowrap;
}

As a result, in the menu sub-items, the words also ceased to be transferred - well, that suits me. But in the end, these sub-items began to climb out of their "frames":
9MNxq6Ru8IM.jpg
How to make these "frames" be on the entire menu sub-item?
I would also like to make the text alignment centered in the subparagraphs - what is generally responsible for them?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
andrey_levushkin, 2020-06-29
@andrey_levushkin

Problem solved

#menu-header .sub-menu a {
width:100%;
text-align: center;
}

O
Orkhan Hasanli, 2020-06-29
@azerphoenix

Open the browser's dev tools and inspect the element.

How to make these "frames" be on the entire menu sub-item?
I would also like to make the text alignment centered in the subparagraphs - what is generally responsible for them?

You need to make the submenu ul tag full width - width:100%;or set a minimum width: min-width:300px;
To align the text addtext-align:center

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question