How can I fix the spacing/padding issue here? - html

I am forced to use on page css due to a locked down template in Ektron CMS, but I am trying to resolve an issue where my h3.subhead is not aligning to the top on all three columns. In Chrome, col1 and col3 have the extra, unwanted space. In IE, all three columns have the extra space. Not sure how to fix.
* {
padding: 0;
margin: 0;
}
* a {
text-decoration: underline;
}
* a:hover {
text-decoration: none;
}
#sidebar {
width: 20%;
float: right;
padding: 15px 30px 5px 5px;
}
#left {
padding-left: 25px;
float: left;
width: 70%;
}
.clear {
clear: both;
}
#sidebar h2 {
display: block;
padding: 5px;
border-bottom: solid 1px #808184;
text-transform: uppercase;
color: #158C59;
}
#sidebar ul {
list-style: none;
/*margin-bottom:15px;*/
}
#sidebar li {
display: block;
border-bottom: solid 1px #f2eddc;
line-height: 200%;
}
h3.subhead {
font-size: 12px;
text-transform: uppercase;
color: #fff;
display: block;
padding: 5px 0 5px 5px;
background: #158c59;
}
/*.columns {padding:0 8px 0 8px;}*/
.col1 {
width: 30%;
float: left;
}
.col3 {
width: 30%;
float: right;
}
.col2 {
margin: 0 32% 0 32%;
}
.clear2 {
width: 590px;
clear: left;
float: right;
color: #fff!important;
}
.columns div {
background: #f2eddc;
height: 240px;
}
.columns div p {
padding: 5px;
}
.columns h3 {
align: top;
top: 0px;
}
#subnav {
padding: 9px 50px 0 420px;
color: #fff;
}
#subnav a {
color: #fff;
text-decoration: none;
}
img.leftalign,
img.rightalign {
display: block;
padding: 3px;
background: #efefef;
border: solid 1px #ddd;
}
img.leftalign {
float: left;
margin-right: 8px;
}
img.rightalign {
float: right;
margin-left: 8px;
}
h1#sitename {
display: block;
padding: 5px 70px 0 50px;
color: #fff;
}
#sitename a,
#sitename a:visited,
#sitename a:hover {
color: #fff;
text-decoration: none;
}
#left h2 {
color: #158c59!important;
}
blockquote {
background: #efefef;
padding: 5px;
border: solid 1px #ddd;
display: block;
margin: 5px;
}
blockquote.leftalign {
width: 300px;
float: left;
}
.post ul,
.post ol {
margin-bottom: 15px;
}
.post li {
padding: 3px;
}
<div id="wrap">
<div id="content">
<div id="left">
<div class="columns">
<div class="col1">
<h3 class="subhead">Strategic Reinvention Plan</h3>
<p>WHEDA is always working to stay current and look towards how we can best succeed in the future.
Click here to view the presentation by our leadership, presented at the last all staff meeting.</p>
</div>
<div class="col3">
<h3 class="subhead">New Employees</h3>
<p>Welcome to 
Ging Skievaski on our Risk & Compliance team and 
Michael Clark on our Information Technology team!
<br/>
<br/>
<br/>
</p>
</div>
<div class="col2">
<h3 class="subhead">2016 Board Meeting Schedule</h3>
<p>Remember, you can't wear jeans on days that the WHEDA board is meeting. The 2016 meeting schedule is:</p>
<p><strike>February 17</strike>
<br/>April 20
<br/>June 15
<br/>August 17
<br/>October 19
<br/>December 21 </p>
</div>
</div>
<div class="clear2"></div>
<br/>
<div class="post">
<h2>WHEDA Logo Files</h2>
<p>Logo for Use in Partner Publications - <b>All logo use must follow our Brand Standards </b>
<br/>(Right click and select Save As)</p>
<table dropzone="copy" style="text-align: center; width: 100%; border-spacing: 0px; border-collapse: collapse;">
<tbody>
<tr>
<td style="cursor: default;">
<img src="https://www.wheda.com/assets/0/81/90/179/646ddd39-3e15-4bb2-8efb-5c90f4eceb24.jpg" alt="Main Logo JPG" title="Main Logo JPG" class="fancy" width="300px" draggable="true" /> </td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="sidebar">
<h2>Quick Links</h2>
<ul>
<li>
Employee Suggestion Box
</li>
<li><i>Suggestion Box Tracker</i>
</li>
<li>
Submit a Help Desk Ticket
</li>
<li>
Submit a Marketing Ticket
</li>
<li>
Applications
</li>
</ul>
<h2>Resources</h2>
<ul>
<li>
ADP
</li>
<li>
DocFinity Information
</li>
<li>
Salesforce Login
</li>
<li>
Wisconsin eGov Portal
</li>
<li>
State of Wisconsin Phone/Email Directory
</li>
<li>
WHEDAGear Online Store
</li>
<li>
Loan Committee Schedule
</li>
<li>
Travel Expense Reimbursement
</li>
<li>
Travel Policy
</li>
<li>
Loan Policy
</li>
<li>
Communications & Social Media Policy
</li>
<li>
Whistleblower/Ethics Hotline - FAQs
</li>
</ul>
</div>
<div class="clear"></div>
</div>
</div>

You could try giving them all margin-top:0px and padding-top:0px just incase something somewhere else is adding margin or padding.
Failing that you could also try popping !important tags on those.
If you inspect your elements by right clicking then choosing "Inspect element" you might be able to find the source of the problem.
It could also be that they just need floating left or right!

Related

ul li timetable elements overlapping

Making a responsive timetable which switches to a list format for mobile, with Weekdays acting as headers and relevant sessions being listed below.
I've encountered a problem where li elements overlap. Despite experimenting with position and display values, I can't figure out how to counteract this overlap.
Any help would be appreciated.
.smallTableContainer {
position: relative;
display: none;
height: auto;
overflow: hidden;
}
.weekdayHeader {
background: #bc4b51;
color: #efefef;
font-size: 18pt;
padding: 10px 0px;
}
.sessions {
padding: 0;
}
.className {
float: left;
display: inline-block;
color: #1e1e1e;
font-size: 13pt;
padding-left: 10px;
}
.classTime {
float: right;
display: inline-block;
color: #1e1e1e;
font-size: 12pt;
padding-right: 10px;
}
<div class="smallTableContainer">
<h3 class="weekdayHeader">Monday</h3>
<ul class="sessions">
<li>
<div class="className">
Warrior Cubs Kickboxing
<br>AGES 5-7
<br>[ SPACES AVAILABLE ] </div>
<div class="classTime">
<br> 16.15pm - 17.00pm
</div>
</li>
<li>
<div class="className">
Warrior Cubs Kickboxing
<br>AGES 8-12
<br>[ SPACES AVAILABLE ]
</div>
<div class="classTime">
<br> 17.00pm - 17.45pm
</div>
</li>
</ul>
</div>
If I understand your desired result correctly, you want the events and times to disaply on individual lines. In order to do this, all you're looking for is cleart: both on your .sessions li. In addition to this, you'll probably want to add a bit of spacing between each event, which can be done by adding margin-top to the (rather complex) .sessions li:not(:first-of-type) .className selector. This ensures that the margin will be applied to all of the listings apart from the first one.
This can be seen in the following:
.smallTableContainer {
position: relative;
/*display: none;*/
height: auto;
overflow: hidden;
}
.weekdayHeader {
background: #bc4b51;
color: #efefef;
font-size: 18pt;
padding: 10px 0px;
}
.sessions {
padding: 0;
}
.sessions li {
clear: both;
}
.className {
float: left;
display: inline-block;
color: #1e1e1e;
font-size: 13pt;
padding-left: 10px;
}
.classTime {
float: right;
display: inline-block;
color: #1e1e1e;
font-size: 12pt;
padding-right: 10px;
}
.sessions li:not(:first-of-type) .className {
margin-top: 20px;
}
<div class="smallTableContainer">
<h3 class="weekdayHeader">Monday</h3>
<ul class="sessions">
<li>
<div class="className">
Warrior Cubs Kickboxing
<br>AGES 5-7
<br>[ SPACES AVAILABLE ] </div>
<div class="classTime">
<br> 16.15pm - 17.00pm
</div>
</li>
<li>
<div class="className">
Warrior Cubs Kickboxing
<br>AGES 8-12
<br>[ SPACES AVAILABLE ]
</div>
<div class="classTime">
<br> 17.00pm - 17.45pm
</div>
</li>
</ul>
</div>

How can I successfully create a two columns layout? One for a vertical navigation bar to the left and the content to the right

I am trying to make two columns one for a vertical navigation bar to the left and the content column should float right. I tried every method possible. The page did not look good at all. I do not know what I am missing. Any help will be greatly appreciated. Any suggestions? I have been trying for hours but have not been successful. I am still learning the process. I tried floating the Navigation bar left and the content right, but that did not work as desired.
body {
background-color: red;
color: black;
font-family: Verdana, Arial, sans-serif;
}
#wrapper {
background-color: #dce9f7;
margin-left: auto;
margin-right: auto;
width: 70%;
min-width: 700px;
box-shadow: 5px 5px 5px 5px #828282;
}
h1 {
background-color: #d9c7b4;
color: black;
text-align: center;
}
h2 {
background-color: white;
font-size: 1.2em;
padding-left: 10px;
padding-bottom: 5px;
}
#nav {
text-align: center;
}
#content {
padding: 25px;
}
.floatright {
float: right;
padding-bottom: 20px;
}
.floatleft {
float: left;
padding: 20px;
}
<div id="wrapper">
<h1>The Nothing Burger</h1>
<div id="nav">
Home
Menu
Location
</div>
<h2>Only the best food!</h2>
<div class="floatright">
<img src="plate.jpg" alt="Great Food" width="333" height="156">
</div>
<div id="content">
<ul>
<li>Fresh, Healthy Cuisine</li>
<li>Friendly Service</li>
<li>Open for Breakfast, Lunch and Dinner</li>
</ul>
</div>
<div>123 Elm Street<br/> Appleton, CA<br/> 1-888-555-5555
<br/><br/>
</div>
</div>
Add a wrapper div around the navbar element and the content element like shown below and add these styles
.wrapperDiv {
display: flex;
}
#nav {
width: 30%;
}
.content-wrapper {
width: 70%
}
#nav a {
display: block;
}
body {
background-color: red;
color: black;
font-family: Verdana, Arial, sans-serif;
}
#wrapper {
background-color: #dce9f7;
margin-left: auto;
margin-right: auto;
width: 70%;
min-width: 700px;
box-shadow: 5px 5px 5px 5px #828282;
}
h1 {
background-color: #d9c7b4;
color: black;
text-align: center;
}
h2 {
margin: 0;
background-color: white;
font-size: 1.2em;
padding-left: 10px;
padding-bottom: 5px;
}
#nav {
text-align: center;
}
#content {
padding: 25px;
}
.floatright {
float: right;
padding-bottom: 20px;
}
.floatleft {
float: left;
padding: 20px;
}
.wrapperDiv {
display: flex;
}
#nav {
width: 30%;
}
.content-wrapper {
width: 70%
}
#nav a {
display: block;
}
<body>
<div id="wrapper">
<h1>The Nothing Burger</h1>
<div class="wrapperDiv">
<div id="nav">
Home
Menu
Location
</div>
<div class="content-wrapper">
<h2>Only the best food!</h2>
<div class="floatright">
<img src="plate.jpg" alt="Great Food" width="333" height="156">
</div>
<div id="content">
<ul>
<li>Fresh, Healthy Cuisine</li>
<li>Friendly Service</li>
<li>Open for Breakfast, Lunch and Dinner</li>
</ul>
<div>123 Elm Street<br/> Appleton, CA<br/> 1-888-555-5555
<br/><br/>
</div>
</div>
</div>
</div>

apply background color to left and right only; exclude middle

I'm trying to apply one background color to the left and the right of my main site content, while keeping the middle header/body/footer sections of the website a different color. In other words, I want the left and right sections of the page to be blue (for example) while the middle (which displays all the content) is white.
I've tried a few things--resulting in a mostly white main section--but if there's no content taking up the rest of the page, the surrounding color fills in the space rather than the white. You can see an example of this issue in the "Welcome!" section.
section, aside, h1 {
margin: 0;
padding: 0;
}
section, aside {
margin-top: 1.5em;
margin-bottom: 1em;
}
/*Body styles*/
body {
height: 100%;
width: 1100px;
margin: 0 auto;
border-left: 1px solid gray;
border-right: 1px solid gray;
background-color: #eff0f6;
}
/*Header styles*/
header {
border-bottom: 1px solid gray;
background-color: #ffffff;
}
header #logo {
height: 120px;
width: 120px;
float: left;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 5px;
}
header h1 {
color: black;
margin-left: 100px;
padding-top: 0.5em;
padding-left: 1em;
}
header h2 {
color: black;
margin-left: 100px;
margin-bottom: .2em;
padding-left: 1.5em;
}
/*Navigation styles*/
#nav_menu {
list-style: none;
font-weight: bold;
margin-bottom: 0px;
border-bottom: 1px solid gray;
width: 100%;
text-align: center;
background-color: #ffffff;
height:40px;
}
#nav_menu ul {
list-style-type: none;
margin: 0px;
padding: 0;
width: 100%;
float: left;
}
#nav_menu li {
margin: 0px;
}
#nav_menu li a {
padding-top: 10px;
padding-right: 30px;
padding-bottom: 10px;
padding-left: 30px;
text-decoration: none;
font-weight: bold;
color: #000000;
background-color: #ffffff;
float: left;
}
#nav_menu li a:hover {
color: #FFFFFF;
background-color: #cf2033;
}
.social {
height: 35px;
weight; 35px;
padding-top: 2px;
padding-right: 2px;
padding-left: 2px;
}
/*Section styles*/
section {
width: 764px;
padding-top: 40px;
padding-left: 10px;
padding-right: 10px;
float: left;
background-color: #ffffff;
margin-top: 0px;
}
/*Aside styles*/
aside {
width: 275px;
float: right;
padding-top: 40px;
padding-right: 20px;
padding-bottom: 10px;
padding-left: 20px;
border-left: 1px solid gray;
background-color: #ffffff;
margin-top: 0px;
margin-bottom: 0px;
}
aside h1 {
font-size: 125%;
}
aside #johnjenkinsphoto1 {
height: 200px;
width: 275px;
padding-right: 2px;
padding-bottom: 20px;
float: left;
}
aside p {
margin-bottom: .5em;
}
/*Footer styles*/
footer {
clear: both;
padding: 5px;
margin-top: 1em;
border-top: 1px solid gray;
background-color: #ffffff;
}
<html>
<head>
<title>Coach John R. Jenkins | Consultant, Personal Trainer, Speaker</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<header>
<img src="fitness icon1.png" alt="Title of Website" id="logo" width="80">
<hgroup>
<h1>Coach John R. Jenkins</h1>
<h2>Your Virtual Guide to Wellness, Performance, and Success</h2>
</hgroup>
<br>
</header>
<nav id="nav_menu">
<ul>
<li>START HERE</li>
<li>CONSULTING</li>
<li>TRAINING</li>
<li>SPEAKING</li>
<li>CONTACT</li>
<img src="pinterest.png" alt="Coach John Jenkins on Pinterest" class="social" align="right">
<img src="instagram.png" alt="Coach John Jenkins on Instagram" class="social" align="right">
<img src="flickr.png" alt="Coach John Jenkins on Flickr" class="social" align="right">
<img src="facebook.png" alt="Coach John Jenkins on Facebook" class="social" align="right">
</ul>
</nav>
<aside>
<h1 align="center">About Coach Jenkins</h1><br>
<img src="coachjohnjenkinsphoto1.png" alt="Photo of Coach John Jenkins" id="johnjenkinsphoto1"><br><br>
<p>A brief collection of biographical information for Coach Jenkins may go here. <br><br>
Unfortunately, Coach Jenkins and I are still planning and revising website content. Thus, I am inserting this information as a placeholder for that information once we have finalized everything.
</p>
</aside>
<section>
<h1>Welcome!</h1>
<p>In this section, I intend to provide summary information pertaining to the purpose of this website. Such information will first be quickly broken down as follows:
<ul>
<li>First piece of summary information goes here.</li>
<li>Second piece of summary information goes here.</li>
<li>Third piece of summary information goes here.</li>
</ul>
Unfortunately, Coach Jenkins and I are still planning and revising website content. Thus, I am inserting this information as a placeholder for that information once we have finalized everything.
</p>
</section>
<footer>© Copyright 2016 John R. Jenkins</footer>
</body>
</html>
I've also put both my HTML and CSS into a fiddle here: https://jsfiddle.net/js_jenkins/oLdo5m7e/
Any suggestions?
You have to keep the body as width:100% and add another div to control the width to 1100px by
body {
height: 100%;
width: 100%;
margin: 0;
background-color: #eff0f6;
}
body > div {
height: 100%;
width: 1100px;
margin: 0 auto;
border-left: 1px solid gray;
border-right: 1px solid gray;
background-color: white;
}
section,
aside,
h1 {
margin: 0;
padding: 0;
}
section,
aside {
margin-top: 1.5em;
margin-bottom: 1em;
}
/*Body styles*/
body {
height: 100%;
width: 100%;
margin: 0;
background-color: #eff0f6;
}
body > div {
height: 100%;
width: 1100px;
margin: 0 auto;
border-left: 1px solid gray;
border-right: 1px solid gray;
background-color: white;
}
/*Header styles*/
header {
border-bottom: 1px solid gray;
background-color: #ffffff;
}
header #logo {
height: 120px;
width: 120px;
float: left;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 5px;
}
header h1 {
color: black;
margin-left: 100px;
padding-top: 0.5em;
padding-left: 1em;
}
header h2 {
color: black;
margin-left: 100px;
margin-bottom: .2em;
padding-left: 1.5em;
}
/*Navigation styles*/
#nav_menu {
list-style: none;
font-weight: bold;
margin-bottom: 0px;
border-bottom: 1px solid gray;
width: 100%;
text-align: center;
background-color: #ffffff;
height: 40px;
}
#nav_menu ul {
list-style-type: none;
margin: 0px;
padding: 0;
width: 100%;
float: left;
}
#nav_menu li {
margin: 0px;
}
#nav_menu li a {
padding-top: 10px;
padding-right: 30px;
padding-bottom: 10px;
padding-left: 30px;
text-decoration: none;
font-weight: bold;
color: #000000;
background-color: #ffffff;
float: left;
}
#nav_menu li a:hover {
color: #FFFFFF;
background-color: #cf2033;
}
.social {
height: 35px;
weight;
35px;
padding-top: 2px;
padding-right: 2px;
padding-left: 2px;
}
/*Section styles*/
section {
width: 764px;
padding-top: 40px;
padding-left: 10px;
padding-right: 10px;
float: left;
background-color: #ffffff;
margin-top: 0px;
}
/*Aside styles*/
aside {
width: 275px;
float: right;
padding-top: 40px;
padding-right: 20px;
padding-bottom: 10px;
padding-left: 20px;
border-left: 1px solid gray;
background-color: #ffffff;
margin-top: 0px;
margin-bottom: 0px;
}
aside h1 {
font-size: 125%;
}
aside #johnjenkinsphoto1 {
height: 200px;
width: 275px;
padding-right: 2px;
padding-bottom: 20px;
float: left;
}
aside p {
margin-bottom: .5em;
}
/*Footer styles*/
footer {
clear: both;
padding: 5px;
margin-top: 1em;
border-top: 1px solid gray;
background-color: #ffffff;
}
<html>
<head>
<title>Coach John R. Jenkins | Consultant, Personal Trainer, Speaker</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div>
<header>
<img src="fitness icon1.png" alt="Title of Website" id="logo" width="80">
<hgroup>
<h1>Coach John R. Jenkins</h1>
<h2>Your Virtual Guide to Wellness, Performance, and Success</h2>
</hgroup>
<br>
</header>
<nav id="nav_menu">
<ul>
<li>START HERE
</li>
<li>CONSULTING
</li>
<li>TRAINING
</li>
<li>SPEAKING
</li>
<li>CONTACT
</li>
<a href="http://www.pinterest.com" target="_blank">
<img src="pinterest.png" alt="Coach John Jenkins on Pinterest" class="social" align="right">
</a>
<a href="http://www.instagram.com" target="_blank">
<img src="instagram.png" alt="Coach John Jenkins on Instagram" class="social" align="right">
</a>
<a href="http://www.flickr.com" target="_blank">
<img src="flickr.png" alt="Coach John Jenkins on Flickr" class="social" align="right">
</a>
<a href="http://www.facebook.com" target="_blank">
<img src="facebook.png" alt="Coach John Jenkins on Facebook" class="social" align="right">
</a>
</ul>
</nav>
<aside>
<h1 align="center">About Coach Jenkins</h1>
<br>
<img src="coachjohnjenkinsphoto1.png" alt="Photo of Coach John Jenkins" id="johnjenkinsphoto1">
<br>
<br>
<p>A brief collection of biographical information for Coach Jenkins may go here.
<br>
<br>Unfortunately, Coach Jenkins and I are still planning and revising website content. Thus, I am inserting this information as a placeholder for that information once we have finalized everything.
</p>
</aside>
<section>
<h1>Welcome!</h1>
<p>In this section, I intend to provide summary information pertaining to the purpose of this website. Such information will first be quickly broken down as follows:
<ul>
<li>First piece of summary information goes here.</li>
<li>Second piece of summary information goes here.</li>
<li>Third piece of summary information goes here.</li>
</ul>
Unfortunately, Coach Jenkins and I are still planning and revising website content. Thus, I am inserting this information as a placeholder for that information once we have finalized everything.
</p>
</section>
<footer>© Copyright 2016 John R. Jenkins</footer>
</div>
</body>
</html>
Assuming i got your question correct:
You can go with percentage 90% for body and margin auto and add background to html tag like this.
Also changed section width to auto to prevent overflowing.
html {
background-color: blue;
}
section,
aside,
h1 {
margin: 0;
padding: 0;
}
section,
aside {
margin-top: 1.5em;
margin-bottom: 1em;
}
/*Body styles*/
body {
height: 100%;
width: 90%;
margin: 0 auto;
border-left: 1px solid gray;
border-right: 1px solid gray;
background-color: #eff0f6;
}
/*Header styles*/
header {
border-bottom: 1px solid gray;
background-color: #ffffff;
}
header #logo {
height: 120px;
width: 120px;
float: left;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 5px;
}
header h1 {
color: black;
margin-left: 100px;
padding-top: 0.5em;
padding-left: 1em;
}
header h2 {
color: black;
margin-left: 100px;
margin-bottom: .2em;
padding-left: 1.5em;
}
/*Navigation styles*/
#nav_menu {
list-style: none;
font-weight: bold;
margin-bottom: 0px;
border-bottom: 1px solid gray;
width: 100%;
text-align: center;
background-color: #ffffff;
height: 40px;
}
#nav_menu ul {
list-style-type: none;
margin: 0px;
padding: 0;
width: 100%;
float: left;
}
#nav_menu li {
margin: 0px;
}
#nav_menu li a {
padding-top: 10px;
padding-right: 30px;
padding-bottom: 10px;
padding-left: 30px;
text-decoration: none;
font-weight: bold;
color: #000000;
background-color: #ffffff;
float: left;
}
#nav_menu li a:hover {
color: #FFFFFF;
background-color: #cf2033;
}
.social {
height: 35px;
weight;
35px;
padding-top: 2px;
padding-right: 2px;
padding-left: 2px;
}
/*Section styles*/
section {
width: auto;
padding-top: 40px;
padding-left: 10px;
padding-right: 10px;
float: left;
background-color: #ffffff;
margin-top: 0px;
}
/*Aside styles*/
aside {
width: 275px;
float: right;
padding-top: 40px;
padding-right: 20px;
padding-bottom: 10px;
padding-left: 20px;
border-left: 1px solid gray;
background-color: #ffffff;
margin-top: 0px;
margin-bottom: 0px;
}
aside h1 {
font-size: 125%;
}
aside #johnjenkinsphoto1 {
height: 200px;
width: 275px;
padding-right: 2px;
padding-bottom: 20px;
float: left;
}
aside p {
margin-bottom: .5em;
}
/*Footer styles*/
footer {
clear: both;
padding: 5px;
margin-top: 1em;
border-top: 1px solid gray;
background-color: #ffffff;
}
<html>
<head>
<title>Coach John R. Jenkins | Consultant, Personal Trainer, Speaker</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<header>
<img src="fitness icon1.png" alt="Title of Website" id="logo" width="80">
<hgroup>
<h1>Coach John R. Jenkins</h1>
<h2>Your Virtual Guide to Wellness, Performance, and Success</h2>
</hgroup>
<br>
</header>
<nav id="nav_menu">
<ul>
<li>START HERE
</li>
<li>CONSULTING
</li>
<li>TRAINING
</li>
<li>SPEAKING
</li>
<li>CONTACT
</li>
<a href="http://www.pinterest.com" target="_blank">
<img src="pinterest.png" alt="Coach John Jenkins on Pinterest" class="social" align="right">
</a>
<a href="http://www.instagram.com" target="_blank">
<img src="instagram.png" alt="Coach John Jenkins on Instagram" class="social" align="right">
</a>
<a href="http://www.flickr.com" target="_blank">
<img src="flickr.png" alt="Coach John Jenkins on Flickr" class="social" align="right">
</a>
<a href="http://www.facebook.com" target="_blank">
<img src="facebook.png" alt="Coach John Jenkins on Facebook" class="social" align="right">
</a>
</ul>
</nav>
<aside>
<h1 align="center">About Coach Jenkins</h1>
<br>
<img src="coachjohnjenkinsphoto1.png" alt="Photo of Coach John Jenkins" id="johnjenkinsphoto1">
<br>
<br>
<p>A brief collection of biographical information for Coach Jenkins may go here.
<br>
<br>Unfortunately, Coach Jenkins and I are still planning and revising website content. Thus, I am inserting this information as a placeholder for that information once we have finalized everything.
</p>
</aside>
<section>
<h1>Welcome!</h1>
<p>In this section, I intend to provide summary information pertaining to the purpose of this website. Such information will first be quickly broken down as follows:
<ul>
<li>First piece of summary information goes here.</li>
<li>Second piece of summary information goes here.</li>
<li>Third piece of summary information goes here.</li>
</ul>
Unfortunately, Coach Jenkins and I are still planning and revising website content. Thus, I am inserting this information as a placeholder for that information once we have finalized everything.
</p>
</section>
<footer>© Copyright 2016 John R. Jenkins</footer>
</body>
</html>
I am not sure if all browser support it, so it might be a good idea to add a simple background color just in case, but I think you are looking for that:
body {
background-color: white;
background-image: linear-gradient(to right, red, white, white, red);
}

one section of website is not fitting in the layout

I can't seem to get my 4th section to fall into line with the other sections.
Any help or clues would be greatly appreciated. I am at a loss as to what is wrong, I keep messing around with the chrome devolper tool trying to luck into a solution.
http://landonsimmons.altervista.org/School/assign7/assign7.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utc-8">
<link rel="stylesheet" type="text/css" href="css/main.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<header>
<img src="img/logo.png" />
<span>Computer Science Department</span>
</header>
<nav>
<ul>
<li>Contact</li>
<li>Faculty</li>
<li>Programs</li>
<li>Classes</li>
<li>Program List</li>
</ul>
</nav>
<section id="left">
<ul>
<li>
<a>Computer Programming</a>
<a>Computer Specialist</a>
</li><br>
<li>
<a>Information Technology Analysis</a>
</li><br>
<li>
<a>Information Technology Management</a>
</li><br>
<li>
<a>Network System Developer</a>
</li><br>
<li>
<a>Web Development Specialist</a>
</li>
</ul>
</section>
<section id="middle">
<h1 id="hist">History of College</h1>
<p id="first">
</p>
<p>
</p>
<h1 id="comp">About Computer Science</h1>
<p>
<img id="img" src="img/Capture3.PNG" />
While the computing field is one of the fastest growing segments of industry,
it is also one of the fastest changing areas technologically. Computing professionals
education does not stop with the college degree, but continues with seminars, conferences, and advanced courses and training.
In computer theory and applications, new ideas are developed every day.
Success requires an ongoing commitment to learning to maintain knowledge, skills and career opportunities.
</p>
</section>
<section id="right">
<h1 id="gain">Gainful Employment Information</h1>
<p>
The U.S. Department of Education requires colleges to disclose a variety of information for any financial
aid eligible program that <q>prepares students for gainful employment in a recognized occupation.</q> The information provided
here describes the graduation rates, the median debt of students who
completed the program and other important information regarding gainful employment for the latest completed academic year (as of July 1).
</p>
<br>
<p style="font-size: 13px">— US Labor Department</p>
</section>
<section id="bot">
<video height=260 width=323 >
<source src="vid/a1.mp4"/>
</video>
</section>
<footer>
<address>
</address>
</footer>
</body>
</html>
/***********************************************
font
***********************************************/
pre {
font-family: serif;
}
#first::first-letter {
font-size: 45px;
}
#big b {
letter-spacing: 4px;
font-family: serif;
font-size: 20px;
text-align: center;
margin-left: 180px
}
#middle p {
margin-right: 5px;
margin-top: -10px;
}
#right p {
margin: 16px 30px;
}
h1 {
padding: 5px 40px;
letter-spacing: 2px;
font-family: "Times New Roman", Times, serif;
font-weight: lighter;
}
footer address {
color: green;
font-variant: small-caps;
font-style: normal;
font-weight: bolder;
font-size: 12px;
text-align: center;
font-family: sans-serif;
}
/***********************************************
page setup
***********************************************/
body {
background-image: url(../img/parch.jpg);
display: inline-block;
max-width: 850px;
margin: 25px 8px 0 8px;
}
#left {
width: 20%;
float: left;
text-align: center;
}
#middle {
width: 40%;
border-right: 1px solid black;
border-left: 1px solid black;
display: inline-block;
}
video {
overflow: hidden;
}
#bot {
float: right;
border-top: 1px solid black;
border-right: 1px solid black;
border-left: 1px solid black;
width: 38%;
display: inline-block;
vertical-align: sub;
}
#right {
border-bottom: 1px solid black;
border-right: 1px solid black;
border-left: 1px solid black;
width: 38%;
display: inline-block;
float: right;
}
#small {
width: 18%;
text-align: center;
display: inline-block;
float: left;
}
#big a {
letter-spacing: 8px;
}
#big {
width: 75%;
border-left: 1px solid gray;
display: inline-block;
padding-left: 25px;
}
#img {
max-height: 90px;
max-width: 140px;
margin: 10px 10px 10px 10px;
float: right;
}
/***********************************************
color scheme
***********************************************/
#comp {
background-color: gray;
text-align: center;
color: #872E3F;
}
#gain {
background-color: #B28570;
text-align: center;
}
#hist {
background-color: black;
color: #872E3F;
text-align: center;
}
#right {
background-color: #FFC1A2;
}
/***********************************************
Header
***********************************************/
header {
width: 100%;
height: 120px;
background-color: #000;
}
header span {
color: #D2E1FF;
font-size: 25px;
margin: 30px;
letter-spacing: 4px;
position: relative;
top: -30px;
}
/***********************************************
nav + list
***********************************************/
#left ul {
list-style: none;
padding: 0 0 0 0;
}
#left ul li a {
text-decoration: none;
color: black;
}
#small ul {
list-style: none;
padding: 0 0 0 0;
}
#small ul li a {
text-decoration: none;
color: black;
}
nav ul li a {
color: #fff;
font-size: 18px;
text-decoration: none;
padding: 0 15px 0 50px;
font-weight: bold;
letter-spacing: 2px;
}
nav ul {
list-style: none;
margin: 0 0 0 0;
}
nav {
width: 100%;
height: 25px;
background-color: #0000FC;
}
nav ul li {
display: inline;
}
nav ul li a:hover {
color: red;
}
#small ul li a:hover,
#left ul li a:hover {
color: #ff6666;
outline: 1px double black;
}
/***********************************************
footer
***********************************************/
footer {
clear: right;
border-top: 1px solid black;
}
Here are the two changes you will have to made
Add float:left; to #middle and change clear:right to clear:both for footer css.
footer { clear:both; }
#middle {float:left;width: 40%;border-right: 1px solid black;border-left: 1px solid black;display: inline-block;}
Working CODEPEN
Or you can do this :
put right and bot section in a new div
the new div should have the right styles as a class style = .right so you can keep the #right section style
take out borders, floats, and #right and #bot
Look at the result there :
http://lespointscom.com/a/misc/demo/2016_06_21/question_2/assign7.html
changed HTML
<div class="right">
<section id="right">
<h1 id="gain">Gainful Employment Information</h1>
<p>
The U.S. Department of Education requires colleges to disclose a variety of information for any financial
aid eligible program that <q>prepares students for gainful employment in a recognized occupation.</q> The information provided
here describes the graduation rates, the median debt of students who
completed the program and other important information regarding gainful employment for the latest completed academic year (as of July 1).
</p>
<br>
<p style="font-size: 13px">— US Labor Department</p>
</section>
<section id="bot">
<video height="260" width="323">
<source src="http://landonsimmons.altervista.org/School/assign7/vid/a1.mp4">
</video>
</section>
</div>
changed CSS
#bot {
/*float: right;
border-top: 1px solid black;
border-right: 1px solid black;
border-left: 1px solid black;
width: 38%;*/
display: inline-block;
vertical-align: sub;
}
#right {
/*border-bottom: 1px solid black;
border-right: 1px solid black;
border-left: 1px solid black;
width: 38%;*/
display: inline-block;
/*float: right;*/
}

Making a website for class, a background image is higher than what I need?

In my CSS, the redbar.png image is going higher than it needs to be (located in #container). It's going over my horizontal nav and shouldn't be and I'm bot entirely sure how to get it to go away.. Any tips would be greatly appreciated!
Here is the website with the issue : http://cit.macc.edu/~nduncan/tut4/case2/redball.htm
Here is my HTML code.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Red Ball Pizza</title>
<script src="modernizr-1.5.js"></script>
<link href="pizza.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<header><img src="rblogo.png" alt="Red Ball Pizza" /></header>
<nav class="horizontal">
<ul>
<li>Home</li>
<li>Menu</li>
<li>Locations</li>
<li>Catering</li>
<li>About Us</li>
</ul>
</nav>
<nav class="vertical">
<ul>
<li>Pizza</li>
<li>Salad</li>
<li>Pasta</li>
<li>Sandwiches</li>
<li>Appetizers</li>
<li>Pocket Pizzas</li>
<li>Fish & Shrimp</li>
<li>Chicken & Wings</li>
<li>Beverages</li>
<li>Dessert</li>
<li>Catering</li>
<li>Download Menu</li>
<li>Catering Menu</li>
</ul>
</nav>
<section id="main">
<img src="toppings.png" alt="" />
<p>At Red Ball Pizza, we want to satisfy every appetite. That's
why our menu contains a variety of different items. With
so many choices, everyone's favorites are available!
</p>
<p>
Red Ball Pizza is NOT a franchise, a chain, or a corporation.
It is 100% locally owned and operated. Red Ball Pizza is
devoted to providing the highest quality and the best service
possible. Our only goal is to provide you with a great
pizza … EVERY TIME!
</p>
<div class="coupon">
<h1>Classic Combo</h1>
<p>16" 1-Topping Pizza
& a 2-Liter of Your Choice
For Only $14.99
</p>
<p>Expires 3/14</p>
</div>
<div class="coupon">
<h1>Pizza & Stix</h1>
<p>16" Specialty Pizza
Reg. Cheese Stix & a 2-Liter
For Only $21.99
</p>
<p>Expires 3/14</p>
</div>
<div class="coupon">
<h1>1/2 Price</h1>
<p>Buy any 16" Specialty Pizza
at Reg. Price & Get a 2nd
Pizza For Half Price
</p>
<p>Expires 3/14</p>
</div>
<div class="coupon">
<h1>Pizza & Wings</h1>
<p>14" 2-Topping Pizza
& 12 Wings
For Only $15.99
</p>
<p>Expires 3/31</p>
</div>
<div class="coupon">
<h1>$3.00 Off</h1>
<p>Get $3.00 Off
any 16" Pizza at
Menu Price
</p>
<p>Expires 3/31</p>
</div>
<div class="coupon">
<h1>Sub Dinner</h1>
<p>1 Toasted Sub & Chips
& 1 20oz Soda
For Only $6.99
</p>
<p>Expires 3/31</p>
</div>
</section>
<aside>
<h1>Pizza Pizzazz</h1>
<ul>
<li>93% of Americans eat pizza at least once a month.</li>
<li>Mozzarella was originally made from the milk of Indian
water buffalo in the 7th century.</li>
<li>75 acres of cheese is eaten every day.</li>
<li>23 pounds of cheese is eaten every year by the average
person.</li>
<li>The tomato was brought back to Italy by Spaniards returning
from Mexico in the 16th century.</li>
<li>The busiest night for take-out pizza orders is Halloween.</li>
<li>The first pizzeria opened in 1830 in Naples, Italy. </li>
</ul>
</aside>
<footer>
<address>
Red Ball Pizza •
811 Beach Drive •
Ormond Beach, FL 32175 •
(386) 555 - 7499
</address>
</footer>
</div>
</body>
</html>
And here is my CSS. Problem lies in #container.
header, section, aside, footer, nav {
display: block;
}
/* body styles */
body {
background-color: red;
font-family: Verdana, Geneva, sans-serif;
padding: 0px;
margin: 0px;
}
#container {
width: 1000px;
margin-top: 0px;
margin-bottom: 0px;
margin-left: auto;
margin-right: auto;
border-left: 1px solid black;
border-right: 1px solid black;
background: white url(redbar.png) top left repeat-y;
}
#container header {
background-color: white;
height: 100px;
}
#container nav.horizontal {
height: 70px;
width: 100%;
background-color: white;
}
#container nav.horizontal ul li{
background-color: white;
font-size: 16px;
height: 50px;
line-height: 50px;
width: 180px;
display: block;
float: left;
margin-left: 5px;
margin-right: 5px;
text-align: center;
}
#container nav.horizontal ul li a{
display: block;
background-color: red;
color: white;
text-decoration: none;
border-radius: 30px / 25px;
}
#container nav.horizontal ul li a:hover {
background-color: rgb(255,101,101);
color: black;
}
#container nav.vertical {
float: left;
clear: left;
width: 200px;
}
#container nav.vertical ul li {
list-style-type: none;
text-indent: 20px;
margin-top: 20px;
margin-bottom: 20px;
}
#container nav.vertical ul li a {
color: white;
text-decoration: none;
}
#container nav.vertical ul li a:hover {
color: black;
}
#main {
background-color: rgb(255,211,211);
float: left;
width: 600px;
}
#main p {
font-size: 20px;
margin: 15px;
}
#main img{
float: right;
margin: 15px;
width: 350px;
border-bottom-left-radius: 350px;
}
#main div.coupon {
border: 5px dashed black;
float: left;
width: 170px;
height: 150px;
margin-top: 20px;
margin-bottom: 20px;
margin-left: 10px;
margin-right: 10px;
background-image: url(slice.png), url(notice.png);
background-position: center, bottom right;
background-repeat: no-repeat;
background-color: white;
}
#main div.coupon h1 {
color: white;
background-color: rgb(192,0,0);
font-size: 16px;
letter-spacing: 2px;
text-align: center;
height: 25px;
font-variant: small-caps;
}
#main div.coupon p{
font-size: 14px;
text-align: center;
margin: 5px;
}
aside {
float: left;
width: 200px;
}
aside h1 {
color: rgb(192,0,0);
font-size: 20px;
letter-spacing: 2px;
font-weight: normal;
text-align: center;
}
aside ul li {
background-color: rgb(255,135,135);
border-radius: 5px;
color: black;
list-style-type: none;
margin: 10px;
padding: 5px;
}
footer {
margin-left: 200px;
clear: left;
}
footer address {
border-top: 1px solid red;
color: red;
font-size: 10px;
font-style: normal;
text-align: center;
margin-top: 25px;
padding-bottom: 20px;
}
#container nav.horizontal {
margin-top: -16px;
}
Add this to CSS.
Ok, here we go, just because I love you. I think the problem you describe is being caused by the ul element inside of your horizontal class div. By default browsers will give uls padding/margin. All I had to do to fix this was set .horizontal ul {margin:0; padding: 0;}.
you could clear the nav by adding the following
container nav.horizontal {
...
overflow: auto;
then you probably want to add the appropriate margin / padding such as margin-bottom: 16px to get inline with the margin on the ul.
Also, you should look into css resets. I didn't see any here and they'll make you life easier.