Skip to main content
Open Innovations is winding down and will no longer be commencing new work from May 2026.

HTML/CSS styling

Below are examples of how to create the following styles: ODI colour blocks, a single colour block, image grid, image in a blog post, tables, quote blocks, styled list of files, text on an image, YouTube (non-embed), carousel, a button.

ODI colour blocks

Across the site we use grids of coloured blocks. In a full-width page these will appear in a 3 column layout. Within a <div id="left"></div> block they will be in a 2 column layout. Either way, they are responsive so the number of columns adapts to the container/page width.

A single colour block

Say we want to create a coloured block of text, we apply the appropriate colour code and add the class padded to make sure there is some appropriate padding.

Some example text in a coloured block

Image grid

If you have a bunch of images to show, you can adapt the grid style above.

Image in a blog post

When you include an image in a blog post, it is best to mark it up semantically with a caption. We make use of HTML <figure> and <figcaption> to do this.

All concessionary travel in West Yorkshire, from 2nd January to 26th March 2017, by time of day.
Credit: ODI Leeds (visual); WYCA (data)

Tables

Create a standard ODI table.

Column 1Column 2Column 3
ABC
XYZ

Quote blocks

Here is a quote
Stuart Lowe

A styled file list

Text on an image

There are times when you might want to place text on top of a complicated background which will make it hard to read. We have two styles strip-white and strip-black depending on which you'd prefer.

Some text with a white background

Some text with a black background

A button

There are times when you want a feature that is a button. HTML gives us a <button> element for that! There may be times when you have a link that wants to be a button. For that just add the class button to it.

Link styled as a button Link styled as a colourful button

YouTube non-embed

Adding a YouTube video as an embed is easy. However, that potentially means YouTube sets cookies when people visit our pages. So, we have an alternative that doesn't actually embed the video but links to the embed version. Make sure to add ?autoplay=true to the embed link so that the video plays when people click the link.

If you need to insert a single carousel on a page we use tiny slider with our own styling. Make sure to include the CSS and Javascript in the top of the page.

  • Item 1

    Some text

  • Item 2

    More text

  • Item 3

    Even more text.