Only want to display 4 divs in a row rather than 5 - html

What I need is for only 4 boxes in each row with 3 rows total. Right now it's displaying 5,5,2. I had it working correctly but after adding some code I did something to mess it up. Any help would be appreciated.
Here is a link to see my current code displayed. http://bakersfieldtopagents.com/zipcode-search/.
<style>
.title {font-size:40px; text-align:center;}
.zipcodebox { display:inline-block; vertical-align:top;}
.zipcodeboxxtra { display:inline; z-index:1; position:relative; margin-top:-20px; float:right; margin-right:107px; vertical-align:top;}
.zipcode {color:#FFFFFF; font-size:60px; z-index:2; position: absolute; margin-left:80px; margin-top:55px;
-ms-transform: rotate(25deg); /* IE 9 */
-webkit-transform: rotate(25deg); /* Chrome, Safari, Opera */
transform: rotate(25deg);}
.zipcodeother {color:#FFFFFF; font-size:60px; z-index:2; position: absolute; margin-left:30px; margin-top:55px;
-ms-transform: rotate(25deg); /* IE 9 */
-webkit-transform: rotate(25deg); /* Chrome, Safari, Opera */
transform: rotate(25deg);}
.zipcodeboximage img {height:100%; width:100%; max-height:200px; max-width:300px; padding-right:10px; padding-left:10px; z-index:1; position: relative;}
.zipcodeboxtitle {background-color:#0F0A42; color:#FFFFFF; line-height: 1; font-size: 1.6em; text-align:center; font-family: sans-serif; max-width:280px; width:100%; margin-top:0px; margin-left:0px; padding:10px;}
.zipcodeboxtitle a {color:#FFFFFF;}
.zipcodeboxtitlextra1 a {background-color:#0F0A42; color:#FFFFFF; line-height: 1; font-size: 1.6em; text-align:center; font-family: sans-serif; width:280px; padding:10px; display:block; border-bottom: 1px solid #000000;}
.zipcodeboxtitlextra2 a {background-color:#0F0A42; color:#FFFFFF; line-height: 1; font-size: 1.6em; text-align:center; font-family: sans-serif; width:280px; padding:10px; display:block; border-bottom: 1px solid #000000;}
.zipcodeboxtitlextra3 a {background-color:#0F0A42; color:#FFFFFF; line-height: 1; font-size: 1.6em; text-align:center; font-family: sans-serif; width:280px; padding:10px; display:block; border-bottom: 1px solid #000000;}
.zipcodeboxtitlextra4 a {background-color:#0F0A42; color:#FFFFFF; line-height: 1; font-size: 1.6em; text-align:center; font-family: sans-serif; width:280px; padding:10px; display:block;}
</style>
<div class="title">Search Homes By Zipcode</div>
<center>
<div class="zipcodebox">
<div class="zipcode">93312</div>
<div class="zipcodeboximage"><img src="" alt="zipcode"></div>
<div class="zipcodeboxtitle"><a href="">AREA TITLE</div>
</div>
<div class="zipcodebox">
<div class="zipcode">93314</div>
<div class="zipcodeboximage"><img src="" alt="zipcode"></div>
<div class="zipcodeboxtitle"><a href="">AREA TITLE</div>
</div>
<div class="zipcodebox">
<div class="zipcode">93311</div>
<div class="zipcodeboximage"><img src="" alt="zipcode"></div>
<div class="zipcodeboxtitle"><a href="">AREA TITLE</div>
</div>
<div class="zipcodebox">
<div class="zipcode">93313</div>
<div class="zipcodeboximage"><a href=""><img src="" alt="zipcode"></div>
<div class="zipcodeboxtitle"><a href="">AREA TITLE</div>
</div>
<div class="zipcodebox">
<div class="zipcode">93309</div>
<div class="zipcodeboximage"><img src="" alt="zipcode"></div>
<div class="zipcodeboxtitle"><a href="">AREA TITLE</div>
</div>
<div class="zipcodebox">
<div class="zipcode">93301</div>
<div class="zipcodeboximage"><img src=""></div>
<div class="zipcodeboxtitle"><a href="">AREA TITLE</div>
</div>
<div class="zipcodebox">
<div class="zipcode">93304</div>
<div class="zipcodeboximage"><img src="" alt="zipcode"></div>
<div class="zipcodeboxtitle"><a href="">AREA TITLE</div>
</div>
<div class="zipcodebox">
<div class="zipcode">93308</div>
<div class="zipcodeboximage"><img src="" alt="zipcode"></div>
<div class="zipcodeboxtitle"><a href="">AREA TITLE</div>
</div>
<div class="zipcodebox">
<div class="zipcode">93306</div>
<div class="zipcodeboximage"><img src="http://bakersfieldtopagents.com/wp-content/uploads/2016/08/cityimage.jpg" alt="zipcode"></div>
<div class="zipcodeboxtitle"><a href="">AREA TITLE</div>
</div>
<div class="zipcodebox">
<div class="zipcode">93305</div>
<div class="zipcodeboximage"><img src="" alt="zipcode"></div>
<div class="zipcodeboxtitle"><a href="">AREA TITLE</div>
</div>
<div class="zipcodebox">
<div class="zipcode">93307</div>
<div class="zipcodeboximage"><img src="" alt="zipcode"></div>
<div class="zipcodeboxtitle">AREA TITLE</div>
</div>
<div class="zipcodebox">
<div class="zipcodeother">Other Areas</div>
<div class="zipcodeboximage"><img src="" alt="zipcode"></div>
<div class="zipcodeboxtitlextra1">AREA TITLE</div>
<div class="zipcodeboxtitlextra2">AREA TITLE</div>
<div class="zipcodeboxtitlextra3">AREA TITLE</div>
<div class="zipcodeboxtitlextra4">AREA TITLE</div>
</div>
<div class="title">Search Homes By Zipcode</div>
</center>

Because of this property set to zipcodebox class : "display:inline-block;"
Number of divs in a row will change according to the screen resolution and size.
If you want to have fixed number of divs in each row then do :
Then you need to define width of zipcodebox in percentage:
eg: width : 20%
PS: It will not be responsive.

I fixed this by simply adding .container {max-width:95%;} to the css and a container div to the html. It works and is responsive.

Related

color overlay images styling effect with text

im trying to create a overlay color to my images products, basically the overlay color will appear when i make hover to the images, but isnt working.
The idea is when i pass the mouse over the images a transparecy the title and price appears with the overlay color
Here is my code:
html:
<!-- List of products -->
<div id="products" class="row list-group">
<div class="item col-xs-4 col-lg-4">
<div class="thumbnail">
<img class="group list-group-image" src="images/products/1.png" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
Product title</h4>
<div class="row go-bottom">
<div class="col-xs-12">
<p class="price">
80 € / 120 €</p>
</div>
</div>
</div>
</div>
</div>
<div class="item col-xs-4 col-lg-4">
<div class="thumbnail">
<img class="group list-group-image" src="images/products/1.png" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
Product title</h4>
<div class="row go-bottom">
<div class="col-xs-12">
<p class="price">
80 € / 120 €</p>
</div>
</div>
</div>
</div>
</div>
<div class="item col-xs-4 col-lg-4">
<div class="thumbnail overlay">
<img class="group list-group-image" src="images/products/1.png" alt="" />
<div class="caption">
<h4 class="group inner list-group-item-heading">
Color Gold
</h4>
<div class="row go-bottom">
<div class="col-xs-12">
<p class="price">
80 € / 120 €</p>
</div>
</div>
</div>
</div>
</div>
</div>
css:
.thumbnail:after {
content:'\A';
position:absolute;
width:100%; height:100%;
top:0; left:0;
background:rgba(0,0,0,0.6);
opacity:0;
transition: all 0.5s;
-webkit-transition: all 0.5s;
}
.thumbnail:hover:after {
opacity:1;
}
.list-group-item:hover{
background:rgba(0,0,0,.7);
}
.shop-products .item .thumbnail{
border:none;
padding:0;
position: relative;
}
.shop-products .item .thumbnail .caption{
position: absolute;
bottom:0;
width: 100%;
height: 100%;
text-align: center;
}
h4.list-group-item-heading{
text-transform: uppercase;
font-weight: bold;
color:red;
letter-spacing: 3px;
}
.shop-products .item .thumbnail .caption .price{
color:red;
font-size:16px;
letter-spacing: 3px;
}
.go-bottom{
bottom:0px;
position: absolute;
width: 100%;
}
I'm not able to find the class list-group-item inside your code.
the caption should have the background-color.
.shop-products .item .thumbnail .caption{
position: absolute;
bottom:0;
left:0;
width: 100%;
height: 100%;
text-align: center;
display:none;
background:rgba(0,0,0,.7);
}
.shop-products .item .thumbnail:hover .caption{
display:block;
}

overflow property using css

I tried to use property overflow-x:scroll in css property but it does not work at all but overflow-y:scroll works in the same div. I want to use overflow for scrolling images horizontally in one specific div.
Heres my code:
html:
<div class="inner-images">
<div class="imageHolder">
<img src="images/interior2.png">
</div>
</div>
<div class="inner-images">
<div class="imageHolder">
<img src="images/house.png">
</div>
</div>
<div class="inner-images">
<div class="imageHolder">
<img src="images/house.png">
</div>
</div>
<div class="inner-images">
<div class="imageHolder">
<img src="images/house.png">
</div>
</div>
<div class="inner-images">
<div class="imageHolder">
<img src="images/house.png">
</div>
</div>
<div class="inner-images">
<div class="imageHolder">
<img src="images/house.png">
</div>
</div>
<div class="inner-images">
<div class="imageHolder">
<img src="images/house.png">
</div>
</div>
<div class="inner-images">
<div class="imageHolder">
<img src="images/house.png">
</div>
</div>
</div>
css:
.int-images{
height:85px;
overflow:scroll;
.inner-images{
padding:0px 32px;
.imageHolder{
img{
height:85px;
width:85px;
#include box-shadow(0px 1px 4px rgba(0,0,0,0.5));
display:block;
float:left;
margin-right:15px;
}
}
}
}
How about this?
.int-images {
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
.inner-images {
display: inline-block;
padding:0px 32px;
margin-right:15px;
.imageHolder {
img{
height: 85px;
width: 85px;
#include box-shadow(0px 1px 4px rgba(0,0,0,0.5));
}
}
}
}
fiddle
Try this
.int-images{
overflow:scroll;
white-space:nowrap;
}
.imageHolder img{
height:85px;
width:85px;
#include box-shadow(0px 1px 4px rgba(0,0,0,0.5));
display:inline-block;
margin-right:15px;
}
<!-- language: lang-html -->
<div class="int-images">
<div class="inner-images">
<div class="imageHolder">
<img src="images/interior1.png">
<img src="images/interior2.png">
<img src="images/house.png">
<img src="images/house.png">
<img src="images/house.png">
<img src="images/house.png">
<img src="images/house.png">
<img src="images/house.png">
<img src="images/house.png">
</div>
</div>
</div>
<!-- end snippet -->

How do I center one div to the bottom and make another realizable one in the center?

So I'm trying to create a div that displays and image and has a title of the image at the bottom. The image should be have enough room so that it isn't stretched and look weird.Then I want to take that div and reproduce it over and over for as many images as I have.
I drew and image of what I'm trying! to describe I hope you guys and understand it.
This is the code I have so far. I know its not a lot but I'm a little lost.
.box{
height:250px;
width:200px;
margin-top:10px;
margin-right:15px;
margin-left:15px;
margin-bottom:10px;
float:left;
background-color:yellow;
}
.photo-div{
height:50px;
width:50px;
background-color:blue;
}
.title-wrap{
height:40px;
width: 200px;
background:pink;
}
<div class="box">
<div class="photo-div">
</div>
<div class="title-wrap">
</div>
</div>
Looking for something like this?
.box{
height:250px;
width:200px;
margin-top:10px;
margin-right:15px;
margin-left:15px;
margin-bottom:10px;
float:left;
background-color:yellow;
}
.row{
height:70px;
width:200px;
display: inline;
}
.column{
height:70px;
width:50px;
display: inline;
float:left;
}
.photo-div{
height:50px;
width:50px;
background-color:blue;
}
.title-wrap{
height:20px;
width: 50px;
background:pink;
text-align: center;
}
<div class="box">
<div class="row">
<div class="column">
<div class="photo-div">
<img src="https://cdn4.iconfinder.com/data/icons/pretty_office_3/48/Globe.png"/>
</div>
<div class="title-wrap">IMG</div>
</div>
<div class="column">
<div class="photo-div">
<img src="https://cdn4.iconfinder.com/data/icons/pretty_office_3/48/Globe.png"/>
</div>
<div class="title-wrap">IMG</div>
</div>
<div class="column">
<div class="photo-div">
<img src="https://cdn4.iconfinder.com/data/icons/pretty_office_3/48/Globe.png"/>
</div>
<div class="title-wrap">IMG</div>
</div>
<div class="column">
<div class="photo-div">
<img src="https://cdn4.iconfinder.com/data/icons/pretty_office_3/48/Globe.png"/>
</div>
<div class="title-wrap">IMG</div>
</div>
</div>
<div class="row">
<div class="column">
<div class="photo-div">
<img src="https://cdn4.iconfinder.com/data/icons/pretty_office_3/48/Globe.png"/>
</div>
<div class="title-wrap">IMG</div>
</div>
<div class="column">
<div class="photo-div">
<img src="https://cdn4.iconfinder.com/data/icons/pretty_office_3/48/Globe.png"/>
</div>
<div class="title-wrap">IMG</div>
</div>
<div class="column">
<div class="photo-div">
<img src="https://cdn4.iconfinder.com/data/icons/pretty_office_3/48/Globe.png"/>
</div>
<div class="title-wrap">IMG</div>
</div>
<div class="column">
<div class="photo-div">
<img src="https://cdn4.iconfinder.com/data/icons/pretty_office_3/48/Globe.png"/>
</div>
<div class="title-wrap">IMG</div>
</div>
</div>
</div>
try this
http://jsfiddle.net/jtx16Lf2/7/
<div id="main">
<div id="box">
<script>
for(var i=0;i<3;i++){
var image = document.createElement('div');
var titleBar = document.createElement('div');
image.className = "photo-div";
titleBar.className = "title-wrap";
document.getElementById('box').appendChild(image);
document.getElementById('box').appendChild(titleBar);
}
</script>
</div>
</div>
CSS
#box{
height:750px;
width:200px;
margin-top:10px;
margin-right:15px;
margin-left:15px;
margin-bottom:10px;
float:left;
background-color:yellow;
position:relative;
}
.photo-div{
height:50px;
width:50px;
background-color:blue;
margin-left:35%;
margin-top:20%;
float:left;
position:relative;
}
.title-wrap{
height:40px;
width: 200px;
background:pink;
margin-top:105%;
position:relative;
}

PureCSS vertical center/middle div elements

I'm trying to center my div elements (PureCSS) to build a grid like this (100% width and height, no scrollbar):
Now I need to align all the elements vertically and horizontally centered.
Here is my HTML Code:
<div class="pure-g" style="height:100%;">
<div class="pure-u-1-5" style="height:90%;">
<div class="pure-g" style="height:50%;">
<div class="pure-u-1-1 visible"><img src="img/logo.png" alt="Logo" style="width:100%;"></div>
<div class="pure-u-1-1 visible"><img src="img/ad.png" alt="AD" style="width:100%;"></div>
</div>
</div>
<div class="pure-u-4-5" style="height:90%;">
<div class="pure-g" style="height:100%;">
<div class="pure-u-1-1" style="height:20%;">
<div class="pure-g" style="height:100%;">
<div class="pure-u-1-6 news"><p>PIC</p></div>
<div class="pure-u-1-3 news"><p>TITLE</p></div>
<div class="pure-u-5-12 news"><p>DESCRIPTION</p></div>
<div class="pure-u-1-12 news"><p>ID</p></div>
</div>
</div>
<div class="pure-u-1-1" style="height:20%;">
<div class="pure-g" style="height:100%;">
<div class="pure-u-1-6 news"><p>PIC</p></div>
<div class="pure-u-1-3 news"><p>TITLE</p></div>
<div class="pure-u-5-12 news"><p>DESCRIPTION</p></div>
<div class="pure-u-1-12 news"><p>ID</p></div>
</div>
</div>
<div class="pure-u-1-1" style="height:20%;">
<div class="pure-g" style="height:100%;">
<div class="pure-u-1-6 news"><p>PIC</p></div>
<div class="pure-u-1-3 news"><p>TITLE</p></div>
<div class="pure-u-5-12 news"><p>DESCRIPTION</p></div>
<div class="pure-u-1-12 news"><p>ID</p></div>
</div>
</div>
<div class="pure-u-1-1" style="height:20%;">
<div class="pure-g" style="height:100%;">
<div class="pure-u-1-6 news"><p>PIC</p></div>
<div class="pure-u-1-3 news"><p>TITLE</p></div>
<div class="pure-u-5-12 news"><p>DESCRIPTION</p></div>
<div class="pure-u-1-12 news"><p>ID</p></div>
</div>
</div>
<div class="pure-u-1-1" style="height:20%;">
<div class="pure-g" style="height:100%;">
<div class="pure-u-1-6 news"><p>PIC</p></div>
<div class="pure-u-1-3 news"><p>TITLE</p></div>
<div class="pure-u-5-12 news"><p>DESCRIPTION</p></div>
<div class="pure-u-1-12 news"><p>ID</p></div>
</div>
</div>
</div>
</div>
<div class="pure-u-1-1 marquee">NEWSTICKER (jQuery marquee)</div>
</div>
And here is my CSS:
*{font-family:'Raleway', sans-serif;}
h1, h2, h3, p {color:#fff;}
body, html {
overflow:hidden;
height: 100%;
padding:0px;
}
div {
/*
border:1px solid;
margin:-1px;
*/
}
.news {
height:100%;
position:relative;
background:#444; background:rgba(0,0,0,.5);
margin:0px 0px 0px 0px;
border-radius:0px;
margin-bottom:0px;
}
.visible {
height:100%;
position:relative;
background:#444; background:rgba(0,0,0,.5);
margin:0px 0px 0px 0px;
border-radius:0px;
margin-bottom:0px;
}
.news p {
text-align: center;
vertical-align: middle;
margin:15px;
height:100%;
}
.marquee {
height:100%;
position:relative;
background:#444; background:rgba(0,0,0,.5);
margin:0px 0px 0px 0px;
padding:0px;
border-radius:0px;
margin-bottom:0px;
font-family:'Raleway', sans-serif;
color:#fff;
}
The result is this:
I read some threads for this problem but none of them seemed to work for me getting the div elements vertically centered.
I would also be glad if any of you finds some code improvement since this is my first time building a grid like this.
Thanks in advance
I'd keep it simple, no 3rd party.
This the basic frame work I'd use.
I would not make the images scalable. Too much work for those wimpy ARM processors in smartphones. I'd fix the width of the left column and pic div
I put temporary colored borders on the divs.
CSS
#col1{width:14%;position:absolute;top:0;left:0;}
#col2{width:84%;position:absolute;top:0;right:0;}
#logo{width:200px;height:200px;}
.row{width:100%;border:4px solid #000;display:inline-block;}
.pic{width:15%;border:1px solid #00f;display:inline-block;}
.title{width:30%;border:1px solid #f00;display:inline-block;}
.desc{width:40%;border:1px solid #0ff;display:inline-block;}
.id{width:10%;border:1px solid #f0f;display:inline-block;}
#marquee{height:6em;}<br>
HTML
<div id="col1">
<div id="logo"><img src="img/logo.png" alt="Logo"></div>
<div id="ad"><img src="img/ad.png" alt="AD" ></div>
</div>
<div id="col2">
<div class="row"><div class="pic"><p>PIC</p></div><div class="title"><p>TITLE</p></div><div class="desc"><p>DESCRIPTION</p></div><div class="id"><p>ID</p></div></div>
<div class="row"><div class="pic"><p>PIC</p></div><div class="title"><p>TITLE</p></div><div class="desc"><p>DESCRIPTION</p></div><div class="id"><p>ID</p></div></div>
<div class="row"><div class="pic"><p>PIC</p></div><div class="title"><p>TITLE</p></div><div class="desc"><p>DESCRIPTION</p></div><div class="id"><p>ID</p></div></div>
<div class="row"><div class="pic"><p>PIC</p></div><div class="title"><p>TITLE</p></div><div class="desc"><p>DESCRIPTION</p></div><div class="id"><p>ID</p></div></div>
<div class="row"><div class="pic"><p>PIC</p></div><div class="title"><p>TITLE</p></div><div class="desc"><p>DESCRIPTION</p></div><div class="id"><p>ID</p></div></div>
<div class="row"><div class="pic"><p>PIC</p></div><div class="title"><p>TITLE</p></div><div class="desc"><p>DESCRIPTION</p></div><div class="id"><p>ID</p></div></div>
<div class="row"><div class="pic"><p>PIC</p></div><div class="title"><p>TITLE</p></div><div class="desc"><p>DESCRIPTION</p></div><div class="id"><p>ID</p></div></div>
<div class="row"><div id="marquee">Breaking News</div></div></div>
</div>
This is the CSS / HTML I use to center stuff vertically and horizontally:
<html>
<head>
<style type="text/css" media="screen">
.center-outter {
display: table;
position: absolute;
height: 100%;
width: 100%;
}
.center-middle {
display: table-cell;
vertical-align: middle;
}
.center-inner {
margin-left: auto;
margin-right: auto;
/*width:200px;*/
}
.whatever {
width:200px;
background:#efefef;
}
</style>
</head>
<body>
<div class="center-outter">
<div class="center-middle">
<div class="center-inner whatever">
<div>This should be centered vertically and horizontally</div>
</div>
</div>
</div>
</body>
</html>

DIV mysteriously being placed behind other DIVs?

sorry for the probably dumb question...
My footer div is being placed behind the divs recentWinnersContainer and recentWinnersMapContainer, even though it should be underneath them.
Here is my jsFiddle and code.
http://jsfiddle.net/gjtd8tw7/
HTML
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
<link href='http://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="mainContainer">
<div id="navContainer">
<div id="logoImgContainer">
<img src="logo.png">
</div>
<p id="navLinks">Prizes Winners FAQ Contact Us</p>
</div>
<div id="slideShowContainer">
<img src="slide1.jpg">
</div>
<div id="offersContainer">
<div class="offersArrowImg">
<img src="leftOffersArrow.jpg">
</div>
<div class="offerContainer">
<img class="offerImg" src="offer1.jpg">
<div class="offerBtn">Offer Name</div>
</div>
<div class="offerContainer">
<img class="offerImg" src="offer2.jpg">
<div class="offerBtn">Offer Name</div>
</div>
<div class="offerContainer">
<img class="offerImg" src="offer3.jpg">
<div class="offerBtn">Offer Name</div>
</div>
<div class="offerContainer">
<img class="offerImg" src="offer4.jpg">
<div class="offerBtn">Offer Name</div>
</div>
<div class="offersArrowImg">
<img src="rightOffersArrow.jpg">
</div>
</div>
<div id="recentWinnersHeadlineContainer">
<p id="recentWinnersHeadline">Recent Winners</p>
</div>
<div id="recentWinnersContainer">
<div class="recentWinnerContainer">
<div class="recentWinnerImg"><img src="recentWinner3.jpg"></div>
<p class="recentWinnerName">Firstname Lastname</p> entered to win a <p class="recentWinnerPrizeName">Prize Name</p>
</div>
<div class="recentWinnerContainer">
<div class="recentWinnerImg"><img src="recentWinner3.jpg"></div>
<p class="recentWinnerName">Firstname Lastname</p> entered to win a <p class="recentWinnerPrizeName">Prize Name</p>
</div>
<div class="recentWinnerContainer">
<div class="recentWinnerImg"><img src="recentWinner3.jpg"></div>
<p class="recentWinnerName">Firstname Lastname</p> entered to win a <p class="recentWinnerPrizeName">Prize Name</p>
</div>
<div class="recentWinnerContainer">
<div class="recentWinnerImg"><img src="recentWinner3.jpg"></div>
<p class="recentWinnerName">Firstname Lastname</p> entered to win a <p class="recentWinnerPrizeName">Prize Name</p>
</div>
<div class="recentWinnerContainer">
<div class="recentWinnerImg"><img src="recentWinner3.jpg"></div>
<p class="recentWinnerName">Firstname Lastname</p> entered to win a <p class="recentWinnerPrizeName">Prize Name</p>
</div>
</div>
<div id="recentWinnersMapContainer">
Map
</div>
<div id="footer">
Footer
</div>
</div>
</body>
</html>
CSS
* {
margin:0px;
padding:0px;
}
#mainContainer {
width:1000px;
margin:0 auto 0 auto;
}
#navContainer {
width:1000px;
height:75px;
background-color:#3299bb;
}
#logoImgContainer {
float:left;
margin:13px 0px 0px 20px;
}
#navLinks {
float:right;
margin: 15px 20px 0 0;
font-family: 'Roboto Slab', serif;
font-size:30px;
color:#ffffff;
}
#slideShowContainer {
width:1000px;
height:380px;
background-color:#000000;
}
#offersContainer {
width:1000px;
height:188px;
background-color:blue;
}
.offerContainer {
width:227px;
height:188px;
float:left;
background-color:red;
}
#offerImg {
width:227px;
height:146px;
}
.offersArrowImg {
float:left;
}
#recentWinnersHeadlineContainer {
width:1000px;
height:60px;
background-color:#ff9900;
}
#recentWinnersContainer {
width:495px;
height:320px;
float:left;
margin-right:10px;
background-color:yellow;
}
#recentWinnersHeadline {
}
.recentWinnerContainer {
height:50px;
}
.recentWinnerImg {
display:inline-block;
}
.recentWinnerName {
display:inline-block;
}
.recentWinnerPrizeName {
display:inline-block;
}
#recentWinnersMapContainer {
width:495px;
height:320px;
float:left;
background-color:green;
}
#footer {
width:1000px;
height:60px;
background-color:grey;
}
Change the #footer in your css file to this:
#footer {
width:1000px;
height:60px;
background-color:grey;
<!-- I ADDED THESE TWO LINES TO YOUR #FOOTER SELECTOR -->
position: fixed;
bottom: 0;
}