T
T
TheTrace2019-05-30 20:18:07
JavaScript
TheTrace, 2019-05-30 20:18:07

How to make the same navbar?

Good evening everyone! I wonder how to do the same as in the picture, what is used for this and how to implement it. In general, it is similar to Bootstrap, but there is a little different. (When I bring the screen closer, that is, the tablet / phone changes the menu).
5cf0103773e3f622064676.png5cf0103e5d99c597792476.png5cf0104550881739623087.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
ma4t, 2019-05-30
@TheTrace

I didn't understand the difficulty.

<div class="main">
    <div class="wrap">
        <div class="block">Projects</div>
        <div class="block">News</div>
        <div class="block">Shop</div>
        <div class="block">About</div>
        <div class="block">Contact</div>
        <div class="block">Home</div>
    </div>
  </div>

.block {
      margin-bottom: 10px;
    }

    .block:last-child {
      margin-bottom: 0;
    }

    @media (min-width: 768px) {
      .main {
        display: flex;
        justify-content: center;
      }

      .wrap {
        display: flex;
      }

      .block {
      margin-right: 10px;
      }

      .block:last-child {
        margin-right: 0;
      }	
    }

make them divs or whatever you have there, if not divs, write a display: a block
since these are blocks they fit under each other
and then with a media query, for example, starting from a tablet (768px),
write the parent flex and it gets up as it should and center the parent itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question