.. _step_10:
Step 10: A bit of styling
=========================
.. comments
In this step, we are going to do some first styling of our page.
.. contents:: Contents
:depth: 2
:local:
Skeleton CSS
------------
We are going to use a CSS framework. Since we want to keep our page rather simple and we are not going to use a lot of fancy CSS features, we are going to use Skeleton_. Skeleton is a very lightweight CSS library which comes with a responsive grid system, which we will look at later.
For now, let's just include the Skeleton_ CSS library in our HTML document.
.. code-block:: html
:caption: index.html - include skeleton
:linenos:
:lineno-start: 4
:emphasize-lines: 4-5
`` element with this class.
.. code-block:: html
:caption: index.html - center content
:linenos:
:lineno-start: 12
:emphasize-lines: 3-8
And we see that all the content is nicely centered, at least on larger screens. If the screen width is too narrow, the map is not centered yet, but we will fix that later on.
Grid layout
-----------
Skeleton is based on a grid layout where each row contains 12 columns.
This means that the markup for a row with two columns of equal width would look like this:
.. code-block:: html
:caption: markup to create columns with skeleton
We can use this in our details container to display the name of the feature on the left and the table with the data on the right.
First, we add the class ``row`` to the details container which will eventually hold the details.
.. code-block:: html
:caption: index.html - class row for details container
:linenos:
:lineno-start: 13
:emphasize-lines: 6
Next, we add the ``columns`` class in the Mustache template.
.. code-block:: html
:caption: index.html - name and table in columns
:linenos:
:lineno-start: 19
:emphasize-lines: 5-6