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 trial
Ladna Meke
5,752 PointsHelp with Media Query -
This is only my second HTML project, so bear with me. I have tried so much to make it work, but I have no idea. It's totally unresponsive.
Here's the html
<!DOCTYPE html>
<head>
<meta charset="uft-8"/>
<title>Project</title>
<link rel="stylesheet" href="css/reset.css">
<link href='http://fonts.googleapis.com/css?family=Arimo:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/responsive.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="img/andela_icon.png" />
</head>
<body>
<header>
<a href="#"><img id="image" src="img/logo.png" alt="logo"/></a>
<nav>
<ul>
<li><a href="#">Search Jobseeker</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">Sign in</a></li>
</ul>
</nav>
</header>
<div id="wrapper">
<section id="section-one">
<div id="post">
<h1>Post a Job</h1>
<ul>
<li>Post your job for free.</li>
<li>It takes less than 60 second.</li>
<li>View profiles of 1000s of jobseekers</li>
<li>Detail of jobseeker are verified</li>
<li><p class="button"><a href="#">Post a Job</a></p></li>
</ul>
</div>
<br></br>
<div id="sub-section">
<ul>
<li><p>Hire Drivers, Guards, Home and Office Helper</p></li>
<li id="second-line">
<ul>
<li>Save time by Hiring Online</li>
<li><span>.</span></li>
<li>Hassle free</li>
<li><span>.</span></li>
<li>Trust Worthy Candidates</li>
</ul>
</li>
</ul>
</div>
</section >
<section id="section-two">
<h1>How it Works</h1>
<ul>
<li><img src="img/icon1.png"><p>Get Started with<p class="paragraph2">Post a Job</p></p></li>
<li><img src="img/arrow_icon.png" alt="arrow"></li>
<li><img src="img/icon3.png"><p>Submit Job <p class="paragraph2">Information</p></p></li>
<li><img src="img/arrow_icon.png" alt="arrow"></li>
<li><img src="img/icon3.png"><p>Search Jobseekers<p class="paragraph2">for Job</p></p></li>
<li><img src="img/arrow_icon.png" alt="arrow"></li>
<li><img src="img/icon4.png"><p>View their mobile<p class="paragraph2">numbers</p></p></li>
</ul>
</section>
<section id="section-three">
<h1>Looking for a Job</h1>
<ul>
<li>Create your profile for free and get SMS for new jobs</li>
<li>Find your dream job</li>
<p class="button" id="second-button"><a href="#">Get Started</a></p>
</ul>
</section>
<section id="section-four">
<h1>Our Partners</h1>
<ul>
<li><img src="img/partner1.png"/></li>
<li><img src="img/partner2.png"/></li>
<li><img src="img/partner3.png"/></li>
<li><img src="img/partner4.png"/></li>
</ul>
</section>
<footer>
<ul>
<li><a href="#">Get Background check</a></li>
<li><a href="#">Privacy Policy</a></li>
<li><a href="#">Pricing</a></li>
<li><a href="#">About us</a></li>
</ul>
</footer>
</div>
</body>
and the CSS
body {
width: auto;
height: auto;
margin: 0;
padding: 0;
font-family: 'Arimo', sans-serif;
background-color: rgba(96, 96, 103, 0.07);
}
#wrapper {
position: relative;
max-width: 1366px; /*****For Resolutions only up to 1366px***********************/
}
a {
text-decoration: none;
color: white;
}
img {
max-width: 100%;
}
header {
height: 50px;
background-color: rgba(96, 96, 103, 0.03);
}
header a {
color: #000;
margin-top: -10px;
}
nav {
float: right;
margin: 12.5px 70px 0 0;
}
nav li {
display: inline-block;
margin-left: 1.5em;
}
#section-one {
position: relative;
height: 31.25em;
background: url('../img/top_bg.jpg') no-repeat center -90px;
background-size: cover;
-webkit-background-size: cover; /************for other browsers****************/
-moz-background-size: cover; /************for other browsers****************/
-o-background-size: cover; /************for other browsers****************/
}
#image {
position: relative;
float: left;
z-index: 50;
top: 2%;
left:8%;
}
#post {
position: relative;
float: left;
top: 30%;
left: 0%;
}
#post h1 {
margin-left: 39px;
color: rgba(0,0,0,.9);
}
#post li {
margin: 5px 0 5px 0;
color: rgba(0,0,0, .8);
}
.button {
background-color: green;
padding: 5px 25px;
text-align: center;
width: 100px;
padding: 8px 20px 8px 20px;
opacity: .8;
}
#sub-section {
position: absolute;
bottom: 0;
width: 100%;
padding-bottom: 10px;
text-align: center;
color: #fff;
background: rgba(0,0,0, .85);
}
#sub-section p {
font-size: 2.2em;
font-weight: lighter;
margin-top: -0.0655em;
}
#second-line ul li {
display: inline;
margin: 0 6px 0 6px;
}
#second-line {
font-size: .9em;
margin-top: -1.5em;
margin: -1.5em 20px 0 20px;
}
span {
font-size: 1.7em;
position: relative;
bottom: 1.7px;
}
#section-two, #section-three, #section-four {
text-align: center;
background-color: rgba(96, 96, 103, 0.03);
}
#section-two li{
margin: 0 48px 0 45px;
}
#section-two p, h1 {
color: rgba(96, 96, 103, 0.3);
}
#section-two ul {
display: -webkit-flex;
-webkit-justify-content: space-between;
margin-bottom: 0;
}
#section-two h1, #section-three h1, #section-four h1 {
font-weight: 400;
}
.paragraph2 {
margin-top: -14px;
}
#section-three {
background: url('../img/blurred_bg.jpg') no-repeat center -5.625em;
background-size: cover;
padding: 40px 0;
}
#section-three ul {
margin-top: 50px;
}
#section-three li {
margin: 7px 0 7px 0;
}
#section-three h1{
color: black;
}
#second-button {
text-align: center;
margin-left: 599px;
margin-top: 50px;
padding: 8px 20px 8px 20px;
}
#section-four {
padding: 1.25em 0 1.25em 0;
background-color: white;
}
#section-four img {
width: 6.25em;
height: 6.25em;
}
#section-four ul {
margin-left: -7.53em;
}
#section-four li {
display: inline-block;
margin: 0 0.6875em 0 0.6875em;
padding: 1.875em 3.9375em 1.875em 3.9375em;
border: 1px solid rgba(96, 96, 103, .1);
}
footer li {
display: inline;
font-size: .5em;
}
footer {
background: #000;
border: 1px solid green;
opacity: .7
}
Ladna Meke
5,752 PointsI haven't created one. I just don't know how to get started
Hugo Paz
15,622 PointsThere is a css course here that tackles responsive design - here
Ladna Meke
5,752 PointsAlright, thanks for the link.
Just a footnote, my background image isn't fluid, even though I didn't set an absolute width
hum4n01d
25,493 PointsDo you have an answer to this question yet?
Hugo Paz
15,622 PointsHugo Paz
15,622 PointsHi Ladna,
I believe you posted the main.css file, could you please post the responsive.css one.