BS Theme "Company"
Create a Theme: "Company"
This article will demonstrate how to create a Bootstrap theme from scratch.
We’ll start with a simple HTML page and gradually add additional components until we have a fully functional, personalized, and responsive website.
The end result will look like this, and you are free to change, save, share, use, or do whatever you want with it.
-----example mukavu -----
HTML Start Page
We’ll begin with the following HTML page:
Example
Bootstrap Theme Simply Me
Who Am I?
I'm an adventurer
Add Bootstrap CDN and Put Elements in Container
Add the Bootstrap CDN and a link to jQuery, and place HTML components within a .jumbotron:
Example
Bootstrap Theme Simply Me
Who Am I?
I'm an adventurer
Result:
------Resul mukavu --------
Add Background Color and Center Text
1. Add a custom class (.bg-1) to the container to change the background color.
2. Use the .text-center class to center the text within the container:
Example
Company
We specialize in blablabla
Result:
------Resul mukavu --------
Add Form
Add a form with an input field and a button:
Example
Company
We specialize in blablabla
Result:
------Resul mukavu --------
Add Containers
Add two containers (.container-fluid), and give the second container a custom class (.bg-grey, which adds a gray background color):
Example
About Company Page
Lorem ipsum..
Lorem ipsum..
Our Values
MISSION: Our mission lorem ipsum..
VISION: Our vision Lorem ipsum..
Result:
------Resul mukavu --------
Add Padding
Let’s make the jumbotron and the containers seem better by adding some padding:
Example
Result:
------Resul mukavu --------
Add a Grid
1. Attach an icon (or the company’s logo) to each container.
2. Separate the icon and the “about text” by generating two columns (.col-sm-8 and .col-sm-4).
3. Use media queries to center the “logo column” on displays less than 768 pixels wide.
Example
About Company Page
Lorem ipsum..
Lorem ipsum..
Our Values
MISSION: Our mission lorem ipsum..
VISION: Our vision Lorem ipsum..
Result:
------Resul mukavu --------
Add Services Container
Create a new container with 2×3 columns of equal width (.col-sm-4):
Example
SERVICES
What we offer
POWER
Lorem ipsum dolor sit amet..
LOVE
Lorem ipsum dolor sit amet..
JOB DONE
Lorem ipsum dolor sit amet..
GREEN
Lorem ipsum dolor sit amet..
CERTIFIED
Lorem ipsum dolor sit amet..
HARD WORK
Lorem ipsum dolor sit amet..
Result:
------Resul mukavu --------
Styling Icons
Create a custom class (.logo-small) for each glyphicon in the “Services” container. Use CSS to style them:
Example
/* Add an orange color to all icons and set the font-size */
.logo-small {
color: #f4511e;
font-size: 50px;
}
.logo {
color: #f4511e;
font-size: 200px;
}
Result:
------Resul mukavu --------
Add Portfolio Container
Make a new full-width container, with three columns of identical width (.col-sm-4):
In each column, provide an image.
Then, use the .img-thumbnail class to transform the image into a thumbnail.
Normally, you would add the .img-thumbnail class to the <img> element. In this example, we’ve set a thumbnail container around the image, so we may also specify an image text.
Example
Portfolio
What we have created
Paris
Yes, we built Paris
New York
We built New York
San Francisco
Yes, San Fran is ours
Result:
------Resul mukavu --------
Styling Thumbnail Images
Use CSS to style the photos. In our example, we tried to make them look like cards by removing the border and setting each image to 100% width.
Example
.thumbnail {
padding: 0 0 15px 0;
border: none;
border-radius: 0;
}
.thumbnail img {
width: 100%;
height: 100%;
margin-bottom: 10px;
}
Result:
------Resul mukavu --------
Add a Carousel
Create a carousel:
Example
Result:
------Resul mukavu --------
Style The Carousel
Use CSS to style the carousel:
Example
.carousel-control.right, .carousel-control.left {
background-image: none;
color: #f4511e;
}
.carousel-indicators li {
border-color: #f4511e;
}
.carousel-indicators li.active {
background-color: #f4511e;
}
.item h4 {
font-size: 19px;
line-height: 1.375em;
font-weight: 400;
font-style: italic;
margin: 70px 0;
}
.item span {
font-style: normal;
}
Result:
------Resul mukavu --------
Add Pricing Container
Create a full-width container with three columns of identical width (.col-sm-4).
Add a panel to each column.
Example
Pricing
Choose a payment plan that works for you
Basic
20 Lorem
15 Ipsum
5 Dolor
2 Sit
Endless Amet
$19
per month
Pro
50 Lorem
25 Ipsum
10 Dolor
5 Sit
Endless Amet
$29
per month
Premium
100 Lorem
50 Ipsum
25 Dolor
10 Sit
Endless Amet
$49
per month
Result:
------Resul mukavu --------
Styling Panels
Use CSS to style the panels:
Example
.panel {
border: 1px solid #f4511e;
border-radius:0;
transition: box-shadow 0.5s;
}
.panel:hover {
box-shadow: 5px 0px 40px rgba(0,0,0, .2);
}
.panel-footer .btn:hover {
border: 1px solid #f4511e;
background-color: #fff !important;
color: #f4511e;
}
.panel-heading {
color: #fff !important;
background-color: #f4511e !important;
padding: 25px;
border-bottom: 1px solid transparent;
border-top-left-radius: 0px;
border-top-right-radius: 0px;
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}
.panel-footer {
background-color: #fff !important;
}
.panel-footer h3 {
font-size: 32px;
}
.panel-footer h4 {
color: #aaa;
font-size: 14px;
}
.panel-footer .btn {
margin: 15px 0;
background-color: #f4511e;
color: #fff;
}
Result:
------Resul mukavu --------
Add Contact Container
Create a new container with contact information.
Example
CONTACT
Contact us and we'll get back to you within 24 hours.
Chicago, US
+00 1515151515
myemail@something.com
Result:
------Resul mukavu --------
Add Map/Location Image
Add a location image or a map (see our Google Maps Tutorial for Google Maps):
Example
Result:
------Resul mukavu --------
Style The Carousel
Use CSS to style the carousel:
Example
.carousel-control.right, .carousel-control.left {
background-image: none;
color: #f4511e;
}
.carousel-indicators li {
border-color: #f4511e;
}
.carousel-indicators li.active {
background-color: #f4511e;
}
.item h4 {
font-size: 19px;
line-height: 1.375em;
font-weight: 400;
font-style: italic;
margin: 70px 0;
}
.item span {
font-style: normal;
}
Result:
------Resul mukavu --------
Style The Navbar
Use CSS to alter the navigation bar:
Example
.navbar {
margin-bottom: 0;
background-color: #f4511e;
z-index: 9999;
border: 0;
font-size: 12px !important;
line-height: 1.42857143 !important;
letter-spacing: 4px;
border-radius: 0;
}
.navbar li a, .navbar .navbar-brand {
color: #fff !important;
}
.navbar-nav li a:hover, .navbar-nav li.active a {
color: #f4511e !important;
background-color: #fff !important;
}
.navbar-default .navbar-toggle {
border-color: transparent;
color: #fff !important;
}
Result:
------Resul mukavu --------
Add Scrollspy
Add scrollspy to automatically refresh navbar links as you scroll:
Example
Add a Footer
Add a “Up Arrow” icon to the footer that, when clicked, takes the user to the top of the page:
Example
Result:
------Resul mukavu --------
Adding Smooth Scrolling
Add smooth scrolling using jQuery (when clicking on the links in the navbar):
Example
Final Touch
Personalize your theme by selecting a typeface that you prefer. We used “Montserrat” and “Lato” from Google Font Library.
Refer to the font in the <head> section.
<link href=”https://fonts.googleapis.com/css?family=Montserrat” rel=”stylesheet” type=”text/css”>
<link href=”https://fonts.googleapis.com/css?family=Lato” rel=”stylesheet” type=”text/css”>
Then you can utilize them in the page.
Example
body {
font: 400 15px Lato, sans-serif;
line-height: 1.8;
color: #818181;
}
.jumbotron {
font-family: Montserrat, sans-serif;
}
.navbar {
font-family: Montserrat, sans-serif;
}
We’ve also added some additional style to other elements:
Example
h2 {
font-size: 24px;
text-transform: uppercase;
color: #303030;
font-weight: 600;
margin-bottom: 30px;
}
h4 {
font-size: 19px;
line-height: 1.375em;
color: #303030;
font-weight: 400;
margin-bottom: 30px;
}
Slide In Elements
We’ve also built an animation effect that slides in elements as you scroll. If you want to use it, simply add the.slideanim class to the element you want to slide in, and then add the following CSS and jQuery code (feel free to change the length, opacity, where to start, when to slide in, etc.):
CSS Example
.slideanim {visibility:hidden;}
.slide {
/* The name of the animation */
animation-name: slide;
-webkit-animation-name: slide;
/* The duration of the animation */
animation-duration: 1s;
-webkit-animation-duration: 1s;
/* Make the element visible */
visibility: visible;
}
/* Go from 0% to 100% opacity (see-through) and specify the percentage from when to slide in the element along the Y-axis */
@keyframes slide {
0% {
opacity: 0;
transform: translateY(70%);
}
100% {
opacity: 1;
transform: translateY(0%);
}
}
@-webkit-keyframes slide {
0% {
opacity: 0;
-webkit-transform: translateY(70%);
}
100% {
opacity: 1;
-webkit-transform: translateY(0%);
}
}
jQuery Example
$(window).scroll(function() {
$(".slideanim").each(function(){
var pos = $(this).offset().top;
var winTop = $(window).scrollTop();
if (pos < winTop + 600) {
$(this).addClass("slide");
}
});
});
CodingAsk.com is designed for learning and practice. Examples may be made simpler to aid understanding. Tutorials, references, and examples are regularly checked for mistakes, but we cannot guarantee complete accuracy. By using CodingAsk.com, you agree to our terms of use, cookie, and privacy policy.
Copyright 2010-2024 by Refsnes Data. All Rights Reserved.