Christofer Hansen Christofer Hansen - 4 months ago 59
HTML Question

Material Design lite menu

I am using material design lite.

In my dashboard menu i am trying to display 4 tabs.

I have tried in many ways to display 4 tabs on my dashboard URL.

This is my dashboard menu ---

https://codepen.io/anon/pen/pbKVko

<html>
<head>
<!-- Material Design Lite -->
<script src="https://code.getmdl.io/1.1.3/material.min.js"></script>
<link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.indigo-pink.min.css">
<!-- Material Design icon font -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
<body>
<!-- Uses a header that scrolls with the text, rather than staying
locked at the top -->
<div class="mdl-layout mdl-js-layout">
<header class="mdl-layout__header mdl-layout__header--scroll">
<div class="mdl-layout__header-row">
<!-- Title -->
<span class="mdl-layout-title">Chris</span>
<!-- Add spacer, to align navigation to the right -->
<div class="mdl-layout-spacer"></div>
<!-- Navigation -->
<nav class="mdl-navigation">
<a class="mdl-navigation__link" href="">Dashboard</a>
<a class="mdl-navigation__link" href="">Dashboard 2</a>
<a class="mdl-navigation__link" href="">Dashboard 3</a>
<a class="mdl-navigation__link" href="">Dashboard 4</a>
</nav>
</div>
</header>
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">Chris</span>
<nav class="mdl-navigation">
<a class="mdl-navigation__link" href="">Dashboard</a>
<a class="mdl-navigation__link" href="">Dashboard 2</a>
<a class="mdl-navigation__link" href="">Dashboard 3</a>
<a class="mdl-navigation__link" href="">Dashboard 4</a>
</nav>
</div>
<main class="mdl-layout__content">
<div class="page-content"><!-- Your content goes here --></div>
</main>
</div>
</body>
</html>


This is my tab menu which i am trying to add on my dashboard menu ---
https://codepen.io/anon/pen/JKkvgA

Any one knows how i can merge this 2 and display 4 tabs only on the dashboard menu selection !

Any advice or suggestion will be really appreciate !

Answer

What about this ?

<html>
  <head>
    <!-- Material Design Lite -->
    <script src="https://code.getmdl.io/1.1.3/material.min.js"></script>
    <link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.indigo-pink.min.css">
    <!-- Material Design icon font -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
  </head>
  <body>
    <!-- Uses a header that scrolls with the text, rather than staying
      locked at the top -->
    <div class="mdl-layout mdl-js-layout">
      <header class="mdl-layout__header mdl-layout__header--scroll">
        <div class="mdl-layout__header-row">
          <!-- Title -->
          <span class="mdl-layout-title">Chris</span>
          <!-- Add spacer, to align navigation to the right -->
          <div class="mdl-layout-spacer"></div>
          <!-- Navigation -->
          <nav class="mdl-navigation">
            <a class="mdl-navigation__link" href="">Dashboard</a>
            <a class="mdl-navigation__link" href="">Dashboard 2</a>
            <a class="mdl-navigation__link" href="">Dashboard 3</a>
            <a class="mdl-navigation__link" href="">Dashboard 4</a>
          </nav>
        </div>
        <!-- Tabs -->
        <div class="mdl-layout__tab-bar mdl-js-ripple-effect">
            <a href="#dashboard_tab_1" class="mdl-layout__tab is-active">Dashboard Tab 1</a>
            <a href="#dashboard_tab_2" class="mdl-layout__tab">Dashboard Tab 2</a>
            <a href="#dashboard_tab_3" class="mdl-layout__tab">Dashboard Tab 3</a>
            <a href="#dashboard_tab_4" class="mdl-layout__tab">Dashboard Tab 4</a>
        </div>
      </header>
      <div class="mdl-layout__drawer">
        <span class="mdl-layout-title">Chris</span>
        <nav class="mdl-navigation">
            <a class="mdl-navigation__link" href="">Dashboard</a>
            <a class="mdl-navigation__link" href="">Dashboard 2</a>
            <a class="mdl-navigation__link" href="">Dashboard 3</a>
            <a class="mdl-navigation__link" href="">Dashboard 4</a>
        </nav>
      </div>
      <main class="mdl-layout__content">
        <div class="page-content"><!-- Your content goes here --></div>
      </main>
    </div>
  </body>
</html>
Comments