Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library

 

Category: Cascading Style Sheets (HTML5 - SCSS - CSS3 & CSS) >> Menus & Navigation >> SCSS Side Menu Layout Template


Code Snippet </> Info


Snippet Name: SCSS Side Menu Layout Template

Description: Grab our FREE SCSS side menu layout template for your website. You can open the side menu on the left or right side depending on which side button you click!
Example: View Code Demo

Note:

Author: Yair Even-Or

Last Modified: 2015-03-20 00:17:35

Language: css

Highlight Mode: css

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor


  About Copying

<!doctype html> <html> <head> <meta charset="UTF-8"> <title>Pure HTML5 SCSS Side Menu Layout Template</title> <meta name="google" value="notranslate"> <script style="display:none !important;"> window.alert = function(){}; window.confirm = function(){}; window.prompt = function(){}; window.open = function(){}; window.print = function(){}; </script> <style>/* Reset */ /* Begin Pure HTML5 SCSS Side Menu Layout Template */ /* == This Script Free To Use Providing This Notice Remains == */ /* == This Script Has Been Found In The http://snapbuilder.com Free Public Codes Library == */ /* == NOTICE: Though This Material May Have Been In A Public Depository, Certain Author Copyright Restrictions May Apply == */ /* == Created by: Yair Even-Or : http://dropthebit.com/ : Creative Commons License == */ * { margin:0; padding:0; -moz-box-sizing:border-box; box-sizing:border-box; } html { height:100%; } p { padding:10px 0; } body { height:100%; font-family:arial; position:relative; background:#222222; } .floatl { float:left; } .floatr { float:right; } /* Side menu */ .sideMenu { position:fixed; top:0; bottom:0; z-index:0; width:250px; background:#222222; color:#FFF; padding:20px; text-transform:uppercase; } .sideMenu.right { left:auto; right:0; } .sideMenu > ul { padding:0; list-style:none; margin:20px 0; } .sideMenu > ul > li { border-top:1px solid rgba(255, 255, 255, 0.1); position:relative; overflow:hidden; } .sideMenu > ul > li a { color:#CCC; text-decoration:none; display:block; line-height:3.2; font-size:0.8em; font-weight:bold; margin:0 -10px; padding:0 20px; overflow:hidden; white-space:nowrap; transition:0.4s cubic-bezier(0.335, 0.815, 0.47, 1); } .sideMenu > ul > li a:hover { color:#222222; text-indent:250px; } .sideMenu > ul > li a::before { content:attr(data-value); color:#FFF; float:left; width:250px; margin-left:-250px; } /* Toggle button */ .menuBtn { display:inline-block; background:#f1103a; border-radius:50px; color:#FFF; cursor:pointer; display:block; font:bold 1.7em/36px Courier New; width:36px; height:36px; text-align:center; text-shadow:0 -5px, 0 5px; transition:0.15s; } .menuBtn:hover { background:#222; } /* Content handing */ #contentWrap { min-height:100%; position:relative; z-index:1; background:#FFF; padding:20px; transition:0.4s cubic-bezier(0.335, 0.815, 0.47, 1); } #sideToggle1:checked ~ #contentWrap { -webkit-transform:translatex(250px); border-radius:8px; transform:translatex(250px); } #sideToggle2:checked ~ #contentWrap { -webkit-transform:translatex(-250px); transform:translatex(-250px); border-radius:8px; } </style> </head> <body onload="_l='t';"> <input type="checkbox" id="sideToggle1" hidden> <input type="checkbox" id="sideToggle2" hidden> <aside class="sideMenu left"> <h2>Side Menu</h2> <ul> <li><a href="#" data-value="item 1">item 1</a></li> <li><a href="#" data-value="very long item 2">very long item 2</a></li> <li><a href="#" data-value="long item 3">long item 3</a></li> <li><a href="#" data-value="item 4">item 4</a></li> </ul> </aside> <aside class="sideMenu right"> <h2>Side Menu</h2> <ul> <li><a href="#" data-value="item 1">item 1</a></li> <li><a href="#" data-value="very long item 2">very long item 2</a></li> <li><a href="#" data-value="long item 3">long item 3</a></li> <li><a href="#" data-value="item 4">item 4</a></li> </ul> </aside> <div id="contentWrap"> <label class="menuBtn floatr" for="sideToggle2">&#8722;</label> <label class="menuBtn" for="sideToggle1">&#8722;</label> <br /><br /> <p>[ This code example from <a href="http://snapbuilder.com/code_snippets/snippet.php?sid=217">Pure HTML5 SCSS Side Menu Layout Template Code Snippet</a> page. ]</p> <p>Click the red button above to see the Side Menu open. Hover your mouse over the menu links to see the transition effect.</p> <p> Proin tempor adipiscing ligula, eget bibendum risus laoreet eget. Donec vitae nisl vitae eros imperdiet vestibulum nec sollicitudin est. Mauris ultrices augue id diam condimentum venenatis. Aenean ut felis odio. Nunc quis magna et ligula ullamcorper commodo vel vitae lectus. Mauris pulvinar pellentesque lobortis. Donec congue pretium pulvinar. Integer quis augue vel mi elementum sodales. Nam eget massa metus. Donec justo justo, vulputate id rhoncus a, tincidunt at arcu. Suspendisse vulputate eleifend pharetra. </p> <p> Sed vitae luctus justo. Praesent placerat, augue eget imperdiet ullamcorper, mauris diam scelerisque nulla, quis ullamcorper purus risus ut leo. Suspendisse ornare rutrum lacus, non adipiscing massa rutrum non. Morbi in purus neque, quis ultricies augue. Aenean consequat, nisl ornare lacinia gravida, tortor lacus porta odio, in cursus tellus velit et ipsum. In hac habitasse platea dictumst. Nullam vel nisl risus. Morbi non tortor nibh. </p> <p> Phasellus eleifend volutpat tristique. Nunc id mi a sem dignissim consequat. Cras eu enim eu magna sollicitudin varius. Vestibulum vel mi non lectus iaculis egestas. Vivamus quam augue, condimentum non consequat in, adipiscing eget metus. Integer est risus, pulvinar id facilisis et, semper vitae urna. Fusce lectus nulla, ultricies sed vulputate non, vulputate sollicitudin elit. Sed vehicula viverra elit aliquam sollicitudin. Vivamus venenatis fringilla sapien vel sagittis. Praesent congue scelerisque diam, a lobortis neque elementum ut. Curabitur eleifend bibendum auctor. Maecenas semper egestas est vitae auctor. Quisque interdum tincidunt tristique. </p> </div> <br /><br /> <div id="snippet"> [ This code example from <a href="http://snapbuilder.com/code_snippets/copy_code_snippet_217.html">SCSS Side Menu Layout Template</a> page. ] </div> </body> </html>


[ Snippet Options ]

 

© 2002 -  Snap Builder Public Codes Library