Skip to Main Content

BHA Style Guide: HTML/CSS

Change Fonts

1)  Add the code for your font.  Use the code below, add the href linkL from the Google Font (this is the current code for  bhaLibguides.)

<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap" rel="stylesheet">

2) Change the font for public pages

<style>
/* set the font-family for the entire body tag */
body {
   font-family: 'Font one', Arial, sans-serif;
}

/* override the font-family for the side-column headers on the homepage, AZ page, 
subject pages, profile pages, and E-Reserves pages*/
.s-lib-public-side-header h2 {
   font-family: 'Font one', Arial, sans-serif;
}
</style>

3)  For Box Content

<style>
/* set the font-family for the entire body tag */
.s-lib-box-content {
   font-family: 'Font one', Arial, sans-serif;
}
</style>

4) For Box Titles

<style>
/* set the font-family for box titles */
.s-lib-box .s-lib-box-title {
   font-family: 'Font one', Arial, sans-serif;
}
</style>

5) For Tabs

 

<style>
/* set the font-family for guide navigation links */
#s-lg-guide-tabs {
   font-family: 'Font one', Arial, sans-serif;
}
</style>

 

6)   For Links

 

<style>

/*increase link font size*/
.s-lg-link-list {font-size: 14px}

 

</style>

Customizing Boxes

Use this link and scroll down

 

TABS AND BOXES

/* increases font size on box headers and centers text*/
.s-lib-box .s-lib-box-title {
              font-size:24px; 
              font-weight: 700;
             text-align:center
             }

 

<style>
/* increases font size on tabs*/
#s-lg-guide-tabs {
font-size:16px; font-weight; normal;
}
</style>

Images and Captions

 

 

 

 

 

 

<figure style="float: left; margin: 8px; width: 30%; height: 100%;">

<figcaption>Your Caption</figcaption>

</figure>

The Bold is what you will change:

<figure style="float: left or right
margin: ?px; 
width: ##%; height: 100%;">

<figcaption>Your Caption</figcaption>
</figure>

 

Add CSS to your Guide or to your System:

figure {

    border: thin #c0c0c0 solid;

    padding: 5px;

}

img {

    max-width: 100%;

    max-height: 100%;

}

figcaption {

    background-color: #222;

    color: #fff;

    font: italic smaller sans-serif;

    padding: 3px;

    text-align: center;

}

To remove the frame:
Delete padding: 5px;