Edit
Contact us
Salocin Group Leaders in data and AI-enabled connected customer experiences
Edit Engineers of connected customer experiences
Join the Dots Independent, data-led media thinking for sustainable growth
Wood for Trees Optimisers of future fundraising performance
  • Home
  • Our services
    • Cloud solutions
    • Data science
    • Modern Data Platform
    • Privacy and AI compliance
  • Our partners
    • Microsoft
    • Apteco
    • Salesforce
  • Our insights
    • Blog
    • Case studies
    • Reports
    • Webinars
    • Whitepapers
  • About Salocin Group
    • Careers
  • Contact Salocin Group
  • Home
  • Who we are
    • B Corp
    • Careers
  • Our work
  • What we do
    • Intelligent data
    • Marketing technology
    • Transformational CRM
    • Our technology partners
    • Privacy review
  • Our insights
    • Blog
    • Case studies
    • Reports
    • Webinars
    • Whitepapers
  • Contact Edit
  • Home
  • Broadcast media
  • Digital media
  • Print
    • Direct mail
  • Data
    • Our work with Herdify
    • EPiC
  • Media agency
  • Our insights
    • Blog
    • Case studies
    • Reports
    • Webinars
    • Whitepapers
  • About Join the Dots
    • Careers
  • Contact Join the Dots
  • Home
  • Services
    • Actionable insight
    • Data discovery
    • Data engineering
    • Data hygiene
    • Privacy review
  • Products
    • InsightHub
    • Apteco
    • Microsoft
    • Data management
    • Consent and preference management
  • Our insights
    • Blog
    • Case studies
    • Reports
    • Webinars
    • Whitepapers
  • About Wood for Trees
    • Operating principles
    • Careers
  • Contact Wood for Trees
Blog

UI Frameworks – Bootstrap

By Edit | 15 Sep 2015

We published this a long time ago…

Some of the content in this post might be out of date, and some images and links may no longer work.

Discover who we are and how we may be able to help you today:

Learn more

In this article, I’ll be explain what Bootstrap is and how you can use it to quickly help you produce a responsive website.

About Bootstrap

To quote the Bootstrap website:

“Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.

Bootstrap makes front-end web development faster and easier. It’s made for folks of all skill levels, devices of all shapes, and projects of all sizes.”

Setting up Bootstrap

Setting up Bootstrap is relatively simple; you can either download it from GitHub, or you can download from Bower via the command line. Bootstrap comes in two variants – one for SASS and one for LESS. Bootstrap also comes with reusable JS components such as a drop-down menu, modals and tool tips. To do this, you must include the Bootstrap JS files.

Using Bootstrap

To use Bootstrap in your website, include the compiled bootstrap.css file and the compiled JS file; this will now allow you to access the HTML mark-up and JS components, allowing you to build a responsive layout using Bootstrap.

Building the responsive interface

Building a responsive interface using Bootstrap is relatively straightforward. By default, the grid is 12 columns; with 15 pixels either side. The gutter is, by default, set to 30 px (this is divided by half, so it gives you 15 px of padding either side of a column). All this can, however, be customised using the Customise page right on the Bootstrap page.

The main thing to bear in mind with regard to responsive interfaces is that Bootstrap adopts four breakpoints. These are:

  • Small – anything from tablet below 768 px
  • Tablet  – anything above 768 px and below 992 px
  • Small Desktop – anything about 992 px and below 1200 px
  • Large Desktop – anything above 1200 px

Bootstrap is mobile-first – by default, your stylesheet is set to mobile (so there will be no media query).

The Bootstrap grid

So, as explained above, Bootstrap comes up with four breakpoints. As we have already added the bootstrap.css to our website, this gives us access to the grid markup which we use to build a responsive interface.

Let’s look at a code example:

<div class="col-xs-12 col-sm-6 col-md-3">
<p>Hello</p>
</div>

As you can see, there are four classes in this div:

  • col-xs-xx is used for small (mobile)
  • col-sm-xx is used for tablet
  • col-md-xx is used for small desktop
  • col-lg-xx is used for large desktop

In this example, if you viewed this in your browser, this would be 12 columns on Mobile (100% width), six columns on Tablet (50% width), four columns on Small Desktop (33% width) and two columns on Large Desktop (16% width). Most of the time, Small and Large Desktop tend to be the same. If this is the case, you wouldn’t need to mention col-lg-2, as Bootstrap uses minimum width media queries.

Using these grid frameworks can help a UI developer to quickly build a responsive interface. However, it can be cumbersome in terms of HTML mark-up, but there is another way to declare columns using the CSS method.

CSS Method

Using the CSS method allows us to take away specifying columns in the HTML. Instead, Bootstrap comes with Mixins, which can be added to your SASS or LESS file, so we can now can change the above example to this in the HTML:

<div class="my-column">Hello</div>

In your LESS file, you can attach the columns like this:

.my-column {
.make-xs-column(12);
.make-sm-column(6);
.make-md-column(4);
.make-lg-column(2);
}

If you are using SASS, it looks like this:

.my-column {
@include make-xs-column(12);
@include make-sm-column(6);
@include make-md-column(4);
@include make-lg-column(2);
}

By using the CSS method, it decouples the presentation of the website from the HTML mark-up, allowing you to effortlessly alter your responsive layout to your needs.

Bootstrap disadvantages

As with all frameworks, there are some disadvantages. Whilst it’s quick and comes with a whole hosts of mixins allowing you to build a responsive website quickly, it also comes with a lot of bloat, so it’s important to use the customiser to only download the essential components you need for your website.

Bootstrap only breaks to four media breakpoints, meaning that if someone resizes the browser, it snaps to these four breakpoints rather than the interface adapting to the width of the browser.

The current trend for responsive web design is to create breakpoints as soon as the content breaks. If you need your website to do this, it’s better to use a grid framework such as Susy or Breakpoint to define your own media query breakpoints; this is now our preferred method of responsive web design.

If you’d like to know more, take a look at “Breaking Away from Bootstrap” and, from a design perspective, “The Challenges of creating a fluid website design”. Bootstrap, however remains a popular choice and the next version of Bootstrap 4 should continue its success over the next few years.

Conclusion

Bootstrap allows an UI developer to quickly build a responsive web interface using their grid mark-up system, which can either be added in HTML or as a mixin in a SASS or LESS file. This will work well on most mobile and tablet screens, as well as on responsive devices. Bootstrap also allows you to add JavaScript components such as pre-built drop-down modals and tooltips effortlessly without requiring you to add your own script. There are disadvantages just like with any other major framework, but if you are getting into responsive, then this is the ideal framework to use.

We published this a long time ago…

Some of the content in this post might be out of date, and some images and links may no longer work.

Discover who we are and how we may be able to help you today:

Learn more

Share this

  • Email
  • WhatsApp
  • LinkedIn
  • Facebook
  • X (Twitter)

More insights

AI isn’t going to take your job (unless you really want it to) 
Blog

AI isn’t going to take your job (unless you really want it to) 

By Edit | 18 Jun 2024
Customer relationship marketing: How generative AI is revolutionising engagement  
Blog

Customer relationship marketing: How generative AI is revolutionising engagement  

By Edit | 4 Apr 2024
Personalisation as a process
Blog

Personalisation as a process

By Edit | 8 Mar 2024
  • Privacy policy
  • Cookie policy
  • Ts&Cs
  • Report a concern

© 2025 Edit, part of Salocin Group Ltd. All rights reserved. Company no.: 0362​4881. VAT no.: 4208​34911.

Salocin Group Certified B Corporation | Cyber Essentials Certified | British Assessment Bureau, ISO 27001 Information Security Management
Salocin Group
Your cookie preferences

We use cookies to ensure this website functions properly, to analyse website traffic and for marketing purposes.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
View preferences
{title} {title} {title}