All of the techniques on this page require editing a box's source code. If you're not familiar with the basics of html, get help from someone who is! Also, note that these tricks are not fully integrated with the system's reactive design, so may not look good on tablets or phones.
Note: This is a bad use of a highlight box. Its use should be reserved for multi-column layouts, where you want to draw attention to one of the top boxes.
When you want to emphasize one box on a page, use a highlight box.
<script>
document.getElementById("s-lg-box-3903077").className += " highlight-box";
</script>
Sometimes you don't want to highlight a whole box, but content within a box. How you do it depends on whether it's an html element you've created in rich text content, or a system defined tag like a link group. Note that the highlighting works best with bold text; links work especially well since they're automatically bold and colored.
In a rich text section, you have direct control over the html. Simply add the following attribute to the tag surrounding the content you want to highlight. You can always create a div tag solely for this purpose.
class="highlight"
Optional: style="padding: 10px 10px 10px 10px"
You may need to adjust the padding, depending on the element. It defaults to 10px on all four sides. The second optional line gives a template for an additional attribute which will override that. The four numbers are (in order) top, right, bottom, and left.
For this, you'll need to find the id attribute associated with the element you want to highlight, usually in a div tag. You can do that by looking at the source code or by seeing the numbers in the "Reorder Content" popup. In a rich text section after that (it must come after!), put the following code.
<script>
document.getElementById("s-lg-content-3903077").className += " highlight";
</script>
Change the code after s-lg-content to match the actual id of the div tag you want to affect. You may also need to adjust the padding depending on placement within the box.
<div class="box-in-box">
<div class="box-in-box highlight">
There are two ways to do this.
Instead of the normal option to re-use a box on your page, you can use a widget to embed a mapped version of any box into another box.
Sure, everyone knows how to add an image! But there are a few things you can do to make it look even better.
If you choose Left or Right alignment in the Image Properties, the text will wrap around your picture. And if you put a number into the HSpace box (H for horizontal) it will add some white space to the left and right sides of the box so your text isn't right up to the edge.
class="box-in-box" style="margin-left: 15px; margin-right: 15px; padding-top: 0px;"><img src="file.jpg" alt="And this is an image with horizontal spaces/margins set." style="float: right: margin-left: 15px; margin-right: 15px;" />But wait! You don't actually want white space on the outer side! But we do want space on the bottom. So there's an easy way to do it.
In the normal edit mode, choose the alignment you want and set HSpace to 15.
class="box-in-box" style="margin-left: 15px; margin-bottom: 10px; padding-top: 0px;"><img src="file.jpg" alt="And this is an image with those few small tweaks made." style="float: right; margin-left: 15px; margin-bottom: 10px;" />Now go into the html/source code and you'll see that your image has the following info under the style attribute: float: right; margin-left: 15px; margin-right: 15px;
Change the last part to read margin-bottom: 10px; and you're set. Hopefully you can figure out what to do with an image on the left side!
It's easy to wrap text around an image when they're in the same Rich Text/HTML content block. But when you start combining content types (Rich Text, Links, Databases, etc.), LibGuides assumes vertical stacking of elements. In technical terms, each content element is a separate div, and each div clears the floats from the previous div. So if you want your images to exist to left or right of other elements, you need to do the following:
<style type="text/css">.clearfix:after { clear: left; }
</style>
(If you want the images on the left, then change to float: left, clear: right.)
Finally, add your Links, Databases, Books from the Catalog, etc.
Use with Caution! This code affects the "clearfix" across the page, so may screw up other float effects in use elsewhere on the page. So only use it if all of your floats on the page are on the same side (left or right) and you want all of them to have the wrap-around effect.
You can arrange a list of items into horizontal rows rather than the normal vertical list. Some limitations:
<style type="text/css">ul#s-lg-link-list-303485 li {
max-width: 155px;
margin-right: 10px;
display: inline-block;
vertical-align: top;
}
#s-lg-link-list-303485 span.s-lg-book-title {
display: block;
clear: left;
}
</style>
You can achieve a similar effect to rows by breaking your list into multiple columns. The latest version of CSS supports multiple columns for content, but it hasn't been implemented fully (or in the same way) in most browsers. Some limitations:
<style type="text/css">
@media (min-width: 768px) {
ul#s-lg-link-list-7897755 {
-webkit-column-count: 2; /* Chrome, Safari, Opera */
-moz-column-count: 2; /* Firefox */
column-count: 2;
-webkit-column-gap: 15px; /* Chrome, Safari, Opera */
-moz-column-gap: 15px; /* Firefox */
column-gap: 15px;
}
li {
-webkit-column-break-inside:avoid;
page-break-inside:avoid;
break-inside:avoid;
-moz-column-break-inside:avoid;
-o-column-break-inside:avoid;
-ms-column-break-inside:avoid;
column-break-inside:avoid;
}
}
</style>
-webkit-column-rule: 1px solid #ADCDE5;
-moz-column-rule: 1px solid #ADCDE5;
column-rule: 1px solid #ADCDE5;
<style>
#s-lg-box-collapse-3593616 { height: 600px; overflow: auto; }
</style>
While use of link icons (like the blue key) is the norm, not everyone is a fan. And while you can refrain from adding them to your own Links, they're "built-in" on any Databases you re-use from the A-Z list.
While you can't actually delete the key from Database links, you can suppress their display throughout a specific guide. To do so, go to Guide Custom JS/CSS in the Guide Layout menu and add the following code:
<style>
img#s-lg-icon { display: none; }
</style>
<style>
#s-lg-box-3586526 .s-lg-link-desc {display: inline; }
</style>