Hello! I had a problem trying to create an adapted menu.
Menu items are made through inline-block and go in one line. When the browser window is narrowed, if there is not enough space, they are transferred. But they still have a border. And when the next item in the menu is transferred, it looks ugly - on the left of the border, but there is nothing to separate. How to solve this problem?
My mind is that through media track when menu items are transferred and delete the border from them. But, in my opinion, not the best solution. Lots of media. And, by the way, another question - I have never pulled the layout on the CMS. But can it be that the customer renames the items? Or will they change their padding? If yes, then my solution is definitely not suitable.
Code: https://jsfiddle.net/wzdn6rmq/
HTML
<div class="menu"> <a href="#" class="menu-item">One</a> <a href="#" class="menu-item">Two</a> <a href="#" class="menu-item">Three</a> <a href="#" class="menu-item">Four</a> <a href="#" class="menu-item">Five</a> <a href="#" class="menu-item">Six</a> </div>
CSS
.menu {text-align: center;} .menu-item { display: inline-block; padding: 10px 30px; border-left: 1px solid #000; } .menu-item:first-child {border: none;}
Подскажите наилучший способ решения данной проблемы
(questionnaire questions are prohibited), writeКак решить данную проблему?
. Then you will not close. (Yes, and break the text into paragraphs (double Enter)) - RussCoder