added example style and layout on page
This commit is contained in:
parent
acb4622f56
commit
9bc7bb9bb4
@ -13,12 +13,30 @@
|
||||
<a href="#">Clients</a>
|
||||
<a href="#">Contact</a>
|
||||
</div>
|
||||
|
||||
<div id="main">
|
||||
<button class="openbtn" onclick="openNav()">☰ Open Sidebar</button>
|
||||
<h2>Collapsed Sidebar</h2>
|
||||
<p>Content...</p>
|
||||
<div class="content">
|
||||
<div class="grid-container">
|
||||
<div class="header">
|
||||
<p>header</p>
|
||||
</div>
|
||||
<div class="left">
|
||||
<button class="openbtn" onclick="openNav()">☰</button>
|
||||
<h2>Collapsed Sidebar</h2>
|
||||
</div>
|
||||
<div class="main">
|
||||
<p>main</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<p>right</p>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p>footer</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- scripts -->
|
||||
<script src="example.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -66,3 +66,34 @@
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* grid layout for the content */
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-template-areas: 'left header header'
|
||||
'left main right'
|
||||
'footer footer footer';
|
||||
grid-template-columns: [left] 80px [line2] calc(100% - 160px) [line3] 80px [right];
|
||||
grid-template-rows: [top] 80px [line2] calc(100% - 160px) [line3] 80px [bottom];
|
||||
}
|
||||
|
||||
.left {
|
||||
grid-area: left;
|
||||
}
|
||||
|
||||
.right {
|
||||
grid-area: right;
|
||||
}
|
||||
|
||||
.header {
|
||||
grid-area: header;
|
||||
}
|
||||
|
||||
.main {
|
||||
grid-area: main;
|
||||
}
|
||||
|
||||
.footer {
|
||||
grid-area: footer;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user