Bootstrap and Moodle and Buttons

Following on from the previous post about Tables Bootstrap also lets you style links as buttons which can have a nice effect.

For example:

Example Button Styling

Example Button Styling

To do this, you need 3 things

  1. The text of the link
  2. The URL where you are linking to
  3. The style of button you want

Style

A button can be styled for:

  • Size
  • Colour

The HTML you would use looks like

<a href=”http://www.mymoodle.com/url/path/to/activity” class=”btn btn-primary btn-mini”>MY TEXT LINK <i class=”icon-white icon-play”></i></a>

It would look like this button on the page

Example Button text link

Example Button text link

Size

The buttons can be Mini, Small, Default or Large. This is indicated by using any of the following in the class definition

  • btn-large
  • btn-small
  • btn-min
  • or nothing for default

Colours

You can specific the colour of the button with the the following options

bootstrap colours

bootstrap colours

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *