Building a Responsive Knowledge Base Theme using Bootstrap 5

• 7 minutes READ

The term “knowledge base” usually attributes to the information stored in a system. Generally, knowledge bases are used to basically store any information in a container, formerly, in a form of a database. With the new advances in technology, this idea has changed in many ways.

In today’s state of technology, a knowledge base is simply a page or set of pages with a list of information about a specific topic or technology. It is a self-service online library of information about a product, service, or technology written in a way to help customers, site visitors or even employees to find information as quickly as possible without taking up too much time and human intervention.

The way the knowledge base content is laid out is very diverse and structured in such a way that people looking for a specific question or topic can find it in a short period of time. Most of the modern knowledge base uses different media to share information about a specific topic such as videos, articles, images, charts or even interactive web programs.

In today’s tutorial, I am going to show you how you can easily use Bootstrap 5 to create a modern knowledge base theme that you can use for any of your products or services.

You can check the website demo here.

Knowledge Base Theme Wireframe

Before we begin coding our knowledge base theme, let’s first look at the wireframe of our theme for this project. I am using Mockflow for our knowledge base theme’s wireframe.

No-Code Email Template Builder

With Postcards Email Builder you can create and edit email templates online without any coding skills! Includes more than 100 components to help you create custom emails templates faster than ever before.

Free Email BuilderFree Email Templates
Building a Responsive Knowledge Base Theme using Bootstrap 5

Our wireframe is very straightforward. Our knowledge base theme will have the following sections: navbar, header, benefits, knowledge base listing, users count, FAQ, testimonials and footer.

File Structure

After creating our design on Mockflow, it’s time to create the necessary files and folder first before we get into the basic knowledge base theme’s markup. We need to create the following files and folders following this composition:

root/
|—css/
|——style.css
|—img/
|—js/
|——script.js
|—index.html

Downloading Bootstrap’s Source Files

Next, we need to download the Bootstrap source files and add them to our css and js folder. In order to do this, go to the Bootstrap download page and download the source files of any theme. Inside the download source files, we need to copy the bootstrap.min.css to our CSS folder. We also need to copy the bootstrap.bundle.min.js inside our js folder.

Images

I’ve already set up all the images that we need for our knowledge base theme. You can download them here and place these images inside the img theme folder.

Downloading Bootstrap’s Source Files

Font Awesome Icons

For our icons, we’re going to use Font Awesome icons. Instead of CDN, we’re going to use Font Awesome Kits. Using kits is usually the best approach for both the performance and flexibility of your website or application. In order to use Font Awesome kits, you need to follow the getting started page instruction here and log-in to your account. You can create an account if you don’t have one yet.

You will be able to create a kit at this point by clicking on the “New Kit” button at the upper right corner of the screen and then copy the kit’s code to your project similar to this screen.

Getting started with the markup

We will simply copy this script code at the bottom of our markup before the closing </body> tag (more on this later).

Low-Code Website Builders

With Startup App and Slides App you can build unlimited websites using the online website editor which includes ready-made designed and coded elements, templates and themes.

Try Startup App Try Slides AppOther Products

Getting started with the markup

After downloading all of the necessary files for our project, it’s now time to set up the basic starter html codes along with the links to our CSS and JavaScript files. Inside the index.html file, we need to add the following codes:

&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
   &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
      &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
      &lt;title&gt;KB - Bootstrap 5 Knowledge Base Theme&lt;/title&gt;
      &lt;!-- CSS --&gt;
      &lt;link rel=&quot;stylesheet&quot; href=&quot;css/style.css&quot;&gt;
      &lt;link rel=&quot;stylesheet&quot; href=&quot;css/bootstrap.min.css&quot;&gt;
      &lt;!-- FONT --&gt;
      &lt;link rel=&quot;preconnect&quot; href=&quot;https://fonts.gstatic.com&quot;&gt;
      &lt;link href=&quot;https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&amp;display=swap&quot; rel=&quot;stylesheet&quot;&gt;
   &lt;/head&gt;
   &lt;body&gt;
      &lt;!-- JS --&gt;
      &lt;script src=&quot;js/script.js&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;https://kit.fontawesome.com/4241dd0506.js&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;js/bootstrap.bundle.min.js&quot;&gt;&lt;/script&gt;
   &lt;/body&gt;
&lt;/html&gt;

Navbar

Now that we have all of the basic markup, let’s start working on our navbar.

For our navbar, we will use the latest bootstrap 5 navbar component and then customize the look and feel using CSS style later on. We’ll have a couple of navbar links that will be toggled on a small device screen.

&lt;nav id=&quot;navbar&quot; class=&quot;navbar navbar-expand-lg navbar-light&quot;&gt;
   &lt;div class=&quot;container-xxl container-fluid &quot;&gt;
      &lt;a id=&quot;navbar-brand&quot; class=&quot;navbar-brand&quot; href=&quot;#&quot;&gt;KB&lt;/a&gt;
      &lt;button class=&quot;navbar-toggler&quot; type=&quot;button&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#navbarText&quot;
         aria-controls=&quot;navbarText&quot; aria-expanded=&quot;false&quot; aria-label=&quot;Toggle navigation&quot;&gt;
      &lt;span class=&quot;navbar-toggler-icon&quot;&gt;&lt;/span&gt;
      &lt;/button&gt;
      &lt;div class=&quot;collapse navbar-collapse&quot; id=&quot;navbarText&quot;&gt;
         &lt;ul class=&quot;navbar-nav me-auto mb-2 mb-lg-0&quot;&gt;
            &lt;li class=&quot;nav-item&quot;&gt;
               &lt;a class=&quot;nav-link active&quot; aria-current=&quot;page&quot; href=&quot;#&quot;&gt;Home&lt;/a&gt;
            &lt;/li&gt;
            &lt;li class=&quot;nav-item&quot;&gt;
               &lt;a class=&quot;nav-link&quot; href=&quot;#&quot;&gt;Product&lt;/a&gt;
            &lt;/li&gt;
            &lt;li class=&quot;nav-item&quot;&gt;
               &lt;a class=&quot;nav-link&quot; href=&quot;#&quot;&gt;Services&lt;/a&gt;
            &lt;/li&gt;
            &lt;li class=&quot;nav-item&quot;&gt;
               &lt;a class=&quot;nav-link&quot; href=&quot;#&quot;&gt;Shop&lt;/a&gt;
            &lt;/li&gt;
            &lt;li class=&quot;nav-item&quot;&gt;
               &lt;a class=&quot;nav-link&quot; href=&quot;#&quot;&gt;Blog&lt;/a&gt;
            &lt;/li&gt;
         &lt;/ul&gt;
         &lt;span class=&quot;navbar-text&quot;&gt;
            &lt;a class=&quot;btn primary-button&quot; href=&quot;#&quot;&gt;Contact Us&lt;/a&gt;
         &lt;/span&gt;
      &lt;/div&gt;
   &lt;/div&gt;
&lt;/nav&gt;

Header Section

Next, let’s create our header section. Usually, web designers and developers create this section with a bootstrap’s jumbotron component but we will not use this bootstrap component this time, instead of a regular section markup that has all the necessary bootstrap and custom classes including images and a search bar component to make it look nice and presentable.

&lt;section id=&quot;header&quot;&gt;
   &lt;div class=&quot;header-content&quot;&gt;
      &lt;div class=&quot;container-fluid container-xl hero&quot;&gt;
         &lt;div class=&quot;row&quot;&gt;
            &lt;div class=&quot;col-sm-12 col-md-5 svg-header-container &quot;&gt;
               &lt;img src=&quot;img/svg/illustration2.svg&quot; alt=&quot;Mobile SVG illustration&quot;&gt;
            &lt;/div&gt;
            &lt;div class=&quot;col-sm-12 col-md-7 header-content-container&quot;&gt;
               &lt;div&gt;
                  &lt;h1 class=&quot;text--white text-heading&quot;&gt;Build a business with a stunning &lt;span class=&quot;text--green&quot;&gt;knowledge base&lt;/span&gt;. What can we help you &lt;span class=&quot;text--green&quot;&gt;find&lt;/span&gt;?&lt;/h1&gt;
                  &lt;p class=&quot;header-content-text&quot;&gt;KB is a fully featured knowledge base theme for any products and services.&lt;/p&gt;
                  &lt;div class=&quot;search-container&quot;&gt;
                     &lt;form action=&quot;#&quot;&gt;
                        &lt;input class=&quot;form-control&quot; placeholder=&quot;Search for something&quot;&gt;
                        &lt;button class=&quot;btn secondary-button&quot; type=&quot;submit&quot;&gt;&lt;i
                           class=&quot;fas fa-search&quot;&gt;&lt;/i&gt;&lt;/button&gt;
                     &lt;/form&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
            &lt;/div&gt;
         &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;
   &lt;svg class=&quot;wave&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 1440 320&quot;&gt;
      &lt;path fill=&quot;#ffffff&quot; fill-opacity=&quot;1&quot;
         d=&quot;M0,32L34.3,48C68.6,64,137,96,206,96C274.3,96,343,64,411,48C480,32,549,32,617,80C685.7,128,754,224,823,234.7C891.4,245,960,171,1029,160C1097.1,149,1166,203,1234,224C1302.9,245,1371,235,1406,229.3L1440,224L1440,320L1405.7,320C1371.4,320,1303,320,1234,320C1165.7,320,1097,320,1029,320C960,320,891,320,823,320C754.3,320,686,320,617,320C548.6,320,480,320,411,320C342.9,320,274,320,206,320C137.1,320,69,320,34,320L0,320Z&quot;&gt;
      &lt;/path&gt;
   &lt;/svg&gt;
&lt;/section&gt;

Benefits and Associated Companies Section

Now, let’s add an extra section where we will feature the figurative companies that are associated with our knowledge base product for demonstration purposes only. We will also add the features that our figurative company is offering and its benefits in this section.

&lt;section id=&quot;companies&quot; class=&quot;section&quot;&gt;
   &lt;div class=&quot;container&quot;&gt;
      &lt;h5&gt;Used by 400+ people from the biggest companies&lt;/h5&gt;
      &lt;div class=&quot;company-img-container&quot;&gt;
         &lt;img class=&quot;company-img&quot; src=&quot;img/company-logo/amazon.png&quot; alt=&quot;&quot;&gt;
         &lt;img class=&quot;company-img&quot; src=&quot;img/company-logo/disney.png&quot; alt=&quot;&quot;&gt;
         &lt;img class=&quot;company-img&quot; src=&quot;img/company-logo/kfc.png&quot; alt=&quot;&quot;&gt;
         &lt;img class=&quot;company-img&quot; src=&quot;img/company-logo/mailchimp.png&quot; alt=&quot;&quot;&gt;
         &lt;img class=&quot;company-img&quot; src=&quot;img/company-logo/shopify.png&quot; alt=&quot;&quot;&gt;
      &lt;/div&gt;
   &lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;about&quot; class=&quot;section&quot;&gt;
   &lt;div class=&quot;container-fluid&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
         &lt;div class=&quot;col-xl-4 col-md-10 col-sm-12 offset-xl-1 left&quot;&gt;
            &lt;div class=&quot;sticky-element&quot;&gt;
               &lt;h3 class=&quot;text-heading text--violet&quot;&gt;WHY CHOOSE US?&lt;/h3&gt;
               &lt;h2 class=&quot;text-heading&quot;&gt;Check out why we’re the best company for all of your
                  needs.
               &lt;/h2&gt;
            &lt;/div&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-xl-6 col-lg-12 col-md-12 col-sm-12 right&quot;&gt;
            &lt;div class=&quot;row&quot;&gt;
               &lt;div class=&quot;col-xl-4 col-lg-4 col-md-4 col-sm-6 col-xs-12 col-flex&quot;&gt;
                  &lt;div class=&quot;about-card&quot;&gt;
                     &lt;img src=&quot;img/icons/shield.png&quot; alt=&quot;Icon&quot;&gt;
                     &lt;h4 class=&quot;text-heading&quot;&gt;Multi-factor authentication.&lt;/h4&gt;
                     &lt;p&gt;Increase learner engagement &amp; knowledge retention in higher education and corporate
                        training.
                     &lt;/p&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
               &lt;div class=&quot;col-xl-4 col-lg-4 col-md-4 col-sm-6 col-xs-12 col-flex&quot;&gt;
                  &lt;div class=&quot;about-card&quot;&gt;
                     &lt;img src=&quot;img/icons/flag.png&quot; alt=&quot;Icon&quot;&gt;
                     &lt;h4 class=&quot;text-heading&quot;&gt;Increase user conversion.&lt;/h4&gt;
                     &lt;p&gt;Increase learner engagement &amp; knowledge retention in higher education and corporate
                        training.
                     &lt;/p&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
               &lt;div class=&quot;col-xl-4 col-lg-4 col-md-4 col-sm-6 col-xs-12 col-flex&quot;&gt;
                  &lt;div class=&quot;about-card&quot;&gt;
                     &lt;img src=&quot;img/icons/heart-shape-outline-with-lifeline.png&quot; alt=&quot;Icon&quot;&gt;
                     &lt;h4 class=&quot;text-heading&quot;&gt;Full control over UX.&lt;/h4&gt;
                     &lt;p&gt;Increase learner engagement &amp; knowledge retention in higher education and corporate
                        training.
                     &lt;/p&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
               &lt;div class=&quot;col-xl-4 col-lg-4 col-md-4 col-sm-6 col-xs-12 col-flex&quot;&gt;
                  &lt;div class=&quot;about-card&quot;&gt;
                     &lt;img src=&quot;img/icons/selective.png&quot; alt=&quot;Icon&quot;&gt;
                     &lt;h4 class=&quot;text-heading&quot;&gt;Expand user funnel.&lt;/h4&gt;
                     &lt;p&gt;Increase learner engagement &amp; knowledge retention in higher education and corporate
                        training.
                     &lt;/p&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
               &lt;div class=&quot;col-xl-4 col-lg-4 col-md-4 col-sm-6 col-xs-12 col-flex&quot;&gt;
                  &lt;div class=&quot;about-card&quot;&gt;
                     &lt;img src=&quot;img/icons/favorites.png&quot; alt=&quot;Icon&quot;&gt;
                     &lt;h4 class=&quot;text-heading&quot;&gt;Security compliant.&lt;/h4&gt;
                     &lt;p&gt;Increase learner engagement &amp; knowledge retention in higher education and corporate
                        training.
                     &lt;/p&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
               &lt;div class=&quot;col-xl-4 col-lg-4 col-md-4 col-sm-6 col-xs-12 col-flex&quot;&gt;
                  &lt;div class=&quot;about-card&quot;&gt;
                     &lt;img src=&quot;img/icons/fire.png&quot; alt=&quot;Icon&quot;&gt;
                     &lt;h4 class=&quot;text-heading&quot;&gt;Integration in minutes.&lt;/h4&gt;
                     &lt;p&gt;Increase learner engagement &amp; knowledge retention in higher education and corporate
                        training.
                     &lt;/p&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
               &lt;div class=&quot;col-xl-12 col-lg-12 col-sm-12 about-link-container&quot;&gt;
                  &lt;a class=&quot;btn primary-button&quot; href=&quot;#&quot;&gt;View more choices &lt;i
                     class=&quot;fas fa-arrow-right&quot;&gt;&lt;/i&gt;&lt;/a&gt;
               &lt;/div&gt;
            &lt;/div&gt;
         &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;
&lt;/section&gt;

Knowledge Base Listing Section

Next, let’s create the actual listing of our knowledge base. This will include categories and links of articles for a particular topic. We will add a <div> tag with a custom class of .cat-card-content for each of our cards to contain all the listings for our knowledge base.

&lt;section id=&quot;categories&quot; class=&quot;section&quot;&gt;
   &lt;div class=&quot;container guide-container&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
         &lt;div class=&quot;col-sm-12 col-md-8 offset-md-2 title-section&quot;&gt;
            &lt;h3 class=&quot;text-heading text--violet&quot;&gt;GUIDE CATEGORIES&lt;/h3&gt;
            &lt;h2 class=&quot;text-heading&quot;&gt;Easily create Documentation, Knowledge-base, FAQ, Forum and
               more.
            &lt;/h2&gt;
         &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;row&quot;&gt;
         &lt;div class=&quot;col-md-4 col-sm-12 cat-card&quot;&gt;
            &lt;div class=&quot;cat-card-content&quot;&gt;
               &lt;h4 class=&quot;text-heading&quot;&gt;Getting Started&lt;/h4&gt;
               &lt;ul&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Welcome to Ghost&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Writing posts with Ghost&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Publishing options&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Managing admin settings&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;btn text--green link-button&quot; href=&quot;#&quot;&gt;View more choices &lt;i
                        class=&quot;fas fa-arrow-right&quot;&gt;&lt;/i&gt;&lt;/a&gt;
                  &lt;/li&gt;
               &lt;/ul&gt;
            &lt;/div&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-md-4 col-sm-12 cat-card&quot;&gt;
            &lt;div class=&quot;cat-card-content&quot;&gt;
               &lt;h4 class=&quot;text-heading&quot;&gt;Advanced Usage&lt;/h4&gt;
               &lt;ul&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;How do I set a publication language?&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;How do I change my configured site URL?&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;How do I set a publication language?&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;How do I change my configured site URL?&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;btn text--green link-button&quot; href=&quot;#&quot;&gt;View more choices &lt;i
                        class=&quot;fas fa-arrow-right&quot;&gt;&lt;/i&gt;&lt;/a&gt;
                  &lt;/li&gt;
               &lt;/ul&gt;
            &lt;/div&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-md-4 col-sm-12 cat-card&quot;&gt;
            &lt;div class=&quot;cat-card-content&quot;&gt;
               &lt;h4 class=&quot;text-heading&quot;&gt;Writing posts and pages&lt;/h4&gt;
               &lt;ul&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Organising content in Ghost&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Using the editor&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Publishing Options&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;General publication settings&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;btn text--green link-button&quot; href=&quot;#&quot;&gt;View more choices &lt;i
                        class=&quot;fas fa-arrow-right&quot;&gt;&lt;/i&gt;&lt;/a&gt;
                  &lt;/li&gt;
               &lt;/ul&gt;
            &lt;/div&gt;
         &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;row&quot;&gt;
         &lt;div class=&quot;col-md-4 col-sm-12 cat-card&quot;&gt;
            &lt;div class=&quot;cat-card-content&quot;&gt;
               &lt;h4 class=&quot;text-heading&quot;&gt;Website Configuration&lt;/h4&gt;
               &lt;ul&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Managing your team&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Imports and exports&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Design Settings&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Design Settings&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;btn text--green link-button&quot; href=&quot;#&quot;&gt;View more choices &lt;i
                        class=&quot;fas fa-arrow-right&quot;&gt;&lt;/i&gt;&lt;/a&gt;
                  &lt;/li&gt;
               &lt;/ul&gt;
            &lt;/div&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-md-4 col-sm-12 cat-card&quot;&gt;
            &lt;div class=&quot;cat-card-content&quot;&gt;
               &lt;h4 class=&quot;text-heading&quot;&gt;Databases&lt;/h4&gt;
               &lt;ul&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Setup home page layout&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Where do i post support query?&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Multiple Installs on One Domain&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Setup shop page&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;btn text--green link-button&quot; href=&quot;#&quot;&gt;View more choices &lt;i
                        class=&quot;fas fa-arrow-right&quot;&gt;&lt;/i&gt;&lt;/a&gt;
                  &lt;/li&gt;
               &lt;/ul&gt;
            &lt;/div&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-md-4 col-sm-12 cat-card&quot;&gt;
            &lt;div class=&quot;cat-card-content&quot;&gt;
               &lt;h4 class=&quot;text-heading&quot;&gt;Most Popular Articles&lt;/h4&gt;
               &lt;ul&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;How do i change link and button color globally&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Where do i post support query?&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Private Article&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;hvr-link&quot; href=&quot;#&quot;&gt;Setup shop page&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                     &lt;a class=&quot;btn text--green link-button&quot; href=&quot;#&quot;&gt;View more choices &lt;i
                        class=&quot;fas fa-arrow-right&quot;&gt;&lt;/i&gt;&lt;/a&gt;
                  &lt;/li&gt;
               &lt;/ul&gt;
            &lt;/div&gt;
         &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;
&lt;/section&gt;

Users Count

Next, let’s work on the users count section. In this section, we’re going to showcase the number of users of our knowledge base in general. You can modify the text and numbers according to your liking.

&lt;section id=&quot;stats&quot; class=&quot;section&quot;&gt;
   &lt;div class=&quot;container&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
         &lt;div class=&quot;col-lg-6 col-md-12 offset-lg-3 title-section&quot;&gt;
            &lt;h2 class=&quot;text-heading section-heading&quot;&gt;Our company in numbers&lt;/h2&gt;
            &lt;p&gt;Our company is spreading all over the world in a very wide range and is always on the rise to
               bring the best services to you
            &lt;/p&gt;
         &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;row&quot;&gt;
         &lt;div class=&quot;col-md-3 col-sm-6 col-xs-12&quot;&gt;
            &lt;div class=&quot;stat-item&quot;&gt;
               &lt;h6&gt;245&lt;/h6&gt;
               &lt;p&gt;Customers&lt;/p&gt;
            &lt;/div&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-md-3 col-sm-6 col-xs-12&quot;&gt;
            &lt;div class=&quot;stat-item&quot;&gt;
               &lt;h6&gt;27+&lt;/h6&gt;
               &lt;p&gt;Expert Instruction&lt;/p&gt;
            &lt;/div&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-md-3 col-sm-6 col-xs-12&quot;&gt;
            &lt;div class=&quot;stat-item&quot;&gt;
               &lt;h6&gt;200k&lt;/h6&gt;
               &lt;p&gt;Active Student&lt;/p&gt;
            &lt;/div&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-md-3 col-sm-6 col-xs-12&quot;&gt;
            &lt;div class=&quot;stat-item&quot;&gt;
               &lt;h6&gt;1127&lt;/h6&gt;
               &lt;p&gt;Guidelines&lt;/p&gt;
            &lt;/div&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-md-10 offset-md-1&quot;&gt;
            &lt;div class=&quot;stat-img&quot;&gt;
               &lt;img src=&quot;img/laptop.jpg&quot; alt=&quot;&quot;&gt;
            &lt;/div&gt;
         &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;
&lt;/section&gt;

FAQ Section

An FAQ or Frequently Asked Questions is often used in articles, websites as well as forums where common questions tend to persist. We’re going to add this section by using the Bootstrap list group and accordion component along with our custom classes which we can later on style using our CSS file.

&lt;section id=&quot;faq&quot; class=&quot;section&quot;&gt;
   &lt;div class=&quot;container&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
         &lt;div class=&quot;col-lg-6 col-md-12 offset-lg-3 title-section&quot;&gt;
            &lt;h2 class=&quot;text-heading section-heading&quot;&gt;Frequently Asked Questions&lt;/h2&gt;
            &lt;p&gt;FAQ is suppose to be an online document that poses a series of common
               questions and answers on a specific topic.
            &lt;/p&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-lg-4 col-md-5 col-sm-12&quot;&gt;
            &lt;div class=&quot;card sticky-element&quot;&gt;
               &lt;ul class=&quot;list-group list-group-flush&quot;&gt;
                  &lt;h4 class=&quot;text-heading&quot;&gt;Quick Navigation&lt;/h4&gt;
                  &lt;a href=&quot;#&quot;
                     class=&quot;list-group-item list-group-item-action d-flex justify-content-between align-items-center active&quot;
                     aria-current=&quot;true&quot;&gt;
                  License
                  &lt;i class=&quot;fas fa-chevron-right&quot;&gt;&lt;/i&gt;
                  &lt;/a&gt;
                  &lt;a href=&quot;#&quot;
                     class=&quot;list-group-item list-group-item-action d-flex justify-content-between align-items-center&quot;&gt;
                  Pricing &amp; Support
                  &lt;i class=&quot;fas fa-chevron-right&quot;&gt;&lt;/i&gt;
                  &lt;/a&gt;
                  &lt;a href=&quot;#&quot;
                     class=&quot;list-group-item list-group-item-action d-flex justify-content-between align-items-center&quot;&gt;
                  Purchasing Online
                  &lt;i class=&quot;fas fa-chevron-right&quot;&gt;&lt;/i&gt;
                  &lt;/a&gt;
                  &lt;a href=&quot;#&quot;
                     class=&quot;list-group-item list-group-item-action d-flex justify-content-between align-items-center&quot;&gt;
                  Returns
                  &lt;i class=&quot;fas fa-chevron-right&quot;&gt;&lt;/i&gt;
                  &lt;/a&gt;
               &lt;/ul&gt;
            &lt;/div&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-lg-8 col-md-7 col-sm-12&quot;&gt;
            &lt;div class=&quot;accordion&quot; id=&quot;accordionExample&quot;&gt;
               &lt;div class=&quot;accordion-item&quot;&gt;
                  &lt;h2 class=&quot;accordion-header&quot; id=&quot;headingOne&quot;&gt;
                     &lt;button class=&quot;accordion-button&quot; type=&quot;button&quot; data-bs-toggle=&quot;collapse&quot;
                        data-bs-target=&quot;#collapseOne&quot; aria-expanded=&quot;true&quot; aria-controls=&quot;collapseOne&quot;&gt;
                     What is your refund policy and terms and conditions?
                     &lt;/button&gt;
                  &lt;/h2&gt;
                  &lt;div id=&quot;collapseOne&quot; class=&quot;accordion-collapse collapse show&quot; aria-labelledby=&quot;headingOne&quot;
                     data-bs-parent=&quot;#accordionExample&quot;&gt;
                     &lt;div class=&quot;accordion-body&quot;&gt;
                        We comply fully with KB’s refund policy. We issue refunds for the reasons KB
                        permits us to give refund and we don’t issue refunds on the cases KB does not
                        guarantee refunds. Please check KB’s refund policy:
                     &lt;/div&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
               &lt;div class=&quot;accordion-item&quot;&gt;
                  &lt;h2 class=&quot;accordion-header&quot; id=&quot;headingTwo&quot;&gt;
                     &lt;button class=&quot;accordion-button collapsed&quot; type=&quot;button&quot; data-bs-toggle=&quot;collapse&quot;
                        data-bs-target=&quot;#collapseTwo&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapseTwo&quot;&gt;
                     How many shortcodes/blocks/elements are there in Rogan?
                     &lt;/button&gt;
                  &lt;/h2&gt;
                  &lt;div id=&quot;collapseTwo&quot; class=&quot;accordion-collapse collapse&quot; aria-labelledby=&quot;headingTwo&quot;
                     data-bs-parent=&quot;#accordionExample&quot;&gt;
                     &lt;div class=&quot;accordion-body&quot;&gt;
                        There are over 200 shortcodes/blocks/elements in Rogan WordPress Theme. You can use
                        any block/element into any page as you want.
                     &lt;/div&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
               &lt;div class=&quot;accordion-item&quot;&gt;
                  &lt;h2 class=&quot;accordion-header&quot; id=&quot;headingThree&quot;&gt;
                     &lt;button class=&quot;accordion-button collapsed&quot; type=&quot;button&quot; data-bs-toggle=&quot;collapse&quot;
                        data-bs-target=&quot;#collapseThree&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapseThree&quot;&gt;
                     Is Rogan Gutenberg compatible and latest WordPress supported?
                     &lt;/button&gt;
                  &lt;/h2&gt;
                  &lt;div id=&quot;collapseThree&quot; class=&quot;accordion-collapse collapse&quot; aria-labelledby=&quot;headingThree&quot;
                     data-bs-parent=&quot;#accordionExample&quot;&gt;
                     &lt;div class=&quot;accordion-body&quot;&gt;
                        Yes, SaasLand is compatible with Gutenberg.
                     &lt;/div&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
               &lt;div class=&quot;accordion-item&quot;&gt;
                  &lt;h2 class=&quot;accordion-header&quot; id=&quot;headingFour&quot;&gt;
                     &lt;button class=&quot;accordion-button collapsed&quot; type=&quot;button&quot; data-bs-toggle=&quot;collapse&quot;
                        data-bs-target=&quot;#collapseFour&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapseFour&quot;&gt;
                     How many websites can I use Rogan in with a regular license?
                     &lt;/button&gt;
                  &lt;/h2&gt;
                  &lt;div id=&quot;collapseFour&quot; class=&quot;accordion-collapse collapse&quot; aria-labelledby=&quot;headingFour&quot;
                     data-bs-parent=&quot;#accordionExample&quot;&gt;
                     &lt;div class=&quot;accordion-body&quot;&gt;
                        According to KB’s licensing, you can use SaasLand or any other theme on only one website. If you want to use it on multiple websites, you must buy multiple licenses. 
                     &lt;/div&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
            &lt;/div&gt;
         &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;
&lt;/section&gt;
&lt;h3&gt;Testimonials Section&lt;/h3&gt;
Next, let's add a simple customer testimonial showcasing user experience with the knowledge base page. We're going to use bootstrap's flexbox here in order to manipulate the responsive view of two of the column testimonial boxes.
&lt;section id=&quot;testimonials&quot; class=&quot;section&quot;&gt;
   &lt;div class=&quot;space-between-blocks&quot;&gt;
      &lt;div class=&quot;container&quot;&gt;
         &lt;div class=&quot;row&quot;&gt;
            &lt;div class=&quot;col-md-8 offset-md-2 title-section&quot;&gt;
               &lt;h3 class=&quot;text-heading text--violet&quot;&gt;WHAT THEY SAY ABOUT US&lt;/h3&gt;
               &lt;h2 class=&quot;text-heading&quot;&gt;Approved by more than 300 customer like you all aroung the world.&lt;/h2&gt;
            &lt;/div&gt;
            &lt;div class=&quot;row px-2 pt-4&quot;&gt;
               &lt;div class=&quot;col-lg-6 pb-5&quot;&gt;
                  &lt;div class=&quot;testimonial-card-1&quot;&gt;
                     &lt;p class=&quot;testimonial-card-1__paragraph&quot;&gt;Knowledge base is one of the critical tools for both customer support and internal knowledge management. That’s why KB always aim to use the best technology available and do periodic market reviews to make sure we are using the latest and the most advanced tools. &lt;/p&gt;
                     &lt;div class=&quot;testimonial-blk-person&quot;&gt;
                        &lt;div&gt;&lt;img class=&quot;testimonial-blk-person__avatar&quot;
                           src=&quot;img/mark-doe.jpg&quot;&gt;&lt;/div&gt;
                        &lt;div class=&quot;px-2&quot;&gt;&lt;/div&gt;
                        &lt;div class=&quot;flex-grow-1 d-flex flex-column&quot;&gt;&lt;span class=&quot;testimonial-blk-person__rating&quot;&gt;&lt;i
                           class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;&lt;i class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;&lt;i
                           class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;&lt;i class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;&lt;i
                           class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;testimonial-blk-person__name my-1&quot;&gt;Mark
                           Doe&lt;/span&gt;&lt;span class=&quot;testimonial-blk-person__info&quot;&gt;XYZ Company&lt;/span&gt;
                        &lt;/div&gt;
                     &lt;/div&gt;
                     &lt;span class=&quot;testimonial-card-1__quote-symbol&quot;&gt;&lt;i
                        class=&quot;fas fa-quote-left&quot;&gt;&lt;/i&gt;&lt;/span&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
               &lt;div class=&quot;col-lg-6 pb-5&quot;&gt;
                  &lt;div class=&quot;testimonial-card-1&quot;&gt;
                     &lt;p class=&quot;testimonial-card-1__paragraph&quot;&gt;My experience with KB goes back several years. I've had a few KB programs over the years because I create and manage multiple websites. I recently made the decision to have all of our KB's convert to KB and I've been very, very pleased.&lt;/p&gt;
                     &lt;div class=&quot;testimonial-blk-person&quot;&gt;
                        &lt;div&gt;&lt;img class=&quot;testimonial-blk-person__avatar&quot;
                           src=&quot;img/chris-doe.jpg&quot;&gt;&lt;/div&gt;
                        &lt;div class=&quot;px-2&quot;&gt;&lt;/div&gt;
                        &lt;div class=&quot;flex-grow-1 d-flex flex-column&quot;&gt;&lt;span class=&quot;testimonial-blk-person__rating&quot;&gt;&lt;i
                           class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;&lt;i class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;&lt;i
                           class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;&lt;i class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;&lt;i
                           class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;&lt;/span&gt;&lt;span
                           class=&quot;testimonial-blk-person__name my-1&quot;&gt;Chris Doe&lt;/span&gt;&lt;span
                           class=&quot;testimonial-blk-person__info&quot;&gt;CHO Digital&lt;/span&gt;&lt;/div&gt;
                     &lt;/div&gt;
                     &lt;span class=&quot;testimonial-card-1__quote-symbol&quot;&gt;&lt;i
                        class=&quot;fas fa-quote-left&quot;&gt;&lt;/i&gt;&lt;/span&gt;
                  &lt;/div&gt;
               &lt;/div&gt;
            &lt;/div&gt;
         &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;
&lt;/section&gt;

Footer Section

Finally, we will be adding our footer section’s markup at the very bottom of our knowledge base theme. This will have a four column layout for additional support mediums such as forums, Twitter, email and phone support. And then lastly, we’re going to add the footer links and logo right after these columns.

&lt;section id=&quot;contact&quot; class=&quot;section&quot;&gt;
   &lt;div class=&quot;container&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
         &lt;div class=&quot;col-md-6 offset-md-3 title-section&quot;&gt;
            &lt;h2 class=&quot;text-heading section-heading&quot;&gt;Get More Help&lt;/h2&gt;
            &lt;p&gt;Here we have more ways to get help from real humans.&lt;/p&gt;
         &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;row&quot;&gt;
         &lt;div class=&quot;col-lg-3 col-sm-6 col-xs-12&quot;&gt;
            &lt;a href=&quot;#&quot;&gt;
               &lt;div class=&quot;card&quot;&gt;
                  &lt;i class=&quot;fas fa-user-friends&quot;&gt;&lt;/i&gt;
                  &lt;p&gt;Forums&lt;/p&gt;
               &lt;/div&gt;
            &lt;/a&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-lg-3 col-sm-6 col-xs-12&quot;&gt;
            &lt;a href=&quot;#&quot;&gt;
               &lt;div class=&quot;card&quot;&gt;
                  &lt;i class=&quot;fab fa-twitter&quot;&gt;&lt;/i&gt;
                  &lt;p&gt;Twitter Support&lt;/p&gt;
               &lt;/div&gt;
            &lt;/a&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-lg-3 col-sm-6 col-xs-12&quot;&gt;
            &lt;a href=&quot;#&quot;&gt;
               &lt;div class=&quot;card&quot;&gt;
                  &lt;i class=&quot;fas fa-envelope&quot;&gt;&lt;/i&gt;
                  &lt;p&gt;Email Us&lt;/p&gt;
               &lt;/div&gt;
            &lt;/a&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-lg-3 col-sm-6 col-xs-12&quot;&gt;
            &lt;a href=&quot;#&quot;&gt;
               &lt;div class=&quot;card&quot;&gt;
                  &lt;i class=&quot;fas fa-phone-alt&quot;&gt;&lt;/i&gt;
                  &lt;p&gt;Phone Call&lt;/p&gt;
               &lt;/div&gt;
            &lt;/a&gt;
         &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;
&lt;/section&gt;
&lt;footer&gt;
   &lt;div class=&quot;container&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
         &lt;div class=&quot;col-md-9 col-sm-12  left&quot;&gt;
            &lt;ul&gt;
               &lt;li&gt;
                  &lt;a href=&quot;#&quot; class=&quot;nav-link&quot;&gt;Home&lt;/a&gt;
               &lt;/li&gt;
               &lt;li&gt;
                  &lt;a href=&quot;#&quot; class=&quot;nav-link&quot;&gt;Docs&lt;/a&gt;
               &lt;/li&gt;
               &lt;li&gt;
                  &lt;a href=&quot;#&quot; class=&quot;nav-link&quot;&gt;Changelog&lt;/a&gt;
               &lt;/li&gt;
               &lt;li&gt;
                  &lt;a href=&quot;#&quot; class=&quot;nav-link&quot;&gt;Purchase&lt;/a&gt;
               &lt;/li&gt;
            &lt;/ul&gt;
         &lt;/div&gt;
         &lt;div class=&quot;col-md-3 col-sm-12  right footer-logo &quot;&gt;
            &lt;a id=&quot;navbar-brand&quot; class=&quot;navbar-brand &quot; href=&quot;#&quot;&gt;KB&lt;/a&gt;
         &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;
&lt;/footer&gt;

After adding all of these markups, our theme will surely look like a mess. We need to put some CSS styles inside our style.css in order to make it look good and presentable. Let’s do this next.

Adding the Stylesheet

To make our knowledge base theme look really nice, we will now be adding our CSS for each section of our Bootstrap theme inside the style.css file.

General CSS

Before we move to other important CSS styles, we need to add our general CSS. These are CSS codes that will simply format our basic markup such as the font that we’re going to use throughout our theme, the starting font-size and background and so forth.

/*********************************************/


/*              GENERAL CSS                  &quot;/
/*********************************************/

* {
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	font-family: 'Poppins', sans-serif;
}

h1.text-heading {
	font-size: 50px;
	font-weight: bold;
}

h2.text-heading {
	font-weight: bold;
	font-size: 40px;
}

h3.text-heading {
	font-size: 15px;
	font-weight: bold;
	letter-spacing: 2px;
}

h4.text-heading {
	font-weight: bold;
	font-size: 20px;
	padding: 12px 0;
}

Utilities CSS

Now let’s add some set of CSS utility classes that can be used on any element of our knowledge base theme in order to modify the text, element placement or adjust the padding and margin.

/*********************************************/


/*               UTILITIES CSS               &quot;/
/*********************************************/

.primary-button {
	padding: 10px 22px !important;
	background: #4ED199 !important;
	border-radius: 10px;
	box-shadow: 0px 0px 30px 0px rgb(0 0 0 / 9%);
	color: #ffffff !important;
	font-family: 'Poppins', sans-serif;
	font-size: 14px !important;
	letter-spacing: 1px;
}

.secondary-button {
	background: #2f2e41 !important;
	border-radius: 35px !important;
	box-shadow: 0px 0px 30px 0px rgb(0 0 0 / 9%);
	color: #ffffff !important;
	font-family: 'Poppins', sans-serif;
	font-weight: bold !important;
	font-size: 14px !important;
	letter-spacing: 1px;
	padding: 0.8rem 1.2rem !important;
	text-decoration: none;
}

.primary-button:hover {
	transform: translateY(-5px);
	transition: all .5s;
}

#categories ul li .link-button {
	padding: 0;
	margin-top: 20px;
	font-size: 16px;
}

#categories ul li .link-button:hover {
	transform: translateX(5px);
	transition: all .5s;
}

section .link-button {
	font-weight: bold;
	font-size: 18px;
	letter-spacing: 1px;
	padding: 0 15px;
}

button:focus {
	box-shadow: none !important;
}


/* colors */

.bg--violet {
	height: 40vh;
	background: #6851ff;
}

.text--white {
	color: #ffffff;
}

.text--green {
	color: #4ED199 !important;
}

.text--violet {
	color: #6851ff;
}

Navbar CSS

Bootstrap 5 navbar design contains the generic design of a navbar. For this part of our stylesheet, we’re going to customize the look of our navbar to make it completely different, matching our knowledge theme’s design. We will start by styling up our link items and logo (a.k.a .navbar-brand).

/*********************************************/


/*                 NAVBAR CSS            	&quot;/
/*********************************************/

nav {
	padding: 0.7rem !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.5);
	position: fixed !important;
	width: 100%;
	z-index: 99999 !important;
}

#navbar .navbar-brand {
	color: #ffffff;
	font-weight: bold;
	letter-spacing: 1px;
	font-size: 25px;
}

#navbar .nav-item {
	padding: 0 8px;
}

#navbar .nav-link {
	color: #ffffff;
	font-size: 14px;
}

Sections CSS

Now it’s time to put some CSS styles on each section specifically for header, benefits, knowledge base listing, users count, FAQ and testimonials.

Basically, the following CSS codes will simply set some properties such as the background, shadow, size, gradient color and border that we used on our markup above.

/*********************************************/


/*                 SECTIONS CSS              &quot;/
/*********************************************/

.section {
	padding: 80px 20px;
}

#header {
	background: linear-gradient(180deg, #380a7f, #5855b7);
	height: 100vh;
}

.header-content {
	display: flex;
	height: 100vh;
	align-items: center;
}

.header-content .hero {
	z-index: 9;
}

.header-content-container {
	display: flex;
	align-items: center;
}

.header-content-heading {
	padding-top: 50px;
	font-size: 52px;
}

.svg-header-container {
	text-align: center;
}

.header-content-text {
	font-size: 18px;
	line-height: 160.1%;
	color: #ffffff;
	margin-top: 15px;
}

.svg-header-container img {
	height: 100%;
}

.search-container {
	background: #ffffff;
	border-radius: 35px;
	padding: 5px;
	padding-left: 15px;
	margin-top: 40px;
	margin-right: 15%;
	margin-bottom: 50px;
}

.search-container .form-control {
	border: #ffffff
}

.search-container .form-control:focus {
	outline: none;
	border: #ffffff;
	box-shadow: none;
}

.search-container form {
	display: flex;
}

.search-container .btn.main-button {
	font-size: 13px;
}

.wave {
	position: absolute;
	bottom: 0;
	left: 0;
}

#companies .company-img-container {
	display: block;
	text-align: center;
}

#companies h5 {
	text-transform: uppercase;
	font-weight: bold;
	color: #212529;
	text-align: center;
	font-family: 'Poppins', sans-serif;
	margin-bottom: 40px;
}

.company-img {
	height: 70px;
	width: auto;
	filter: grayscale(1);
	margin: 20px;
}

.sticky-element {
	position: sticky !important;
	top: 80px;
	padding: 30px 10px;
}

section#categories {
	background: #f9f8fc;
}

.about-card {
	border: 1px solid #F1F1F1;
	border-radius: 10px;
	box-shadow: 0px 0px 30px 0px rgb(0 0 0 / 5%);
	padding: 30px 20px;
	margin-bottom: 50px;
	flex: 1;
}

.about-card p {
	font-family: 'Poppins', sans-serif;
	font-size: 16px;
	color: #868080;
}

.about-card img {
	height: 35px;
	width: auto;
}

.about-link-container {
	text-align: center;
}

section#categories,
section#testimonials {
	background: #f9f8fc;
}

#categories .row .cat-card:first-child,
#categories .row .cat-card:nth-child(2) {
	border-right: 1px solid #e6e6e6;
}

#categories .row .cat-card {
	margin: 30px 0;
	padding: 20px 50px;
}

#categories ul {
	list-style: none;
	padding-left: 0;
	margin-bottom: 0;
}

#categories ul li::before {
	content: &quot;\f15c&quot;;
	font-family: &quot;Font Awesome 5 Free&quot;;
	padding-right: 10px;
}

#categories ul li:last-child::before {
	content: &quot;&quot;;
	display: none;
}

#categories ul li {
	padding: 5px 0;
}

#categories ul li a {
	text-decoration: none;
	color: #212529;
	font-family: 'Poppins', sans-serif;
}

#categories ul li a:hover {
	color: #380a7f;
}

#categories .title-section,
#stats .title-section,
#faq .title-section,
#testimonials .title-section,
#contact .title-section {
	text-align: center;
	margin-bottom: 40px;
	margin-top: 20px;
}

#contact .title-section h2,
#faq .title-section h2,
#stats .title-section h2 {
	margin-bottom: 25px;
}

.stat-item {
	text-align: center;
}

.stat-item h6 {
	font-size: 70px;
	font-weight: bold;
	color: #6851ff;
}

.stat-item p {
	color: #868080;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.stat-img {
	margin-top: 40px;
	position: relative;
	border-radius: 5px;
}

.stat-img img {
	width: 100%;
	height: auto;
	border-radius: 5px;
}

.stat-img::before {
	content: &quot;&quot;;
	display: block;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	border-radius: 5px;
	background: rgb(104 81 255 / 60%);
}

#faq .card {
	padding: 25px;
	box-shadow: 0px 0px 30px 0px rgb(0 0 0 / 9%);
}

#faq .accordion-item {
	box-shadow: 0px 12px 30px 0px rgb(0 0 0 / 9%);
	margin-bottom: 40px;
}

#faq .accordion-button {
	font-weight: bold;
}

#faq .accordion-button:not(.collapsed) {
	color: #6851ff;
	font-weight: bold;
	background-color: transparent;
	box-shadow: none;
}

#faq .accordion-button {
	padding: 15px 25px;
}

#faq .accordion-body {
	padding: 15px 25px 35px 25px
}

#faq .accordion-item {
	border: none;
}

#faq .list-group-item.active {
	z-index: 2;
	font-weight: bold;
	color: #6851ff;
	background-color: transparent;
	border-color: #dfdfdf;
}

#faq .list-group-flush&gt;.list-group-item {
	padding: 12px;
}

.testimonial-card-1 {
	padding: 3rem 2.2rem 2.2rem 2.2rem;
	border-radius: 5px;
	position: relative;
	background: #ffffff;
	box-shadow: 0 0 30px 0 rgba(0, 0, 0, .09);
	display: flex;
	flex-direction: column;
	height: 100%
}

.testimonial-card-1__paragraph {
	font-size: .95rem;
	opacity: .9;
	line-height: 1.7;
	flex-grow: 1;
	padding-bottom: 1.5rem
}

.testimonial-card-1__quote-symbol {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	background: #6856ff;
	color: #ffffff;
	font-size: 1.3rem;
	border-radius: 10rem;
	position: absolute;
	top: -25px;
	left: 30px
}

.testimonial-blk-person {
	display: flex;
	align-items: center;
	margin-top: -1rem
}

.testimonial-blk-person__avatar {
	width: 56px;
	height: 56px;
	border-radius: 10rem
}

.testimonial-blk-person__rating {
	font-size: .75rem;
	color: #ffe200
}

.testimonial-blk-person__name {
	font-size: .87rem;
	font-weight: 600
}

.testimonial-blk-person__info {
	font-size: .87rem;
	opacity: .8
}

Footer CSS

Next, let’s add some CSS styles for our footer. We’re going to add some custom styles for our footer logo as well as unordered list links including the four column contact cards.

footer {
	padding: 35px 0;
	border-top: 1px solid #efeef2;
}

footer .navbar-brand {
	color: #380a7f;
	font-weight: bold;
	letter-spacing: 1px;
	font-size: 25px;
}

footer .navbar-brand:hover {
	color: #380a7f;
}

footer .left ul {
	list-style: none;
	margin-bottom: 0;
}

footer .left ul li {
	display: inline-block;
	padding-right: 8px;
}

footer .left ul li a {
	color: #212529;
}

footer .right {
	text-align: right;
}

#contact a {
	text-decoration: none;
	color: #868080;
}

#contact .card {
	padding: 40px 20px;
	text-align: center;
}

#contact .card:hover {
	box-shadow: 0px 0px 30px 0px rgb(0 0 0 / 10%);
	transform: translateY(-2px);
	transition: all .2s;
}

#contact .card p {
	margin-bottom: 0;
}

#contact .card .fas,
#contact .card .fab {
	font-size: 40px;
	color: #6851ff;
	margin-bottom: 15px;
}

Responsive CSS

Lastly, it’s time to add some responsive CSS to our knowledge base theme. We will start with mobile devices first moving towards tablets and large screens. We will customize the sections and components that need some adjustment on different viewports such as the spacing, font-size, alignment and width.

@media (max-width: 576px) {
	h1.text-heading {
		margin-top: -120px;
		font-size: 35px;
	}
	.header-content-container {
		padding-top: 30px;
	}
	.svg-header-container {
		height: 50vh;
	}
	.svg-header-container img {
		width: 70%;
		height: 70%;
	}
	.bg-violet {
		height: 90vh;
	}
	.sm-height {
		height: 40px;
	}
	.search-container {
		margin-right: 0%;
	}
	h2.text-heading {
		font-size: 30px;
	}
	.stat-item h6 {
		font-size: 40px;
	}
	.footer-logo {
		display: none;
	}
}

@media (max-width: 768px) {
	#categories .row .cat-card:first-child,
	#categories .row .cat-card:nth-child(2) {
		border-right: none;
	}
	#categories .row .cat-card {
		margin: 0;
	}
	#faq .card.sticky-element {
		margin-bottom: 40px;
	}
	.svg-header-container img {
		height: 65%;
	}
	.header-content-heading {
		font-size: 34px;
	}
	.header-content-text {
		font-size: 15px;
	}
	.search-container {
		border-radius: 35px;
		padding: 0px;
		padding-left: 15px;
		margin-top: 24px;
		margin-right: 0%;
	}
	.form-control {
		font-size: 0.7rem !important;
	}
	.guide-container {
		max-width: 80% !important;
	}
	footer .left ul li {
		display: block;
		padding-bottom: 8px;
	}
	footer {
		text-align: center;
	}
	footer .right {
		text-align: center;
	}
	footer .navbar-brand {
		display: none;
	}
}

@media (max-width: 992px) {
	nav#navbar {
		background: #ffffff !important;
	}
	#navbar .navbar-brand {
		color: #380a7f;
	}
	#navbar .nav-link {
		color: #000000;
	}
	nav {
		padding-top: 1rem !important;
		padding-bottom: 1rem !important;
	}
	.nav-bg {
		background-color: blue !important;
	}
	img.nav-logo {
		height: 60px;
		width: auto;
	}
	nav .nav-link {
		padding: 20px 1px;
	}
	.nav-item {
		display: flex;
		justify-content: center;
	}
	.navbar-text {
		display: flex;
		justify-content: center;
	}
	.nav-item {
		padding-left: 0px
	}
	.svg-header-container img {
		height: 70%;
	}
	.header-content-heading {
		padding-top: 10px;
		font-size: 33px;
	}
	h1.text-heading {
		margin-top: -160px;
		font-size: 45px;
	}
	.company-img {
		height: 50px;
	}
	.guide-container {
		max-width: 100% !important;
	}
	.stat-item h6 {
		font-size: 60px;
	}
	#contact .card {
		margin-bottom: 20px;
	}
	.section {
		padding: 50px 0px;
	}
}

@media (max-width: 1199px) {
	#about {
		margin: 0;
	}
	.svg-header-container img {
		height: 90%
	}
	.header-content-heading {
		font-size: 40px;
	}
	.section {
		padding: 80px 0px;
	}
}

After putting all custom CSS styles in place, our Bootstrap 5 knowledge base theme will look almost complete.

Adding some JavaScript for navbar scroll

Next, let’s add some JavaScript code inside our script.js file to turn our navbar’s background color as well as navbar’s link color from solid color to transparent. Consider the following code.

window.onscroll = function () {
	scrollTransformBgNav()
};

const scrollTransformBgNav = () =&gt; {

	const x = window.matchMedia(&quot;(min-width: 992px)&quot;)

	const check = false;

	if (x.matches) {
		if (document.body.scrollTop &gt; 10 || document.documentElement.scrollTop &gt; 10) {
			document.getElementById(&quot;navbar&quot;).style.background = &quot;#ffffff&quot;;
			document.getElementById(&quot;navbar&quot;).style.boxShadow = &quot;0px 0px 20px 0px rgb(0 0 0 / 20%)&quot;;
			document.getElementById(&quot;navbar-brand&quot;).style.color = &quot;#380a7f&quot;;
			document.getElementsByClassName(&quot;nav-link&quot;)[0].style.color = &quot;#000&quot;;

			for (i = 0; i &lt; 5; i++) {
				document.getElementsByClassName(&quot;nav-link&quot;)[i].style.color = &quot;#000&quot;;
			}
		} else {
			document.getElementById(&quot;navbar&quot;).style.background = &quot;transparent&quot;;
			document.getElementById(&quot;navbar&quot;).style.boxShadow = &quot;none&quot;;
			document.getElementById(&quot;navbar-brand&quot;).style.color = &quot;#ffffff&quot;;

			for (i = 0; i &lt; 5; i++) {
				document.getElementsByClassName(&quot;nav-link&quot;)[i].style.color = &quot;#ffffff&quot;;
			}
		}
	}
}

The first set of code will simply call the function scrollTransformBgNav upon window.onscroll. The onscroll event occurs when a specific scrollbar is being scrolled.

Next, inside our scrollTransformBgNav function, we place the window.matchMedia(“(min-width: 992px)”) method to variable x to return a new MediaQueryList object that can then be used to determine if the document matches the media query string which is min-width: 992px as well as monitor the window document to detect when it matches that media query. We also created a check variable that is equal to false state by default.

Next, we cross check the variable x via if statement if it matches the specific property inside the brackets of the if statement. Notice that we’re calling body.scrollTop several times. The scrollTop property sets or returns the number of pixels our navbar content is scrolled vertically. If it’s greater than 10, then using getElementById method, we selected our navbar and added a few styles to it such as background, boxShadow etc. We also selected navbar links  elements via getElementByClassName method to add some CSS styles on scroll and off scroll.

If the document doesn’t match the media query string on our criteria on the first if statement, we’re going to add some styles with transparent navbar background and remove some additional CSS styles such as box shadow as well change the color of the logo accordingly.

Now our project is complete. You can now try to scroll and observe the navbar background transformation and other animation on our knowledge base bootstrap theme created.

You can check the demo here.

Wrapping Up

With Bootstrap 5, it’s easy to build and design modern, responsive, and dynamic interfaces for professional design web pages and custom pages.

In today’s tutorial, we created a modern style of knowledge base theme that you can use and customize to any of your products and services. Having this kind of page on your website, users no longer need to be patient to flip through papers and manuals in order to find information about your product or services. This will simply provide immediate answers to questions in an organized and manageable way.

Sam Norton

Sam is an expert Full Stack Developer who loves making digital solutions that are meaningful and new. Sam is an expert in web design and development. He uses his knowledge of HTML/CSS, JavaScript, jQuery, Ruby, Ruby on Rails, WordPress, Node.js, React, Express.js, Gatsby.js, GraphQL, and Strapi.js to make custom websites that reflect clients' unique brands and serve their business niches. Committed to staying ahead of the curve, Sam harnesses the power of the latest technologies, CMS, and platforms to build cutting-edge websites that outperform competitors.

Posts by Sam Norton
🍪

We use cookies to ensure that we give you the best experience on our website. Privacy Statement.

  • I disagree
  • I agree