In this section, we will enhance the details that hold our design together. First, we'll enhance the h1
headings for each of our major sections and add some needed top and bottom padding to each section. Then, we'll enhance the navigation experience by adding ScrollSpy to the navbar and using jQuery to animate the scrolling action when triggered by a click on the navbar item.
Let's begin by enhancing the size and contrast of our major h1
headings for each section and increasing the top and bottom padding. If you pause to look at these h1
headings, you may note that they are rather lackluster. Consider, for example, the heading for the Features section:
Enlarging these headings, bringing the contrast down a little, and providing extra padding will make a big difference. We only want these rules to apply to the FEATURES, IMPACT, and SIGN UP sections. We will select these by ID.
_page-contents.less
in your editor.#features, #impact, #signup { padding-top: 36px; padding-bottom: 48px; h1 { font-size: 5em; color: @gray; line-height: 1.3; padding-bottom: 24px; } }
h1
headingThis yields a nice result across almost all viewport sizes. For small viewports, the h1
font size is now a bit large. We also need to add some left and right margins; so, let's adjust these. As we do not want these styles to flow up to larger viewports, we'll wrap them in a query by limiting them to small viewports:
// Adjust section headings for extra-small viewports only @media (max-width: @screen-xs-max) { #features, #impact, #signup { margin-left: 30px; margin-right: 30px; h1 { font-size: 3em; } } }
The following screenshot shows our result:
This is a much improved result!
Now, we'll enhance the navigation experience.