K
K
kkoshakk2016-06-06 15:38:30
css
kkoshakk, 2016-06-06 15:38:30

The input and the button are in the same parent, is it possible to do this or not?

If instead of this code:

<nav class="navbar navbar-inverse navbar-fixed-top">
       <form id="my_form" class="navbar-form navbar-left" role="search">
         <div class="form-group">
           <input type="text" class="form-control" placeholder="Поиск">
         </div>
         <button type="submit" class="btn btn-default">Submit</button>
      </form>
    </nav>

Make like this:
<nav class="navbar navbar-inverse navbar-fixed-top">
       <form id="my_form" class="navbar-form navbar-left" role="search">
         <div class="form-group">
           <input type="text" class="form-control" placeholder="Поиск">
          <button type="submit" class="btn btn-default">Submit</button>
        </div>
      </form>
    </nav>

Why is it bad?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GruFF, 2016-06-06
@GruFFix

If such an implementation is required, then there is nothing wrong with that.

D
dom1n1k, 2016-06-06
@dom1n1k

Nothing bad. The preference for one or another option can be determined by indirect factors (design; some specific handlers hanging on the form; developer's tastes).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question