1

I am using bootstrap 4.0. The 4.0 documentation doesn't mention icons but the 3.3 documentation does. I want to have an icon button similar to this:

<button type="button" class="btn btn-default btn-lg">
  <span class="glyphicon glyphicon-star" aria-hidden="true"></span> Star
</button>

I got that from the 3.3 documentation but it doesn't work. I did google for a solution (1, 2, etc.) and the way to do it seems to be to manually list a file like this:

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">

Unfortunately I can't find one for version 4.0 but I wouldn't want to add it like that anyways without knowing what is going on. Why isn't it included in the link to the cdn on bootstraps homepage? I get the feeling you are supposed to serve this file yourself? But I downloaded bootstrap and it's not in there anyhow.

enter image description here

What am I missing? I want buttons with icons.

user875234
  • 2,399
  • 7
  • 31
  • 49
  • Why not use fontawesome http://fontawesome.io/ – vinsentos Dec 03 '17 at 02:05
  • See the [Docs](https://getbootstrap.com/docs/4.0/migration/#components), they do cover the removal of icons Bootstrap 4. So use whatever makes sense. And if you only need a few icons look into something like [Icomoon](https://icomoon.io/) or [Fontello](http://fontello.com/). – vanburen Dec 03 '17 at 08:14

1 Answers1

0

Use Font Awesome its AWESOME!!

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />

<button type="button" class="btn btn-default btn-lg">
        <span class="fa fa-star" aria-hidden="true"></span> Star
</button>

That should work pretty fine.

Here is the list of all icons: http://fontawesome.io/icons/

Good Luck!

vinsentos
  • 181
  • 2
  • 11
  • I like font awesome as much as the next guy but I have issues. Issue 1, is that the bootstrap approved way of doing it? Issue 2, I literally need like one or two icons. I'd hate to add all that just for a few measly icons. Issue 3, the versions still don't match up ಠ_ಠ – user875234 Dec 03 '17 at 02:29