Skip to main content

Header

The Header tells citizens that they are on a website owned by Bristol City Council and provides a way to return to the main Bristol City Council homepage.

The HTML code snippet below requires the Bristol City Council logo file, which you can download from this link.

Make sure to save the logo file in the root directory of your project before using the HTML snippet, as the image path in the source attribute of the image element assumes its presence there.

Standard


<header role="banner" class="header">
<div class="container-fluid g-0 bg-black">
<div class="container">
<div class="no-nav is-d-flex is-align-start is-align-md-center has-px-4">
<a class="brand" href="https://bristol.gov.uk"
aria-label="Bristol City Council home page - bristol.gov.uk Information for residents about Bristol City Council services including council tax, bins and recycling, schools, leisure, streets and parking.">
<div role="img" class="brand-img" aria-label="Bristol City Council">
<img
src="/BCC_logo_color_negative.svg"
width="80px"
alt="Bristol City Council - colour logo"
title="Bristol City Council - colour logo"
/>
</div>
<h2 class="brand-text">bristol.gov.uk</h2>
</a>
</div>
</div>
</header>

When to use

Use the Bristol City Council Header to demonstrate that a service, application or tool is owned by bristol.gov.uk. Use the Header to provide a link back to the Bristol City Council main website home page, and a skip link so that a user can bypass header navigation and get directly to content.

How it works

The Header associates the service or application with the Bristol City Council brand and bristol.gov.uk main site. The Header logo links back to the bristol.gov.uk home page. A Header title link (for example; bristol.gov.uk) also links back to the Bristol City Council home page.

Use account sign in and create account links when a user needs to be able to sign in from multiple pages within an application or journey only.

For example: The application has pages that you can complete in either a signed in or signed out state

Refer to Styles > Colours to understand the different link states available for header links.


<header role="banner" class="header">
<div class="container-fluid g-0 bg-black">
<div class="container">
<div class="no-nav is-d-flex is-align-start is-align-md-center is-justify-between has-px-4">
<a class="brand" href="https://bristol.gov.uk"
aria-label="Bristol City Council home page - bristol.gov.uk Information for residents about Bristol City Council services including council tax, bins and recycling, schools, leisure, streets and parking.">
<div role="img" class="brand-img" aria-label="Bristol City Council">
<img
src="/BCC_logo_color_negative.svg"
width="80px"
alt="Bristol City Council - colour logo"
title="Bristol City Council - colour logo"
/>
</div>
<h2 class="brand-text">bristol.gov.uk</h2>
</a>
<ul class="list-unstyled sign-in-account has-mt-3 has-m-lg-0">
<li class="is-d-lg-flex "><a class="nav-link" href="#" rel="nofollow">Sign in</a></li>
<li class="is-d-lg-flex "><a class="nav-link" href="#" rel="nofollow">Create an account</a></li>
</ul>
</div>
</div>
</div>
</header>

Header (For use on main website only)

Use the navigation menu bar under the header to include basic navigation links to other important areas of the website. The navigation menu bar Should be used for the main website and sub-sites only unless there is a strong argument to implement elsewhere. Only use the search bar and account link for the main website.


<header role="banner" class="header has-search-form">
<div class="container-fluid g-0 bg-black">
<div class="container">
<div class="has-nav is-d-flex is-justify-between is-align-start is-align-md-center has-px-4">
<ul class="list-unstyled nav-account is-d-flex is-d-md-none">
<li class="is-d-lg-flex is-align-center">
<a class="nav-link has-pt-3 has-px-4 has-p-lg-0" href="#" rel="nofollow">
<i class="bcc-font_user is-d-block is-d-sm-none"></i>
<span class="is-d-none is-d-sm-block">Sign in</span>
</a>
<span class="screen-reader-only">Your account</span>
</li>
</ul>
<a class="brand" href="https://bristol.gov.uk"
aria-label="Bristol City Council home page - bristol.gov.uk Information for residents about Bristol City Council services including council tax, bins and recycling, schools, leisure, streets and parking.">
<div role="img" class="brand-img" aria-label="Bristol City Council">
<img
src="/BCC_logo_color_negative.svg"
width="80px"
alt="Bristol City Council - colour logo"
title="Bristol City Council - colour logo"
/>
</div>
<h2 class="brand-text">bristol.gov.uk</h2>
</a>
<form action="" class="form search-ba-block">
<div class="field">
<div class="bcc-form-search">
<label class="screen-reader-only" for="site-search">Search</label><input type="search"
aria-describedby="description-error" id="site-search" class="field__input"
aria-label="Search" placeholder="Search" name="site-search" value="">
<button class="button secondary bg-brand is-search icon-left" type="submit">Search
<i class="bcc-font_search"></i>
</button>
</div>
</div>
</form>
</div>
</div>

<nav id="main-navigation" class="navigation">
<div class="container has-px-0 has-px-md-4">
<div class="nav-wrap" aria-label="main navigation">
<ul class="nav-items list-unstyled">
<li class="is-d-lg-flex">
<a class="nav-link " href="#">For residents</a>
</li>
<li class="is-d-lg-flex">
<a class="nav-link " href="#">For business</a>
</li>
<li class="is-d-lg-flex">
<a class="nav-link " href="#">Council and Mayor</a>
</li>
</ul>
<ul class="list-unstyled nav-account is-d-none is-d-md-flex">
<li class="is-d-lg-flex is-align-center">
<a class="nav-link has-pt-3 has-px-4 has-p-lg-0" href="#" rel="nofollow">Your account</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
</header>

<header role="banner" class="header">
<div class="container-fluid nav-container g-0 bg-black">
<div class="container">
<div class="has-nav is-d-flex is-justify-between is-align-start is-align-md-center has-px-4">
<button class="burger nav-cta" aria-expanded="false" aria-controls="main-navigation"
aria-label="open navigation menu" role="button">
<span class="burger-icon" aria-hidden="true">
<span></span>
</span>
<span class="screen-reader-only">Menu</span>
</button>
<a class="brand" href="https://bristol.gov.uk" aria-label="Bristol City Council home page - bristol.gov.uk Information for residents about Bristol City Council services including council tax, bins and recycling, schools, leisure, streets and parking.">
<div role="img" class="brand-img" aria-label="Bristol City Council">
<img
src="/BCC_logo_color_negative.svg"
width="80px"
alt="Bristol City Council - colour logo"
title="Bristol City Council - colour logo"
/>
</div>
<h2 class="brand-text">bristol.gov.uk</h2>
</a>
</div>
</div>
<nav id="main-navigation" class="sliding-nav">
<div class="container has-px-0 has-px-md-4">
<div class="nav-wrap" aria-label="main navigation">
<ul class="nav-items list-unstyled">
<li class="is-d-lg-flex">
<a class="nav-link " href="#">For residents</a>
</li>
<li class="is-d-lg-flex">
<a class="nav-link" href="#">For business</a>
</li>
<li class="is-d-lg-flex">
<a class="nav-link" href="#">Council and Mayor</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</header>

State: Header with dropdown

When to use

When you have multiple high-level pages that need to be accessed from the header navigation with lower level page also easily accessible, apply the header with drop down state. The user should be able to hover over the top level navigation title and see what other pages are available to navigate to.

Use this feature to signpost the user to lower level pages when there are multiple pages related to the high level pages. Try to avoid too many top level navigation links, choosing instead to focus on important pages or high visit pages.


<li class="has-nav-panel is-d-lg-flex">
<button
role="button"
aria-expanded="false"
class="nav-panel-cta has-pb-3 has-pt-3 has-px-4 has-p-lg-0">
<span class="has-mr-2">Dropdown</span>
</button>
<div class="nav-panel">
<div class="row no-gutters">
<div class="col-md-12">
<p class="is-h5 has-mb-3 has-text-left has-pl-lg-0">Dropdown</p>
<ul class="list-unstyled has-pl-3 has-pl-lg-0">
<li><a href="_#">Lorem ipsum</a></li>
<li><a href="_#">Dropdown link 2</a></li>
<li><a href="_#">Dropdown link 3</a></li>
</ul>
</div>
</div>
</div>
</li>

When to use

Use when the page requires both a dropdown menu and search input.


<header role="banner" class="header has-search-form">
<div class="container-fluid g-0 bg-black">
<div class="container">
<div class="has-nav is-d-flex is-justify-between is-align-start is-align-md-center has-px-4">
<ul class="list-unstyled nav-account is-d-flex is-d-md-none">
<li class="is-d-lg-flex is-align-center">
<a class="nav-link has-pt-3 has-px-4 has-p-lg-0" href="#" rel="nofollow">
<i class="bcc-font_user is-d-block is-d-sm-none"></i>
<span class="is-d-none is-d-sm-block">Sign in</span>
</a>
<span class="screen-reader-only">Your account</span>
</li>
</ul>
<a class="brand" href="https://bristol.gov.uk"
aria-label="Bristol City Council home page - bristol.gov.uk Information for residents about Bristol City Council services including council tax, bins and recycling, schools, leisure, streets and parking.">
<div role="img" class="brand-img" aria-label="Bristol City Council">
<img
src="/BCC_logo_color_negative.svg"
width="80px"
alt="Bristol City Council - colour logo"
title="Bristol City Council - colour logo"
/>
</div>
<h2 class="brand-text">bristol.gov.uk</h2>
</a>
<form action="" class="form search-ba-block">
<div class="field">
<div class="bcc-form-search">
<label class="screen-reader-only" for="site-search">Search</label><input type="search"
aria-describedby="description-error" id="site-search" class="field__input"
aria-label="Search" placeholder="Search" name="site-search" value="">
<button class="button secondary bg-brand is-search icon-left" type="submit">Search
<i class="bcc-font_search"></i>
</button>
</div>
</div>
</form>
</div>
</div>

<nav id="main-navigation" class="navigation">
<div class="container has-px-0 has-px-md-4">
<div class="nav-wrap" aria-label="main navigation">
<ul class="nav-items list-unstyled">
<li class="is-d-lg-flex">
<a class="nav-link " href="#">For residents</a>
</li>
<li class="is-d-lg-flex">
<a class="nav-link " href="#">For business</a>
</li>
<li class="is-d-lg-flex">
<a class="nav-link " href="#">Council and Mayor</a>
</li>
<li class="has-nav-panel is-d-lg-flex">
<button
role="button"
aria-expanded="false"
class="nav-panel-cta has-pb-3 has-pt-3 has-px-4 has-p-lg-0">
<span class="has-mr-2">Dropdown</span>
</button>
<div class="nav-panel">
<div class="row no-gutters">
<div class="col-md-12">
<p class="is-h5 has-mb-3 has-text-left has-pl-lg-0">Dropdown</p>
<ul class="list-unstyled has-pl-3 has-pl-lg-0">
<li><a href="_#">Lorem ipsum</a></li>
<li><a href="_#">Dropdown link 2</a></li>
<li><a href="_#">Dropdown link 3</a></li>
</ul>
</div>
</div>
</div>
</li>
</ul>
<ul class="list-unstyled nav-account is-d-none is-d-md-flex">
<li class="is-d-lg-flex is-align-center">
<a class="nav-link has-pt-3 has-px-4 has-p-lg-0" href="#" rel="nofollow">Your account</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
</header>

Responsive sliding navigation menu height

Use this .js snippet to adjust the height of the sliding navigation menu dependent on the height of the header.

const header = document.querySelector(".header");
const nav = header.querySelector(".sliding-nav");

if(nav) {
nav.style.top = `${header.offsetHeight}px`;
}