Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialGregory Seccomb
Front End Web Development Techdegree Student 1,854 PointsNot sure how to use clearfix, have tried couple of times.
I am working on the final project for unit 2 and there are probably many things wrong with my code, but for now i would like to know how to make sure the footer and header aren't entirely consuming the main
html {
font-family: monospace;
}
header {
background-color: rgb(248, 248, 248);
font-family: Arial;
padding: 20px 0px;
}
body {
margin: 0px 0px 0px 0px;
}
footer {
background-color: rgb(248, 248, 248);
padding: 20px 0px;
}
/* -------- Navigation Bar -------- */
.nav-bar li {
font-family: bold, Arial;
background-color: rgb(255, 255, 255);
padding: 10px 0px;
margin: 5px 5%;
width: 90%;
}
.nav-main {
padding: none;
margin: none;
}
.nav-bar {
width: 100%;
padding: 0px;
text-align: center;
list-style: none;
font-weight: bold;
}
/* -------- Links and Link Settings -------- */
a {
text-decoration: none;
color: inherit;
}
a :active {
text-decoration: none;
}
/* -------- General Text info -------- */
h1 {
text-align: center;
padding: 10px 0px 10px 0px;
margin: 0;
}
h2 {
text-align: center;
padding-top: 10px;
padding-bottom: 10px;
margin: 30px 0px;
}
h3 {
text-align: center;
padding-top: 10px;
padding-bottom: 10px;
margin: 25px 0px;
}
p {
text-align: center;
padding: 15px 15px;
color: rgb(99, 99, 99);
font-size: 1rem;
}
/* -------- Class/ID --------- */
.profile {
width: 70%;
margin: 10px 15%;
}
img {
width: 80%;
margin: 0px 10%;
}
.intro {
font-weight: normal;
padding-bottom: 15px;
}
/* -------- Media -------- */
@media (min-width: 321PX) {
p {
font-size: 2.0rem;
}
.nav-bar {
margin: 0px;
}
.nav-bar li {
display: inline;
margin: 0px 10px;
background-color: rgb(248, 248, 248);
}
.img {
width: 20%;
}
section {
width: 50%;
float: left;
}
}
while using this exact code the main is practically non existent
1 Answer
Steven Parker
231,248 PointsWhen posting code to the forum, use Markdown formatting to preserve the appearance, or share the entire workspace by making a snapshot and posting the link to it.
It's also helpful to provide a link the course page you are working with.