Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Requests
HTML Sidebar Help
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Damien" data-source="post: 471773" data-attributes="member: 72299"><p>We can achieve this quite easily with flex boxes</p><p></p><p><strong><u>HTML</u></strong></p><p>[SPOILER]</p><p>[CODE]</p><p><!DOCTYPE html></p><p><html></p><p><head></p><p><meta charset="UTF-8"></p><p><meta content="width=device-width, initial-scale=1.0" name="viewport"></p><p><link type="text/css" rel="stylesheet" href="styles.css"></p><p><script src="https://code.jquery.com/jquery-3.5.1.min.js"></script></p><p><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"></p><p><link href="https://fonts.googleapis.com/css?fa...:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet"></p><p><script src="js/main.js"></script></p><p><title>Website</title></p><p></head></p><p><body></p><p><div class="outer-container"></p><p></p><p><div class="sidebar"></p><p><div class="sidebar-container"></p><p><div class="profile"></p><p><img src="images/profile.jpg" alt=""></p><p><h3>name goes here</h3></p><p><p>Programmer</p></p><p></div></p><p><!--menu item--></p><p><ul></p><p><li></p><p><a href="index.html" class="active" id="home"></p><p><span class="icon"><i class="fas fa-home"></i></span></p><p><span class="item">Home</span></p><p></a></p><p></li></p><p><li></p><p><a id="formButton" ></p><p><span class="icon"><i class="fas fa-home"></i></span></p><p><span class="item">Form Validation</span></p><p></a></p><p></li></p><p><li></p><p><a href=""></p><p><span class="icon"><i class="fas fa-home"></i></span></p><p><span class="item">My Resume</span></p><p></a></p><p></li></p><p><li></p><p><a href="#" target="_blank"></p><p><span class="icon"><i class="fas fa-home"></i></span></p><p><span class="item">LinkedIn</span></p><p></a></p><p></li></p><p><li></p><p><a href="./blog" target="_blank"></p><p><span class="icon"><i class="fas fa-home"></i></span></p><p><span class="item">Blog</span></p><p></a></p><p></li></p><p><li></p><p><a href=""></p><p><span class="icon"><i class="fas fa-home"></i></span></p><p><span class="item">My JQuery Demo</span></p><p></a></p><p></li></p><p><li></p><p><a id="ajaxButton"></p><p><span class="icon"><i class="fas fa-home"></i></span></p><p><span class="item">AJAX</span></p><p></a></p><p></li></p><p></ul></p><p></div></p><p></div></p><p></p><p><div class="main-comtainer"></p><p><section id="main"></p><p><div class="main-container"></p><p><h1>name</h1></p><p><p>I'm stupid with CSS</p></p><p></div></p><p></section></p><p></p><p><section id="about"></p><p><div class="aboutus"></p><p><h2>About</h2></p><p><p>Something about myself...</p></p><p></div></p><p></section></p><p><section id="skills"></p><p><div class="skills"></p><p><h2>Skills</h2></p><p><p>SKILLS GOES HERE</p></p><p></div></p><p></section></p><p><section id="mywork"></p><p><div class="mywork"></p><p><h2>My Work</h2></p><p><p>ITEM BOXES GOES HERE</p></p><p></div></p><p></section></p><p><section id="contact"></p><p><div class="contact"></p><p><h2>contact</h2></p><p><p>contact goes</p></p><p></div></p><p></section></p><p></div></p><p></div></p><p></div></p><p></body></p><p></html></p><p>[/CODE]</p><p>[/SPOILER]</p><p></p><p><u><strong>Css</strong></u></p><p>[SPOILER]</p><p>[CODE]</p><p>@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');</p><p>*{</p><p>list-style: none;</p><p>text-decoration: none;</p><p>margin: 0;</p><p>padding: 0;</p><p>box-sizing: border-box;</p><p>font-family: 'Open Sans', sans-serif;</p><p>}</p><p>#main {</p><p>padding: 450px;</p><p>background-color: #0f0b0b;</p><p>background-size: cover;</p><p>background-position: center top;</p><p>background-repeat: no-repeat;</p><p>}</p><p></p><p>body {</p><p>background: #f5f6fa;</p><p>}</p><p>.outer-container {</p><p>display: flex;</p><p>width: 100%;</p><p>height: 100%;</p><p>}</p><p>/*Sidebar */</p><p>.sidebar{</p><p>display:flex;</p><p>}</p><p>.sidebar-container {</p><p>background: rgb(5, 68, 104);</p><p>top: 0;</p><p>left: 0;</p><p>width: 225px;</p><p>height: 100%;</p><p>padding: 20px 0;</p><p>transition: all 0.5s ease;</p><p>z-index: 1;</p><p>}</p><p>.sidebar .profile{</p><p>margin-bottom: 30px;</p><p>text-align: center;</p><p>}</p><p>.sidebar .profile img {</p><p>display: block;</p><p>width: 100px;</p><p>height: 100px;</p><p>border-radius: 50%;</p><p>margin: 0 auto;</p><p>}</p><p>.sidebar .profile h3{</p><p>color: #ffffff;</p><p>margin: 10px 0 5px;</p><p>}</p><p>.sidebar .profile p{</p><p>color: rgb(206, 240, 253);</p><p>font-size: 14px;</p><p>}</p><p></p><p></p><p>.sidebar ul li a {</p><p>display: block;</p><p>padding: 13px 30px;</p><p>border-bottom: 1px solid #10558d;</p><p>color: rgb(241, 237, 237);</p><p>font-size: 16px;</p><p>position: relative;</p><p>}</p><p>.sidebar ul li a .icon{</p><p>color: #dee4ec;</p><p>width: 30px;</p><p>display: inline-block;</p><p>}</p><p>/* Sidebar Link hover */</p><p>.sidebar ul li a:hover,</p><p>.sidebar ul li a.active{</p><p>color: #0c7db1;</p><p>background:white;</p><p>border-right: 2px solid rgb(5, 68, 104);</p><p>}</p><p>.sidebar ul li a:hover .icon,</p><p>.sidebar ul li a.active .icon{</p><p>color: #0c7db1;</p><p>}</p><p>.sidebar ul li a:hover:before,</p><p>.sidebar ul li a.active:before{</p><p>display: block;</p><p>}</p><p></p><p>.main-comtainer {</p><p>display: flex;</p><p>flex: 1 1 0%;</p><p>flex-direction: column;</p><p>}</p><p>/* about me */</p><p>#about {</p><p>top: 0;</p><p>bottom: 0;</p><p>right: 0;</p><p>left: 0;</p><p>width: 100%;</p><p>height: 140px;</p><p>background: #858585;</p><p>z-index: 0;</p><p>transform: skewY(0deg);</p><p>position: relative;</p><p>}</p><p>.aboutus h2 {</p><p>font-family: Arial;</p><p>text-align: center;</p><p>font-size: 16px;</p><p>}</p><p>/* skills */</p><p>#skills {</p><p>top: 0;</p><p>bottom: 0;</p><p>right: 0;</p><p>left: 0;</p><p>width: fixed;</p><p>height: 140px;</p><p>background: #FEFEFE;</p><p>z-index: 0;</p><p>transform: skewY(0deg);</p><p>position: relative;</p><p>}</p><p>.skills h2 {</p><p>font-family: Arial;</p><p>text-align: center;</p><p>font-size: 16px;</p><p>}</p><p>/* mywork */</p><p>#mywork {</p><p>top: 0;</p><p>bottom: 0;</p><p>right: 0;</p><p>left: 0;</p><p>width: fixed;</p><p>height: 140px;</p><p>background: #FEFEFE;</p><p>z-index: 0;</p><p>transform: skewY(0deg);</p><p>position: relative;</p><p>}</p><p>.mywork h2 {</p><p>font-family: Arial;</p><p>text-align: center;</p><p>font-size: 16px;</p><p>}</p><p>/* contact */</p><p>#contact {</p><p>top: 0;</p><p>bottom: 0;</p><p>right: 0;</p><p>left: 0;</p><p>width: fixed;</p><p>height: 140px;</p><p>background: #FEFEFE;</p><p>z-index: 0;</p><p>transform: skewY(0deg)</p><p>}</p><p>.contact h2 {</p><p>font-family: Arial;</p><p>text-align: center;</p><p>font-size: 16px;</p><p>}</p><p>[/CODE]</p><p>[/SPOILER]</p></blockquote><p></p>
[QUOTE="Damien, post: 471773, member: 72299"] We can achieve this quite easily with flex boxes [B][U]HTML[/U][/B] [SPOILER] [CODE] <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <link type="text/css" rel="stylesheet" href="styles.css"> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> <link href="https://fonts.googleapis.com/css?fa...:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet"> <script src="js/main.js"></script> <title>Website</title> </head> <body> <div class="outer-container"> <div class="sidebar"> <div class="sidebar-container"> <div class="profile"> <img src="images/profile.jpg" alt=""> <h3>name goes here</h3> <p>Programmer</p> </div> <!--menu item--> <ul> <li> <a href="index.html" class="active" id="home"> <span class="icon"><i class="fas fa-home"></i></span> <span class="item">Home</span> </a> </li> <li> <a id="formButton" > <span class="icon"><i class="fas fa-home"></i></span> <span class="item">Form Validation</span> </a> </li> <li> <a href=""> <span class="icon"><i class="fas fa-home"></i></span> <span class="item">My Resume</span> </a> </li> <li> <a href="#" target="_blank"> <span class="icon"><i class="fas fa-home"></i></span> <span class="item">LinkedIn</span> </a> </li> <li> <a href="./blog" target="_blank"> <span class="icon"><i class="fas fa-home"></i></span> <span class="item">Blog</span> </a> </li> <li> <a href=""> <span class="icon"><i class="fas fa-home"></i></span> <span class="item">My JQuery Demo</span> </a> </li> <li> <a id="ajaxButton"> <span class="icon"><i class="fas fa-home"></i></span> <span class="item">AJAX</span> </a> </li> </ul> </div> </div> <div class="main-comtainer"> <section id="main"> <div class="main-container"> <h1>name</h1> <p>I'm stupid with CSS</p> </div> </section> <section id="about"> <div class="aboutus"> <h2>About</h2> <p>Something about myself...</p> </div> </section> <section id="skills"> <div class="skills"> <h2>Skills</h2> <p>SKILLS GOES HERE</p> </div> </section> <section id="mywork"> <div class="mywork"> <h2>My Work</h2> <p>ITEM BOXES GOES HERE</p> </div> </section> <section id="contact"> <div class="contact"> <h2>contact</h2> <p>contact goes</p> </div> </section> </div> </div> </div> </body> </html> [/CODE] [/SPOILER] [U][B]Css[/B][/U] [SPOILER] [CODE] @import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap'); *{ list-style: none; text-decoration: none; margin: 0; padding: 0; box-sizing: border-box; font-family: 'Open Sans', sans-serif; } #main { padding: 450px; background-color: #0f0b0b; background-size: cover; background-position: center top; background-repeat: no-repeat; } body { background: #f5f6fa; } .outer-container { display: flex; width: 100%; height: 100%; } /*Sidebar */ .sidebar{ display:flex; } .sidebar-container { background: rgb(5, 68, 104); top: 0; left: 0; width: 225px; height: 100%; padding: 20px 0; transition: all 0.5s ease; z-index: 1; } .sidebar .profile{ margin-bottom: 30px; text-align: center; } .sidebar .profile img { display: block; width: 100px; height: 100px; border-radius: 50%; margin: 0 auto; } .sidebar .profile h3{ color: #ffffff; margin: 10px 0 5px; } .sidebar .profile p{ color: rgb(206, 240, 253); font-size: 14px; } .sidebar ul li a { display: block; padding: 13px 30px; border-bottom: 1px solid #10558d; color: rgb(241, 237, 237); font-size: 16px; position: relative; } .sidebar ul li a .icon{ color: #dee4ec; width: 30px; display: inline-block; } /* Sidebar Link hover */ .sidebar ul li a:hover, .sidebar ul li a.active{ color: #0c7db1; background:white; border-right: 2px solid rgb(5, 68, 104); } .sidebar ul li a:hover .icon, .sidebar ul li a.active .icon{ color: #0c7db1; } .sidebar ul li a:hover:before, .sidebar ul li a.active:before{ display: block; } .main-comtainer { display: flex; flex: 1 1 0%; flex-direction: column; } /* about me */ #about { top: 0; bottom: 0; right: 0; left: 0; width: 100%; height: 140px; background: #858585; z-index: 0; transform: skewY(0deg); position: relative; } .aboutus h2 { font-family: Arial; text-align: center; font-size: 16px; } /* skills */ #skills { top: 0; bottom: 0; right: 0; left: 0; width: fixed; height: 140px; background: #FEFEFE; z-index: 0; transform: skewY(0deg); position: relative; } .skills h2 { font-family: Arial; text-align: center; font-size: 16px; } /* mywork */ #mywork { top: 0; bottom: 0; right: 0; left: 0; width: fixed; height: 140px; background: #FEFEFE; z-index: 0; transform: skewY(0deg); position: relative; } .mywork h2 { font-family: Arial; text-align: center; font-size: 16px; } /* contact */ #contact { top: 0; bottom: 0; right: 0; left: 0; width: fixed; height: 140px; background: #FEFEFE; z-index: 0; transform: skewY(0deg) } .contact h2 { font-family: Arial; text-align: center; font-size: 16px; } [/CODE] [/SPOILER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Requests
HTML Sidebar Help
Top