How to Use Canvas HTML Template Header Types: A Complete Guide
Your header is the first thing every visitor sees — and with the Canvas HTML Template, you have more header configurations at your fingertips than most developers ever use, which means most sites built on Canvas leave serious design and conversion potential on the table.
- Canvas ships with multiple distinct header types — sticky, transparent, side, and more — each suited to a specific layout or UX goal.
- Switching header types requires only a class change on the
<header>element, keeping customisation clean and non-destructive. - Transparent and overlay headers work best paired with full-width hero sections, while sticky headers improve navigation on content-heavy pages.
- Using Canvas Builder you can preview and generate header configurations visually before writing a single line of code.
Why Header Type Matters More Than You Think
In web design, the header does more than house your logo and navigation. It sets the visual tone, communicates brand authority, and directly influences how quickly visitors find what they are looking for. A mismatched header — say, a heavy opaque bar sitting on top of a cinematic full-screen video — breaks the flow before a user has read a single word. The Canvas template recognises this by offering a purpose-built system of header types rather than a single one-size-fits-all bar.
Understanding which header type to reach for — and how to implement it correctly — is one of the highest-leverage skills in any Canvas template tutorial. The decisions you make here cascade into spacing, hero layout, scroll behaviour, and mobile responsiveness.
Overview of Canvas Header Types
Canvas organises its headers into several core categories. Each is activated by adding or swapping a class on the <header> element. Here is a quick reference before we go deeper:
- Default (Static) — a standard opaque header that sits in normal document flow.
- Sticky Header — remains fixed at the top of the viewport as the user scrolls.
- Transparent / Overlay Header — sits on top of the hero section with a transparent background that transitions to solid on scroll.
- Dark Header — a pre-styled dark variant, useful when your hero imagery is light-toned.
- Side / Vertical Header — the navigation collapses into a left-side panel, freeing up the full vertical viewport for content.
- Floating / Bordered Header — detached from the viewport edges, giving a card-like floating appearance popular in 2025 SaaS designs.
Each type targets a different browsing context. Choosing correctly means fewer overrides and cleaner CSS down the line.
Implementing Sticky and Transparent Headers
The two most requested Canvas HTML template header configurations are sticky and transparent. Both are straightforward to activate but behave quite differently at the HTML level.
A sticky header keeps your navigation accessible at all times — critical on long-form pages like pricing tables, documentation, or blog posts. To enable it, add sticky-header to the header’s class list:
<header id="header" class="header-size-md sticky-header">
<div class="container">
<div class="header-row">
<div class="header-column">
<div class="header-logo">
<a href="index.html">
<img src="img/logo.png" class="logo" alt="Your Logo" />
</a>
</div>
</div>
<div class="header-column justify-content-end">
<nav class="primary-menu-nav">
<!-- Navigation items -->
</nav>
</div>
</div>
</div>
</header>
A transparent overlay header is the go-to choice when you want your hero image or video to bleed edge-to-edge behind the navigation. Canvas handles the scroll-triggered background transition automatically via its built-in JavaScript. Use the dark class modifier if your hero is light, so the nav text remains readable:
<header id="header" class="header-size-md transparent-header dark">
<div class="container">
<div class="header-row">
<div class="header-column">
<div class="header-logo">
<a href="index.html">
<!-- Light logo for dark backgrounds -->
<img src="img/logo-light.png" class="logo" alt="Your Logo" />
<!-- Dark logo revealed after scroll -->
<img src="img/logo.png" class="logo-dark" alt="Your Logo" />
</a>
</div>
</div>
</div>
</div>
</header>
Note the dual-logo pattern: Canvas swaps between .logo and .logo-dark automatically depending on scroll position, so you avoid a jarring flash of an unreadable dark logo against a dark hero image.
Side Headers and Floating Headers
The side header is a strong choice for portfolio sites, agencies, and product showcases where the vertical dimension is the primary storytelling axis. Instead of a horizontal bar, the navigation lives in a fixed left-side panel, letting the main content fill the entire horizontal viewport.
Activating it requires wrapping your layout correctly and adding the appropriate body class:
<!-- Add this class to the body element -->
<body class="side-header">
<header id="header" class="header-size-md">
<div class="header-wrap">
<div class="header-logo">
<a href="index.html">
<img src="img/logo.png" class="logo" alt="Your Logo" />
</a>
</div>
<nav class="primary-menu-nav">
<ul class="menu-container">
<li class="menu-item"><a href="#">Home</a></li>
<li class="menu-item"><a href="#">About</a></li>
<li class="menu-item"><a href="#">Work</a></li>
<li class="menu-item"><a href="#">Contact</a></li>
</ul>
</nav>
</div>
</header>
The floating header is a more recent design pattern that Canvas supports natively. It gives the navigation bar a detached appearance — typically with rounded corners, a subtle shadow, and a small gap from the top of the viewport. Apply the header-floating class and pair it with a CSS box shadow for maximum effect. You can fine-tune the shadow values with the CSS Box Shadow Generator to match your brand without trial-and-error.
Controlling Header Size and Spacing
Beyond type selection, Canvas gives you granular control over header height via size modifier classes. This affects padding, logo scale, and the vertical rhythm of the navigation elements.
header-size-sm— compact header, ideal for dashboards or apps where vertical space is at a premium.header-size-md— the default mid-size, appropriate for most marketing sites.header-size-lg— an expanded header that signals authority and gives breathing room to prominent logos.
Combining size and type classes gives you a fine-grained outcome without touching a single CSS rule. For example, a large sticky header with a dark transparent start state looks like this:
<header id="header" class="header-size-lg sticky-header transparent-header dark">
<!-- header content -->
</header>
When you need to convert header padding values from pixels to scalable units, the px to rem converter makes it trivial to keep your overrides consistent with your base font size.
Mobile Header Best Practices for Canvas
Every Canvas header type collapses to a mobile-friendly hamburger menu below the configured breakpoint. However, a few implementation choices affect how polished the result feels on small screens in 2025, when mobile traffic routinely exceeds 60% for most niches.
First, always define a mobile-specific logo if your primary logo is wide and text-heavy — it will overflow on sub-400px screens. Canvas supports a .logo-mobile class for exactly this purpose. Second, if you are using a transparent header, test scroll behaviour on iOS Safari specifically: momentum scrolling can briefly show the transparent state mid-scroll on some devices, making text unreadable. Setting a minimum scroll threshold via Canvas’s built-in data-sticky-offset attribute resolves this reliably.
Third, for side headers on mobile, ensure you set a touch-friendly tap target size for the navigation toggle. Canvas’s default is 44px — the minimum recommended by WCAG 2.1 — but custom CSS overrides sometimes reduce this unintentionally. Audit with your browser’s device toolbar before going live.
Frequently Asked Questions
Can I combine multiple Canvas header type classes on the same element?
Yes. Canvas is built to handle stacked header classes. Common combinations include sticky-header transparent-header dark or sticky-header header-size-lg. Avoid combining mutually exclusive types like side-header with sticky-header — these control fundamentally different layout models and will conflict.
How do I switch the header logo when the transparent header scrolls to solid?
Canvas handles this automatically when you provide both a .logo and a .logo-dark image inside the header logo wrapper. The template’s JavaScript monitors scroll position and toggles visibility between the two, so no custom scripting is needed.
Does the side header work on mobile devices?
The side header collapses into a standard top-bar with a hamburger toggle on mobile breakpoints. Canvas manages this transition automatically via its responsive CSS. You do not need a separate mobile header markup for side-header layouts.
What is the correct way to set a custom sticky offset so the header does not obscure anchor links?
Add a data-sticky-offset attribute to the header element with the pixel value of your header’s height. Canvas uses this value to adjust the scroll position when navigating to in-page anchors, preventing the header from covering the target section.
Can I use a full-width mega menu with the transparent header type?
Yes. The mega menu system in Canvas is independent of header type. You can attach a mega menu to any navigation item regardless of whether your header is transparent, sticky, floating, or side-aligned. Ensure your mega menu background is opaque if the header starts in transparent mode, otherwise the dropdown will also appear see-through over your hero content.
Getting your header configuration right is one of the fastest ways to lift the professional quality of any Canvas build — and you do not have to iterate blindly. Try Canvas Builder free to visually configure and export header setups, generate clean Bootstrap-compatible layouts with the Bootstrap Grid Calculator, and ship polished pages in a fraction of the time.