If you have questions regarding the header integration, or if you need a current documentation, please contact
Markus Meixner .
Top Navigation
The global top navigation is ImmobilienScout24's central navigation hub. It links to all of the most relevant product and content pages
and provides access to the user's account area.
The header configuration is centrally managed within the CMS ,
so if you wish to use the top navigation in your pages, you should include it by way of a CMS content snippet.
(For more information on how to do that, please refer to the Wiki or bribe your CMS team with shiny things.)
See the Change Log to find out what's changed from previous versions.
Complete Sample Markup
CSS and JS Dependencies
Brand Header
Navigation Frame
Navigation Levels
Tab Navigation
Active Tabs
Layer Alignment
Self-aligned Layers
Account Tab
Account Tab Structure
Log-in Status
JavaScript
Complete Sample Markup
Complete example of a top navigation
<!-- Header Bar -->
<header class="page-header" role="banner">
<div class="content-wrapper grid grid-flex grid-fill-rows">
<div class="page-header__content page-header__logo-container grid-item grid-align-center grid-item-fixed-width">
<a href="index.html" title="ImmobilienScout24" aria-label="ImmobilienScout24" class="page-header__logo">
<img src="../../img/logo/immobilienscout24.svg" alt="ImmobilienScout24"
onerror="this.src='../../img/logo/immobilienscout24.png';this.onerror=null;" />
</a>
</div>
<div class="page-header__content grid-item grid-align-center grid-item-fixed-width grid-justify-end order-two-down">
<a href="#overlaytrigger" class="topnavigation__overlay-trigger--account vertical-center-container">
<div class="topnavigation__sso-login__user-avatar">
<svg class="topnavigation__account--placeholder-svg" width="22px" height="24px" viewBox="0 0 22 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="Main-Mobile-Nav/left-logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-270.000000, -13.000000)" stroke-linecap="round" stroke-linejoin="round">
<g id="Main-Mobile-Nav" stroke="#969696">
<g id="User-Avatar-/-new1-/-off" transform="translate(269.000000, 13.000000)">
<g id="single-01" transform="translate(2.000000, 1.000000)">
<path d="M10,11 C7.239,11 5,8.761 5,6 L5,5 C5,2.239 7.239,0 10,0 C12.761,0 15,2.239 15,5 L15,6 C15,8.761 12.761,11 10,11 Z" id="Shape" stroke-width="2"></path>
<path d="M20,19.908 C20,18.108 18.803,16.525 17.066,16.052 C15.172,15.535 12.586,15 10,15 C7.414,15 4.828,15.535 2.934,16.052 C1.197,16.525 0,18.108 0,19.908 L0,22 L20,22 L20,19.908 Z" id="Shape" stroke-width="2"></path>
</g>
</g>
</g>
</g>
</svg>
</div>
<span class="topnavigation__notification topnavigation__notification--account-overlay-trigger topnavigation-last-search-notification">
1
</span>
</a>
<div class="topnavigation__overlay--account">
<ul class="topnavigation__level--1 topnavigation__hover-tabs topnavigation__hover-tabs--small-layers topnavigation__slide-in--show-level-2 topnavigation__sso-login sso-login sso-login--show-avatar">
<li>
<a class="topnavigation__level--1__label topnavigation__hover-tabs__label topnavigation__overlay--account__hide" href="#dummycredentials">
<div class="topnavigation__sso-login__user-avatar">
<svg class="topnavigation__account--placeholder-svg" width="22px" height="24px" viewBox="0 0 22 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="Main-Mobile-Nav/left-logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-270.000000, -13.000000)" stroke-linecap="round" stroke-linejoin="round">
<g id="Main-Mobile-Nav" stroke="#969696">
<g id="User-Avatar-/-new1-/-off" transform="translate(269.000000, 13.000000)">
<g id="single-01" transform="translate(2.000000, 1.000000)">
<path d="M10,11 C7.239,11 5,8.761 5,6 L5,5 C5,2.239 7.239,0 10,0 C12.761,0 15,2.239 15,5 L15,6 C15,8.761 12.761,11 10,11 Z" id="Shape" stroke-width="2"></path>
<path d="M20,19.908 C20,18.108 18.803,16.525 17.066,16.052 C15.172,15.535 12.586,15 10,15 C7.414,15 4.828,15.535 2.934,16.052 C1.197,16.525 0,18.108 0,19.908 L0,22 L20,22 L20,19.908 Z" id="Shape" stroke-width="2"></path>
</g>
</g>
</g>
</g>
</svg>
</div><!-- this comment is here to eat up the white space between two inline-block elements
--><span class="topnavigation__sso-login__label-text-wrapper">
<span class="topnavigation__sso-login__welcome-message font-ellipsis ">
<span class="sso-login__user-name ">
<span class="sso-login__user-name ">Anmelden</span>
</span>
</span>
<span class="topnavigation__notification topnavigation__notification--account-tab-label topnavigation-last-search-notification">1</span>
<span class="block topnavigation__chevronAppend--desktop ">Mein Konto</span>
</span>
<span class="desk-hide palm-hide topnavigation__notification topnavigation__notification--account-tab-label topnavigation-last-search-notification">1</span>
</a>
<div class="topnavigation__level--2 topnavigation__hover-layer topnavigation__hover-layer--right-aligned font-s">
<div class="topnavigation__hover-layer__navigation-wrapper">
<ul class="topnavigation__sso-login__link-list--logged-out list-spacing padding-bottom-none" data-cms-qa="is24-cms-loginbox-logged-out">
<li class="border-bottom padding-bottom-l align-center">
Persönliche Services nutzen und schneller ans Ziel kommen.
<script type="text/javascript">
document.write('<a href="https://www.sandbox-immobilienscout24.de/sso/login.go?source=meinkontodropdown-login&returnUrl=' + document.location.href + '"' +
' class="margin-vertical-s button-primary button-orange one-whole" id="link_loginLinkInternal">Jetzt anmelden</a>')
</script>
Neu hier?
<a href="#" class="sso-login-link link-underline">Jetzt registrieren</a>
</li>
</ul>
<ul class="topnavigation__sso-login__link-list list-spacing">
<li>
<a href="?uebersicht" class="topnavigation-overlay-touch-area">Übersicht</a>
</li>
<li>
<a href="?Merkzettel" class="topnavigation-overlay-touch-area">Merkzettel</a>
</li>
<li>
<a href="?Suchen" class="topnavigation-overlay-touch-area">Gespeicherte Suchen</a>
</li>
<li>
<a href="?Profil" class="topnavigation-overlay-touch-area">Persönliches Profil</a>
</li>
<li>
<a href="?Immobilienanzeigen" class="topnavigation-overlay-touch-area">Immobilienanzeigen</a>
</li>
<li>
<a href="?eigentuemer" class="topnavigation-overlay-touch-area">EigentümerPlus</a>
</li>
</ul>
<ul class="topnavigation__sso-login__link-list--logged-in list-spacing padding-top-none border-top" data-cms-qa="is24-cms-loginbox-logged-in">
<li class="padding-top-l align-center">
<a href="https://sso.sandbox-immobilienscout24.de/sso/logout" class="sso-login-link link-underline">Abmelden</a>
</li>
</ul>
</div>
</div>
</li>
</ul><!-- .topnavigation__sso-login -->
</div>
</div>
<div class="page-header__content grid-item grid-align-center grid-item-fixed-width grid-justify-end order-one-down">
<span class="top-navigation__anbieten-button-teaser">
<a href="//www.immobilienscout24.de/anbieten/" class="button button-lightblue top-navigation__anbieten-button align-middle">
Anzeige schalten
</a>
</span>
</div>
<!-- Navbar incl. header--->
<nav class="topnavigation grid-item topnavigation__notification--present" role="navigation">
<div class="topnavigation__menu" data-cms-qa="is24-cms-page-nav_level1">
<div class="topnavigation__scroll_navigation">
<div comment="NavigationsBar" class="topnavigation__headlines align-left">
<div class="topnavigation__headlines_inner">
<!--Insert unique ID-->
<label class="topnavigation-js-label" for="NavLayer0-Menu" id="NavLayer1-Menu-Layer">
<div class="topnavigation__chevronAppend topnavigation__chevronAppend--desktop font-semibold">
Suchen
</div>
</label>
<!--Insert unique ID-->
<label class="topnavigation-js-label" for="NavLayer1-Menu" id="NavLayer2-Menu-Layer">
<div class="topnavigation__chevronAppend topnavigation__chevronAppend--desktop font-semibold">
Anbieten
</div>
</label>
<!--Insert unique ID-->
<label class="topnavigation-js-label" for="NavLayer2-Menu" id="NavLayer3-Menu-Layer">
<div class="topnavigation__chevronAppend topnavigation__chevronAppend--desktop font-semibold">
Finanzieren
</div>
</label>
<!--Insert unique ID-->
<label class="topnavigation-js-label" for="NavLayer3-Menu" id="NavLayer4-Menu-Layer">
<div class="topnavigation__chevronAppend topnavigation__chevronAppend--desktop font-semibold">
Umziehen
</div>
</label>
</div>
<div class="topnavigation__headlines__bottomline lap-hide desk-hide absolute-content border-bottom one-whole"></div>
</div>
</div>
<!-- Generate Template | set unique ID -->
<div id="topnavigation__mobileclosebtn" class="topnavigation__closebtnmobile">
<label for="closeNavbar"><span id="topnavigation__mobileclosebtn_action" >
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="Main-Mobile-Nav/center-logo-close" stroke="none" stroke-width="1" fill="none"
fill-rule="evenodd" transform="translate(-20.000000, -19.000000)">
<g id="Main-Mobile-Nav" fill="#969696">
<g id="icn/menu" transform="translate(15.000000, 14.000000)">
<g id="ic_close_24px" transform="translate(5.000000, 5.000000)">
<polygon id="Shape" fill-rule="nonzero"
points="14 1.41 12.59 0 7 5.59 1.41 0 0 1.41 5.59 7 0 12.59 1.41 14 7 8.41 12.59 14 14 12.59 8.41 7"></polygon>
</g>
</g>
</g>
</g>
</svg>
</span></label></div>
<div class="topnavigation__desktopflyout">
</div>
</div>
</nav>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function () {
if (window.IS24 && IS24.core && IS24.core.extensions && IS24.core.extensions.topnavigation) {
IS24.core.extensions.topnavigation.init();
}
});
</script>
<!-- placeholder to fill the grid if no navigation is present -->
<div class="grid-item"></div>
</div>
</header>
CSS and JS Dependencies
The Top Navigation relies on the Core Framework
in an arbitrary version, as well as the additional top navigation CSS and JS included in this package.
Note: If you are using the central CMS header, you won't need to include the core-topnavigation
resources
as they are already delivered as part of the header snippet.
Top Navigation CSS and JS inclusion
<link rel="stylesheet" href="//www.static-immobilienscout24.de/fro/core-topnavigation/4.0.6/css/core-topnavigation.min.css" />
<script src="//www.static-immobilienscout24.de/fro/core-topnavigation/4.0.6/js/core-topnavigation.min.js"></script>
Brand Header
The white section of the top navigation, which includes the brand logo and claim, is a variation of the
Core Framework's standard white header.
The page-header__content
class handles the positioning of the individual content blocks.
You may float these elements to the right where necessary.
Top navigation brand header
(Note that image URLs will differ in production.)
<header class="page-header" role="banner">
<div class="content-wrapper">
<div class="page-header__content vertical-center-container float-left">
<a href="index.html" title="ImmobilienScout24" aria-label="ImmobilienScout24" class="page-header__logo vertical-center">
<img src="../../img/logo/immobilienscout24.svg" alt="ImmobilienScout24"
onerror="this.src='../../img/logo/immobilienscout24.png';this.onerror=null;" />
</a>
</div>
<div class="page-header__content vertical-center-container float-right">
<div class="vertical-center">
<!-- account tab goes here -->
</div>
</div>
</div>
</header>
Navigation Frame
The top navigation is wrapped in a topnavigation
block, which in turn contains a content-wrapper
element to get the navigation items aligned with the left and right margins of any other content sections.
Page structure for top navigation
<nav class="topnavigation">
<div class="content-wrapper"></div>
</nav>
Navigation Levels
Navigation items are grouped into three levels. These levels are displayed differently depending on the navigation state.
Since both the tab navigation (for desktop) and the overlay navigation (for mobile) are based on the same DOM elements, you won't need to maintain two independent navigations.
Tab Navigation
When the tab navigation is active, first-level navigation items are shown as tabs in the bottom navigation bar.
Second and third-level items are grouped under their respective tabs and will be shown when the user clicks or taps on a tab.
The tab navigation is composed of three main components:
The tab navigation list (topnavigation__hover-tabs
),
the individual list elements, each with a tab label (topnavigation__hover-tabs__label
),
and the tab layer (topnavigation__hover-layer
).
Top navigation tabs
(Other classes omitted for the sake of simplicity.)
<nav class="topnavigation">
<div class="content-wrapper">
<div class="topnavigation__overlay--menu">
<ul class="topnavigation__hover-tabs">
<li>
<a class="topnavigation__hover-tabs__label" href="#">Wohnen</a>
<div class="topnavigation__hover-layer">
<!-- Layer content -->
</div>
</li>
</ul>
</div>
</div>
</nav>
Active Tabs
Tabs can be highlighted with the active
class to give users a general idea
about their whereabouts.
Active top navigation tab
(Top navigation wrapper left out for the sake of simplicity.)
<ul class="topnavigation__hover-tabs">
<li>
<a class="topnavigation__hover-tabs__label" href="#">Inactive</a>
</li>
<li>
<a class="topnavigation__hover-tabs__label topnavigation__menu-section--open" href="#">Active</a>
</li>
<li>
<a class="topnavigation__hover-tabs__label" href="#">Inactive</a>
</li>
</ul>
Layer Alignment
Layers are by default full-width. To align a layer to the right edge of the tab, use the topnavigation__hover-layer--right-aligned
class.
Layers aligned to the left and to the right
(Top navigation wrapper left out for the sake of simplicity.)
<ul class="topnavigation__level--1 topnavigation__hover-tabs">
<li>
<span class="topnavigation__level--1__label topnavigation__hover-tabs__label">
Full-width
</span>
<div class="topnavigation__level--2 topnavigation__hover-layer font-s">
This layer is full-width by default.
</div>
</li>
<li>
<span class="topnavigation__level--1__label topnavigation__hover-tabs__label">
Right-aligned
</span>
<div class="topnavigation__level--2 topnavigation__hover-layer topnavigation__hover-layer--right-aligned font-s">
This layer is aligned to the right, which comes in handy if there is not enough space on the right to fit the layer.
</div>
</li>
</ul>
Full-width
This layer is full-width by default.
Right-aligned
This layer is aligned to the right, which comes in handy if there is not enough space on the right to fit the layer.
Layer Content
Layers are made up of a topnavigation__hover-layer
element, wrapped around a topnavigation__hover-layer__navigation-wrapper
, which takes care of internal spacing.
Content structure for small and large layers
<ul class="topnavigation__level--1 topnavigation__hover-tabs">
<li>
<span class="topnavigation__level--1__label topnavigation__hover-tabs__label">
A layer
</span>
<div class="topnavigation__level--2 topnavigation__hover-layer font-s">
<div class="topnavigation__hover-layer__navigation-wrapper">
<ul class="icon-arrow list-spacing">
<li><a href="#">A couple</a></li>
<li><a href="#">of entries</a></li>
<li><a href="#">in a single</a></li>
<li><a href="#">link list</a></li>
</ul>
</div>
</div>
</li>
</ul>
Account Tab
The account tab layout differs from ordinary tabs. Depending on configuration and log-in status, it may show a user image and a user name.
Account Tab Structure
The account tab contains a number of additional DOM elements.
A user image (topnavigation__sso-login__user-avatar
)
A welcome message to the logged-in user (topnavigation__sso-login__welcome-message
)
Also, the classes sso-login
and sso-login__user-name
serve as handles for the log-in script.
An account tab
(Wrapper elements left out for the sake of simplicity.)
<div class="topnavigation__overlay--account">
<ul class="topnavigation__hover-tabs topnavigation__sso-login sso-login">
<li>
<a href="#" class="topnavigation__level--1__label topnavigation__hover-tabs__label topnavigation__overlay--account__hide">
<div class="topnavigation__sso-login__user-avatar" data-cms-qa="is24-login-avatar">
<!-- user image goes here -->
</div><!-- this comment is here to eat up the white space between two inline-block elements
--><span class="topnavigation__sso-login__label-text-wrapper">
<span class="topnavigation__sso-login__welcome-message font-ellipsis">
<span class="sso-login__user-name">
<span class="sso-login__user-name">Anmelden</span>
</span>
</span>
<span class="block topnavigation__chevronAppend--desktop">Mein Konto</span>
</span>
</a>
<div class="topnavigation__level--2 topnavigation__hover-layer topnavigation__hover-layer--right-aligned font-s"></div>
</li>
</ul>
</div>
JavaScript
To initialize the top navigation logic (including the slide-in behavior and support for touch interfaces),
call IS24.core.extensions.topnavigation.init
.
Note: If you use the CMS header snippet, this is already taken care of.
if (window.IS24 && IS24.core && IS24.core.extensions && IS24.core.extensions.topnavigation) {
IS24.core.extensions.topnavigation.init();
}