Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Responsive Web Design by Example

You're reading from   Responsive Web Design by Example Embrace responsive design with HTML5, CSS3, JavaScript, jQuery and Bootstrap 4

Arrow left icon
Product type Paperback
Published in Dec 2017
Publisher Packt
ISBN-13 9781787287068
Length 292 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Frahaan Hussain Frahaan Hussain
Author Profile Icon Frahaan Hussain
Frahaan Hussain
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. What is Responsive Web Design? FREE CHAPTER 2. What is Bootstrap, Why Do We Use It? 3. Reusable Project Template 4. Creating the Introduction Section 5. Creating a Generic Reusable Single Page Section 6. Creating a Contact Us Section 7. Creating the Blog Posts Home Page 8. Creating the Blog Posts Page 9. Adding a Sidebar to the Social Network 10. Creating the Home page in Our Social Network 11. Creating the User's Profile Page 12. Displaying Thumbnails of Our Photos 13. Opening Images Using a Light Box 14. Other Books You May Enjoy

Implementing the sidebar

We are now at the final stage of this chapter, where we implement a sidebar with call links to other great articles. As you may remember from earlier in this chapter , we added a div, which spanned only nine columns on larger screens, and the remaining three are for the sidebar. To access them, add the following code below the div that contains all the main content:

The code we added simply creates a div to contain the sidebar and adds a section header along with a horizontal rule. This will produce the following result:

This is a good start, but the horizontal line is barely visible; I wouldn't blame you if you can't see it—it is, after all, that faint. We will override the border properties to change the size and color. First, add a class of postSidebarLine to the horizontal rule tag:

Now, add the following code to the index.css file...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image