How to Prevent One Word Lines (widow orphan) In Website Paragraphs

I am often adding padding to the left and right of paragraphs to force copy down to prevent one word on a line. Or even worse, I add <br> to a word on the line above to prevent the word by itself. But this causes issues with responsive design because the <br> changes position breaking… Read more »

Continue Reading

Category: Code Snippets

What are the Open Sans CSS Font Weights?

I often want to use different font weights for Open Sans and so am adding them here for quick reference later. Open Sans light font-weight: 300; regular font-weight: 400; semi-bold font-weight: 600; bold font-weight: 700; extra-bold font-weight: 800;

Continue Reading

Category: Common Questions

How to Trigger HubSpot Popup Form on Button Click or Page Load

HubSpot provides the ability to display a pop up form with various triggers (exit intent, after 7 seconds, etc.) But what if you want to show it immediately or when a button is clicked? Below is some javascript to help achieve this functionality. How to use this script Create pop up form Set targeting to… Read more »

Continue Reading

Category: Code Snippets

Open All Links to PDF files in a New Window

This finds all of the links pointing to PDF files and opens them in a new window. If you are using Chrome, you will need to enable popups for this to work. $(“a[href$=’.pdf’]”).each(function () { window.open($(this).attr(‘href’),”_blank”); });  

Continue Reading

Category: Code Snippets

How to Add a Featured Tag with Text Over an Image

In this tutorial I will show you how to place a featured tag over an image using CSS3 ::before pseudo elements. A common use case for this is eCommerce where you might want to visually show a product is featured, on sale, or out of stock. Since your products are displayed dynamically using a database,… Read more »

Continue Reading

Category: Tutorials

Take Command of CSS Flexbox

As a kid I loved playing with toy plastic army men. I would line them up and pretend to be in command giving orders to my soldiers in order to defeat the enemy. Since I was in full command, the soldiers would look to me for their orders. Sometimes a hot shot recruit would overstep… Read more »

Continue Reading

Category: Tutorials