JSFiddle - React, Tailwind, and code Playground

by Mayank Khanna

HTML

<div class="container">
<header>
  <h1>Welcome here</h1>
</header>
<nav class="nav">
<ul>
  <li><a href="#">Home</a></li>
  <li><a href="#">Profile</a></li>
  <li><a href="#">Contact</a></li>
</ul>
</nav>
<article class="article">
  <h1>Home</h1>
  <p>This is the demo page. showing working of flex at its best. What if we resize this window, will any changes take place of content remains as it is.</p>
  
  <p><strong>Resize this page</strong></p>
</article>

<footer>Contact me :9013496614</footer>
</div>

CSS

.container {
    display: flex;  
    flex-flow: row wrap;
    text-align: center;
}

.container > * {
    padding: 15px;
    flex: 1 100%;
}
header {background: black;color:white;}
footer {background: #aaa;color:white;}
.nav {background:#eee;}


.article {
    text-align: left;
}

.nav ul {
    list-style-type: none;
    padding: 0;
}
.nav ul a {
    text-decoration: none;
}


@media all and (min-width: 750px) {
    .nav {text-align:left;flex: 1 auto;order:1;}
    .article {flex:5 0px;order:2;}
    footer {order:3;}
}