Introduction

Get started with Space, Responsive Website Template for building responsive, mobile-first sites, with Bootstrap and a template starter page.

Quick start

CSS

Copy-paste the Bootstrap, FontAwesome and then Space stylesheets <link> into your <head> before all other stylesheets to load our CSS.

            
              <!-- CSS Global Compulsory -->
              <link rel="stylesheet" href="../../assets/vendor/bootstrap/css/bootstrap.css">

              <!-- CSS Implementing Plugins -->
              <link rel="stylesheet" href="../../assets/vendor/font-awesome/css/fontawesome-all.min.css">

              <!-- CSS Space Template -->
              <link rel="stylesheet" href="../../assets/css/theme.css">
            
          

JS

Many of Bootstrap's (since Space runs on Bootstrap) components require the use of JavaScript to function. Specifically, they require jQuery, Popper.js, Bootstrap JavaScript and our own JavaScript plugins. Place the following <script>s near the end of your pages, right before the closing </body> tag, to enable them. jQuery must come first, then Popper.js, Bootstrap's JavaScript, and then our plugins.

Bootstrap and Space use jQuery's slim build, but the full version is also supported.

All Space plugins start with hs. prefix.

            
              <!-- JS Global Compulsory -->
              <script src="../../assets/vendor/jquery/dist/jquery.min.js"></script>
              <script src="../../assets/vendor/jquery-migrate/dist/jquery-migrate.min.js"></script>
              <script src="../../assets/vendor/popper.js/dist/umd/popper.min.js"></script>
              <script src="../../assets/vendor/bootstrap/bootstrap.min.js"></script>

              <!-- JS Space -->
              <script src="../../assets/js/hs.core.js"></script>
            
          

Starter template

Be sure to have your pages set up with the latest design and development standards. That means using an HTML5 doctype and including a viewport meta tag for proper responsive behaviors. Put it all together and your pages should look like this:

            
              <!doctype html>
              <html lang="en">
              <head>
                <!-- Title -->
                <title>Hello, world!</title>

                <!-- Favicon -->
                <link rel="shortcut icon" href="favicon.ico">

                <!-- Required meta tags -->
                <meta charset="utf-8">
                <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

                <!-- CSS Global Compulsory -->
                <link rel="stylesheet" href="../../assets/vendor/bootstrap/css/bootstrap.css">

                <!-- CSS Implementing Plugins -->
                <link rel="stylesheet" href="../../assets/vendor/font-awesome/css/fontawesome-all.min.css">

                <!-- CSS Space Template -->
                <link rel="stylesheet" href="../../assets/css/theme.css">
              </head>

              <body>
                <h1>Hello, world!</h1>

                <!-- JS Global Compulsory -->
                <script src="../../assets/vendor/jquery/dist/jquery.min.js"></script>
                <script src="../../assets/vendor/popper.js/dist/umd/popper.min.js"></script>
                <script src="../../assets/vendor/bootstrap/bootstrap.min.js"></script>

                <!-- JS Space -->
                <script src="../../assets/js/hs.core.js"></script>
              </body>
              </html>
            
          

That's all you need for overall page requirements. Visit the Bootstrap's Layout docs our official examples to start laying out your site's content and components.

Important globals

Space employs a handful of important global styles and settings that you'll need to be aware of when using it, all of which are almost exclusively geared towards the normalization of cross browser styles. Let's dive in.

HTML5 doctype

Space requires the use of the HTML5 doctype. Without it, you'll see some funky incomplete styling, but including it shouldn't cause any considerable hiccups.

            
              <!doctype html>
              <html lang="en">
                ...
              </html>
            
          

Responsive meta tag

Space is developed mobile first, a strategy in which we optimize code for mobile devices first and then scale up components as necessary using CSS media queries. To ensure proper rendering and touch zooming for all devices, add the responsive viewport meta tag to your <head>.

            
              <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
            
          

You can see an example of this in action in the starter template.