Full Width Areas With Sidebar

Developer
Size
2,709 Kb
Views
26,312

How do I make an full width areas with sidebar?

What is a full width areas with sidebar? How do you make a full width areas with sidebar? This script and codes were developed by Keith Wyland on 13 September 2022, Tuesday.

Full Width Areas With Sidebar Previews

Full Width Areas With Sidebar - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Full Width Areas With Sidebar</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body, html { overflow-x: hidden;
}
h1 { color: white;
}
.wrapper { background-color: #cccccc; width: 75%; margin: 1em auto; padding: 0 2em 2em;
}
.wrapper:before,
.wrapper:after { content: " "; display: table;
}
.wrapper:after { clear: both;
}
.wrapper { *zoom: 1;
}
.content-wrapper { float: left; width: 60%;
}
.content1, .content2 { margin: 1em 0 1em; background-color: #5eabed; padding: 1em; color: white;
}
.content2 { background-color: #5ead06;
}
.sidebar { background-color: #deba65; padding: 1em; width: 30%; float: right; color: white;
}
.break-width { padding-left: 2000px; padding-right: 2000px; margin-left: -2000px; margin-right: -2000px; width: 100%;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <!--based on this: https://css-tricks.com/full-browser-width-bars/#li-comment-94090 -->
<div class="wrapper"> <h1>Full Width Areas With Sidebar</h1> <div class="content-wrapper "> <div class="content1 break-width"> <p>Might be an old problem that's been solved years ago...</p> </div> <div class="content2 break-width"> <p>But I came across it in a recent design given to me and I also needed to support IE7/Compat Mode (yes, that's <em>still</em> a thing in some places).</p> <p>And the design involved a sidebar, which I hadn't seen in the other solutions. Well, I didn't really do much searching because I figured it would be faster to apply what I already learned and tweak it from there.</p> </div> </div> <aside class="sidebar"> <p>Here's the sidebar part. It needed to be next to the areas that extend, so obviously that was a bit of an issue.</p> <p>Luckily, the solution described at the link below pretty much worked, I just needed to wrap the extending areas in their own wrapper and float that instead of floating the individual extending areas. Then float the sidebar and tada!</p> <p><a href="https://css-tricks.com/full-browser-width-bars/#li-comment-94090">Based on this</a></p> </aside>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>

Full Width Areas With Sidebar - Script Codes CSS Codes

body, html { overflow-x: hidden;
}
h1 { color: white;
}
.wrapper { background-color: #cccccc; width: 75%; margin: 1em auto; padding: 0 2em 2em;
}
.wrapper:before,
.wrapper:after { content: " "; display: table;
}
.wrapper:after { clear: both;
}
.wrapper { *zoom: 1;
}
.content-wrapper { float: left; width: 60%;
}
.content1, .content2 { margin: 1em 0 1em; background-color: #5eabed; padding: 1em; color: white;
}
.content2 { background-color: #5ead06;
}
.sidebar { background-color: #deba65; padding: 1em; width: 30%; float: right; color: white;
}
.break-width { padding-left: 2000px; padding-right: 2000px; margin-left: -2000px; margin-right: -2000px; width: 100%;
}
Full Width Areas With Sidebar - Script Codes
Full Width Areas With Sidebar - Script Codes
Home Page Home
Developer Keith Wyland
Username keithwyland
Uploaded September 13, 2022
Rating 3.5
Size 2,709 Kb
Views 26,312
Do you need developer help for Full Width Areas With Sidebar?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Keith Wyland (keithwyland) Script Codes
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!