I decided to re-do the entire thing. Managed to get the hamburger in place but not sure why the website is squeezed to the left and only covers half the screen on PG’s large screen.
The STYLE.CSS is LIKE THIS:
body {
display: grid;
grid-template-columns: 1fr minmax(auto, 100px) minmax(auto, 300px) 1fr;
grid-template-rows: 1fr;
margin: 0;
padding: 0;
background: white;
}
- {
font-family: Georgia, “Times New Roman”, Times, Serif;
}
.sidebar {
grid-area: sidebar;
}
.sidebar2 {
grid-area: sidebar2;
}
.content {
grid-area: content;
}
.header {
grid-area: header;
}
.footer {
grid-area: footer;
}
.wrapper {
background-color: #fff;
color: #444;
}
.wrapper {
display: grid;
grid-gap: 1em;
grid-template-areas: “header”
“sidebar”
“content”
“sidebar2”
“footer”;
}
/* -------------------- Top Navigation ----------------------------------------------------------- /
/ Background color of Top Navigation*/
.topnav {
background-color: none;
overflow: hidden;
}
/* Link styles inside navigation bar */
.topnav a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
/* Change the color of links on hover */
.topnav a:hover {
background-color: #ddd;
color: black;
}
/* Active class to highlight the current page */
.active {
background-color: #4CAF50;
color: white;
}
/* Hide link that should open and close the topnav on small screens */
.topnav .icon {
display: none;
}
/* Navbar Media Query - show only first link (“Home”) when screen is < 600 pixels wide. Show the link that contains should open and close the topnav (.icon) */
@media screen and (max-width: 600px) {
.topnav a:not(:first-child) {
display: none;
}
.topnav a.icon {
float: right;
display: block;
}
}
/* Navbar Media Query - “Responsive” class added to the Topnav with JavaScript when the user clicks on icon. This class makes Topnav look good on small screens (display the links vertically instead of horizontally) */
@media screen and (max-width: 600px) {
.topnav.responsive {
position: relative;
}
.topnav.responsive a.icon {
position: absolute;
right: 0;
top: 0;
}
.topnav.responsive a {
float: none;
display: block;
text-align: left;
}
}
/* --------------------Content Area--------------------------------------------------------------- */
#wrapper {
padding: 60px 0;
clear: both;
line-height: 1.6em;
}
#main-content h1,
h2,
h3,
h4,
h5,
h6: {
color: black;
font-variant: small-caps;
}
#main-content h1,
h2,
h3,
h4,
h5,
h6:first-letter,
{
font-size: 2em;
}
#wrapper section {
display: block;
width: 100%;
margin: 0 0 30px 0;
padding: 0;
}
/* Media Queries */
@media only screen and (min-width: 500px) {
.wrapper {
grid-template-columns: 20% auto;
grid-template-areas: “header header”
“sidebar content”
“sidebar2 sidebar2”
“footer footer”;
}
}
@media only screen and (min-width: 600px) {
.wrapper {
grid-gap: 20px;
grid-template-columns: 120px auto 120px;
grid-template-areas: “header header header”
“sidebar content sidebar2”
“footer footer footer”;
max-width: 600px;
}
}
.box {
background-color: #444;
color: #fff;
border-radius: 5px;
padding: 10px;
font-size: 150%;
}
.nav {
background: none;
}
.header {
background: #e49b0f;
}
.footer {
background: #999;
}
.sidebar2 {
background: #ccc;
color: #444;
}
The HTML is like this:
HAMBURGER
Sidebar
Sidebar 2
Content
Huge Title That Uses Multiple Lines.
Welcome to the world of lorem ipsums.. Lorem ipsum. more lorem ipsum. More and more lorum ipsum. Even more lorem ipsum. Look at the overwhelming amount of lorem ipsums. Is there only lorem ipsums in this world?
(c) copyright 2018