Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add bootstrap icon to button

I've the following code which have button with text inside, I want to add to the button also icon from bootstrap (in the left side of the text ) how should I do that ?

The icon is glyphicon glyphicon-plus

<div style="margin-top: 20px">
    <p>
        @Html.ActionLink("New", "Create",
        null new { @class = "Button", @style = "float:right" })
    </p>    
</div> 
<br />
<style type="text/css">
        .CreateButton {
            background: blue
;
            color: white;
            padding: 4px 10px 4px 10px;
            height: 30px;
            width: 60px;
        }


    </style>
<br />
like image 718
07_05_GuyT Avatar asked Oct 21 '25 11:10

07_05_GuyT


1 Answers

You can use a button tag instead of input

<button type="submit" class="btn btn-primary">
  <i class="icon-user icon-white"></i> Sign in
</button>
like image 127
Gagan Gami Avatar answered Oct 24 '25 03:10

Gagan Gami