Skip to Main Content

LibGuides: An Introduction and How-to-Guide: What Are LibGuides?: How to Add Buttons

How to Add Buttons

How to add buttons:

Libguides uses Boot Strap which builds on html and CSS for buttons and search bars.

The simplest way to add a button is to look for the widget in Assets.  One example....

Because the widget is written in code, if you want to modify it, you will need to "edit" it. 

This is how the widget appears when you click "edit': 

<p><a class="btn btn-default btn-sm" style="background-color: #228822; color: #ffffff; border-color: #D64541" href="https://www.cayuga-cc.edu/includes/library/askus247.html " target="_blank" target="_blank"><strong>Chat With a Librarian </strong></a></p>

These are the key elements:

<p> new paragraph -
<a anchor tag defining a hyperlink
class= showing elements in a group
"btn btn-default btn-sm" button size  ("Block" makes it the width of the block)  Other options are default, lg, xl, etc.
style= rule describing how document will be presented in a browser
"background-color: #228822 A wonderful list of colors
color: #ffffff color of print  black is #ffffff; white is #000000
border-color: #D64541  
" quotations must enclose
href="......." include URL for link
target= specifies a name or keyword that indicates where to display the response that is received after submitting the form
"_blank" target="_blank" opens the linked document in a new window
>  
<strong> Strong importance - will use bold type
Caption Caption for button
</strong>  
</a>  
</p> end of paragraph

So go ahead and change the colors, URL and captions!  Then paste your new code in the widget box where you need it.

A great reference for button sizes and types

A great site for color tags

Primo Search Box