How to keep the buttons of type Submit with the same look as the button type?

Asked

Viewed 66 times

1

I suppose when I put the buttons on one form they look different.

This is what I did:

<div class="btn-group" id="language_selector" role="group" aria-label="...">
    <?php                                               
        echo("<form action='' method='post'> 
        <input type='submit' class='btn btn-default' $activeClass  name='en' value='EN' />
        <input type='submit' class='btn btn-default' $activeClass  name='pt' value='PT' />
        <input type='submit'class='btn btn-default' $activeClass  name='es' value='ES'/>                            
</form>"); 
?>

But in the aspect is quite different from the example:

<div class="btn-group" role="group" aria-label="...">
  <button type="button" class="btn btn-default">Left</button>
  <button type="button" class="btn btn-default">Middle</button>
  <button type="button" class="btn btn-default">Right</button>
</div>

I’d like the buttons of the guy Submit become the same as button.

https://jsfiddle.net/ecy7neto/3/

  • Have an example in Jsfiddle?

  • i was using this example which is presented here http://getbootstrap.com/components/

  • Which version of bootstrap you are using. If you look in this fiddle you will see that the look is the same.

  • I edited https://jsfiddle.net/ecy7neto/3/ this is the aspect

  • The only difference I see is yours form. Look this example with the 4 possibilities.

  • Some way to keep the form and have the same format on the buttons?

  • What is that $activeClass?

  • only one control variable

Show 3 more comments

1 answer

0


I found the solution and solved the problem with the following code:

<form action='' method='post'>
 <div class="btn-group" id="language_selector" role="group" aria-label="...">
  <?php                                             
  echo("
     <input type='submit' class='btn btn-default' $activeClass  name='en' value='EN' />
     <input type='submit' class='btn btn-default' $activeClass  name='pt' value='PT' />
     <input type='submit'class='btn btn-default' $activeClass  name='es' value='ES'/>                           
       </div>
</form>"); 
    ?>

If someone has the same problem I had, this is the solution: I just changed the order of the tags by putting the form outside.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.