You can add custom buttons to your LibGuides by using the built-in Bootstrap features.
This is a standard button:
This is a primary button:
This is a success button:
This is an informational alert button:
This is a warning button:
This is a danger button:
This is a button that looks like a link:
You can make buttons larger:
You can make buttons smaller:
You can make buttons extra small:
Here is the code for buttons:
You can customize buttons further with CSS. You can apply CSS to any of the button classes, but it is a better choice to create your own button class. You can use CSS such as this to customize a button:
<style>
/*Below customizes a button*/
.btn-PALNI {
background-color: #006838;
color: #FFFFFF;
}
</style>
Then use the following code to create the button on the guide:
<p><button class="btn btn-PALNI" type="button">PALNI button</button></p>
See more CSS options here from W3Schools.
Now it's time to make your button do something!
This is a button that links to Google:
<a class="btn btn-info" href="https://www.google.com" role="button">Visit Google</a>
Or, use buttons in custom forms.
There are several ways you can change the CSS for your LibGuides. First, you can visit the "Look & Feel" section of your LibGuides Admin interface and click on the "Custom JS/CSS" tab. Alternatively, you can change the CSS for an entire group of guides by editing the group's "Custom JS/CSS" tab in the group admin interface. Or finally, you can change the CSS for a single guide under the "Guide Layout" drop down menu by clicking on "Guide Custom JS/CSS." Conveniently, the code is the same.