Centering an item inside Bootstrap Column - html

I have a container with three col-md-4 inside. Each column has a card layout. Everything is displaying just fine. However, if the window is resized under 992px and the columns get stacked, they float to left. At first i used:
<div align="center">
but it is not so HTML5. Any other solution did not help.
Here's all i got right now:
<div class="categories">
<div class="container">
<div class="row">
<!-- 1st card -->
<div class="col-md-4">
<div class="card">
<div class="cardoverlay">
<div class="line">
<hr>
<i class="fa lifering"></i>
<hr>
</div>
</div>
</div>
</div>
<!-- 2nd card -->
<div class="col-md-4">
<div class="card">
<div class="cardoverlay">
<div class="line">
<hr>
<i class="fa cogs"></i>
<hr>
</div>
</div>
</div>
</div>
<!-- 3rd card -->
<div class="col-md-4">
<div class="card">
<div class="cardoverlay">
<div class="line">
<hr>
<i class="fa cubes"></i>
<hr>
</div>
</div>
</div>
</div>
</div>`
.categories {
background-color: #e1e1e1;
height: auto;
text-align: center;
}
.card {
max-width: 353px;
height: 662px;
-webkit-border-radius: 5px/7px;
-moz-border-radius: 5px/7px;
border-radius: 8px/10px;
background-color: #fff;
-webkit-box-shadow: 0 2px #b8b3b3;
-moz-box-shadow: 0 2px #b8b3b3;
box-shadow: 3px #b8b3b3;
margin-top: 50px;
margin-bottom: 50px;
}
.line {
display: flex;
width: 100%;
align-items: center;
justify-content: center;
}
hr {
border: 0;
border-top: 1px solid #c2c6c7;
flex: 1;
z-index: 1;
}
.lifering:after {
font-size: 90px;
color: #d67676;
padding: 20px;
content: '\f1cd';
display: inline-block;
text-shadow: 0.7px -1px 0.7px #450c04;
}
.cogs:after {
font-size: 90px;
color: #329fdd;
padding: 20px;
content: '\f085';
display: inline-block;
text-shadow: 0.7px -1px 0.7px #000000;
}
.cubes:after {
font-size: 90px;
color: #36d7b7;
padding: 20px;
content: '\f1b3';
display: inline-block;
text-shadow: 0.7px -1px 0.7px #000000;
}
.cardoverlay {
max-width: 353px;
height: 202px;
-webkit-border-radius: 5px 5px 0 0/10px 10px 0 0;
-moz-border-radius: 5px 5px 0 0/10px 10px 0 0;
border-radius: 5px 5px 0 0/10px 10px 0 0 #f1f1f1;
background-color: #f9f9f9;
-webkit-box-shadow: 0 3px #f1f1f1;
-moz-box-shadow: 0 3px #f1f1f1;
box-shadow: 0 3px #f1f1f1;
}
Fiddle

If you add margin:50px auto; to .card in your CSS it will center align the cards. 50px will remain the margin on the top and bottom of the card and auto works to center align. New card styles would look like this:
.card {
max-width: 353px;
height: 662px;
-webkit-border-radius: 5px/7px;
-moz-border-radius: 5px/7px;
border-radius: 8px/10px;
background-color: #fff;
-webkit-box-shadow: 0 2px #b8b3b3;
-moz-box-shadow: 0 2px #b8b3b3;
box-shadow: 3px #b8b3b3;
margin:50px auto;
}

Related

How to make lines opposite each other?

Need to make lines opposite to each other, now the lines are under each other. Tried a lot of methods but nothing work, please help! Really stuck with that. See the code below and a picture that shows the desired result, idk what to do. Tried to add margin; top; bottom; padding, these methods didn't do anything.
Here's the CSS and HTML:
.crypto-card{
width: 250px;
height: 230px;
background: white;
-webkit-box-shadow: 0px 3px 8px 0px rgba(194,192,194,1);
-moz-box-shadow: 0px 3px 8px 0px rgba(194,192,194,1);
box-shadow: 0px 3px 2px 0px rgba(240,240,240,1);
border-radius: 6px;
transition: .3s;
margin-left: 15px;
margin-right: 25px;
margin-bottom: 20px;
border: 1px solid rgb(245, 245, 245);
}
.crypto-card:hover{
transform: translateY(-1px);
-webkit-box-shadow: 0px 3px 6px 2px rgba(240,240,240,1);
-moz-box-shadow: 0px 3px 6px 2px rgba(240,240,240,1);
box-shadow: 0px 3px 6px 2px rgba(240,240,240,1);
}
.crypto-card .body{
width: 100%;
border-top: 1px solid rgb(240, 240, 240);
padding: 10px;
}
.crypto-card .logo-sprite{
width: 29px;
height: 29px;
margin: 10px;
}
.crypto-symbol{
border-left: 1px solid rgb(220, 220, 220);
padding-left: 10px;
font-size: 1.3rem;
/* font-family: 'Loto', sans-serif; */
letter-spacing: 5px;
text-transform: uppercase;
/* color: #3c3c3c; */
font-weight: 500;
color: rgb(70, 70, 70);
padding-bottom: 4px;
position: relative;
top: 4px;
}
.crypto-card .price-label{
width: 100%;
text-align: left;
color: rgb(190, 190, 190);
font-weight: 500;
font-size: .8rem;
}
.crypto-card .price{
font-size: 1.5rem;
font-weight: 100;
right: -60px;
top: 4px;
text-align: right;
}
<div class="d-flex justify-content-left" style="margin-top: 10px; padding-left: 5%; padding-right: 5%;">
<div class="row" style="">
<div class="crypto-card">
<span>
<img src="https://s2.coinmarketcap.com/static/img/coins/64x64/1.png" class="logo-sprite" width="16" height="16" alt="Bitcoin">
<span class="crypto-symbol">BTC</span>
</span>
<div class="body">
<span class="price">$3865.58</span>
<div class="price-label"><span class="title">Price</span></div>
<span class="volume">$67,585,868,137</span>
</div>
</div>
But I need it similar to this
Using a display: grid would make this super easy.
Here's and example:
* {
box-sizing: border-box;
}
.container {
width: 500px;
margin: auto;
padding: 20px;
}
.card {
display: grid;
grid-template-columns: 50px auto;
grid-template-rows: 50px 200px;
border: 1px solid #eee;
border-radius: 5px;
}
.card .image {
display: block;
align-self: stretch;
justify-self: stretch;
padding: 5px;
border: 1px solid #eee;
border-top: 0;
border-left: 0;
}
.card .header {
padding: 10px;
border-bottom: 1px solid #eee;
}
.card .side {
border-right: 1px solid #eee;
white-space: nowrap;
display: flex;
align-items: center;
}
.card .side .text {
rotate: -90deg;
translate:-12px 0;
}
.card .content {
padding: 10px;
}
<div class="card">
<img
src="https://s2.coinmarketcap.com/static/img/coins/64x64/1.png"
class="image"
alt="Bitcoin"
/>
<div class="header">BTC is a scam</div>
<div class="side">
<div class="text">BIG SCAM</div>
</div>
<div class="content">content in here</div>
</div>

align a child div to bottom inside div of flex box

I have to align a child div which is inside a div of flex box container to bottom. I tried different options like setting bottom to 0 or margin-top but none of them are working.
<style>
.flex-container {
display: flex;
height: 500px;
background-color: #f1f1f1;
}
.flex-container > div {
color: white;
width: 100px;
margin: 10px;
text-align: center;
line-height: 75px;
font-size: 30px;
}
.vertical
{
box-shadow: inset 0px 4px 6px #ccc;
}
.progress {
background-color: #f5f5f5;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 2px rgb(0 0 0 / 10%);
box-shadow: inset 0px 4px 6px rgba(100,100,100,0.6);
}
.progress-bar-info {
background-color: #5bc0de;
}
.progress-bar {
box-shadow: inset 0px 4px 6px rgb(100 100 100 / 60%);
}
</style>
<div class="flex-container">
<div class= "progress vertical" >1
<div class="progress-bar progress-bar-info" style="height: 35%;">
how to align this div to bottom..... ?
</div>
</div>
</div>
You can add flex properties on flex-container>div like below:
.flex-container {
display: flex;
height: 500px;
background-color: #f1f1f1;
}
.flex-container>div {
color: red;
width: 100px;
margin: 10px;
text-align: center;
line-height: 75px;
font-size: 30px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.vertical {
box-shadow: inset 0px 4px 6px #ccc;
}
.progress {
background-color: #f5f5f5;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 2px rgb(0 0 0 / 10%);
box-shadow: inset 0px 4px 6px rgba(100, 100, 100, 0.6);
}
.progress-bar-info {
background-color: #5bc0de;
}
.progress-bar {
box-shadow: inset 0px 4px 6px rgb(100 100 100 / 60%);
}
<div class="flex-container">
<div class="progress vertical">
<div>1</div>
<div class="progress-bar progress-bar-info" style="height: 35%;">Bottom</div>
</div>
</div>

Get title and buttons for the controls to the middle of this "simon says" game

I'm working on a Simon Says game and I'm having problems putting the title and buttons from the bottom into the middle of the controls section. I've tried different css styles but the divs don't seem to move.
Specially, margin-top to move the elements closer to the middle. Right now they are at the bottom of the page. Here's what I have so far. Any help appreciated. Thanks
body {
background: url("http://cdn.backgroundhost.com/backgrounds/subtlepatterns/purty_wood.png");
font-family: 'Righteous', cursive;
color: black;
}
.container {
margin: 0 auto;
text-align: center;
}
h1 {
font-size: 70px;
}
.simonBoard {
margin: 0 auto;
/* margin-top: 100px; */
border: solid 10px black;
width: 600px;
height: 600px;
border-radius: 600px;
position: relative;
box-shadow: -10px 10px 7px 0px rgba(50, 50, 50, 0.75);
}
.pad {
margin: 0;
float: left;
position: relative;
width: 290px;
height: 290px;
z-index: 8;
border: 5px solid black;
}
.pad-green {
background-color:#0a0;
-moz-border-radius: 300px 0 0 0;
border-radius: 300px 0 0 0;
}
.pad-red {
background-color: red;
-moz-border-radius: 0 300px 0 0;
border-radius: 0 300px 0 0;
}
.pad-yellow {
background-color: yellow;
-moz-border-radius: 0 0 0 300px;
border-radius: 0 0 0 300px;
}
.pad-blue {
background-color: blue;
-moz-border-radius: 0 0 300px 0;
border-radius: 0 0 300px 0;
}
.board-controls {
display: inline-block;
border: 15px solid black;
height: 245px;
width: 245px;
border-radius: 150px;
background-color: white;
position: absolute;
z-index: 10;
top: 0; left: 0; right: 0; bottom: 0;
margin: auto;
-webkit-box-shadow: -6px 8px 5px 0px rgba(50, 50, 50, 0.75);
/* -moz-box-shadow: -6px 8px 5px 0px rgba(50, 50, 50, 0.75);
box-shadow: -6px 8px 5px 0px rgba(50, 50, 50, 0.75); */
}
<div class="container">
<div class="header">
<h1>SIMON</h1>
</div>
<div class="simonBoard">
<div class="pad pad-green"></div>
<div class="pad pad-red"></div>
<div class="pad pad-yellow"></div>
<div class="pad pad-blue"></div>
<div class="board-controls">
<div class="title">SIMON</div>
<div class="display">07</div>
<div class="start">START</div>
<div class="strict">STRICT</div>
<div class="switch">ON/OFF</div>
</div>
</div>
</div>
body {
background: url("http://cdn.backgroundhost.com/backgrounds/subtlepatterns/purty_wood.png");
font-family: 'Righteous', cursive;
color: black;
}
.container {
margin: 0 auto;
text-align: center;
}
h1 {
font-size: 70px;
}
.simonBoard {
margin: 0 auto;
/* margin-top: 100px; */
border: solid 10px black;
width: 600px;
height: 600px;
border-radius: 600px;
position: relative;
box-shadow: -10px 10px 7px 0px rgba(50, 50, 50, 0.75);
}
.pad {
margin: 0;
float: left;
position: relative;
width: 290px;
height: 290px;
z-index: 8;
border: 5px solid black;
}
.pad-green {
background-color:#0a0;
-moz-border-radius: 300px 0 0 0;
border-radius: 300px 0 0 0;
}
.pad-red {
background-color: red;
-moz-border-radius: 0 300px 0 0;
border-radius: 0 300px 0 0;
}
.pad-yellow {
background-color: yellow;
-moz-border-radius: 0 0 0 300px;
border-radius: 0 0 0 300px;
}
.pad-blue {
background-color: blue;
-moz-border-radius: 0 0 300px 0;
border-radius: 0 0 300px 0;
}
.board-controls {
display: inline-block;
border: 15px solid black;
height: 245px;
width: 245px;
border-radius: 150px;
background-color: white;
position: absolute;
z-index: 10;
top: 0; left: 0; right: 0; bottom: 0;
margin: auto;
-webkit-box-shadow: -6px 8px 5px 0px rgba(50, 50, 50, 0.75);
/* -moz-box-shadow: -6px 8px 5px 0px rgba(50, 50, 50, 0.75);
box-shadow: -6px 8px 5px 0px rgba(50, 50, 50, 0.75); */
}
<div class="container">
<div class="header">
<h1>SIMON</h1>
</div>
<div class="simonBoard">
<div class="pad pad-green"></div>
<div class="pad pad-red"></div>
<div class="pad pad-yellow"></div>
<div class="pad pad-blue"></div>
<div class="board-controls">
<div class="title">SIMON</div>
<div class="display">07</div>
<div class="start">START</div>
<div class="strict">STRICT</div>
<div class="switch">ON/OFF</div>
</div>
</div>
</div>
I did set .board-controls's position:absolute.
And set .simonBoard's position:relative.
I think it is not good answer.
I would approach it by adding another div inside your board-controls div.
As follows -
<div class="board-controls">
<div class="control-menu">
<div class="title">SIMON</div>
<div class="display">07</div>
<div class="start">START</div>
<div class="strict">STRICT</div>
<div class="switch">ON/OFF</div>
</div>
</div>
and then add the following css -
.control-menu {
position:absolute;
text-align:center;
top:0;
bottom:0;
left:0;
right:0;
margin:auto;
height:50%;
}
This will make the new control-menu div a section in its own right and then the absolute positioning will try and pull it in each direction, therefore making it sit centrally inside the board-controls.
You can adjust the height that the menu sits using the height percentage in the supplied css.
Here is a JSFiddle displaying it working.
https://jsfiddle.net/jvshu3du/1/
As each div are nested you could either individually declare and style that or you have to change positioning of .simonBoard to relative and inside .board-controls to absolute then using top, left and translate you can align .simonBoard to center of page and same .board-controls.
body {
background: url("http://cdn.backgroundhost.com/backgrounds/subtlepatterns/purty_wood.png");
font-family: 'Righteous', cursive;
color: black;
}
.container {
margin: 0 auto;
text-align: center;
}
h1 {
font-size: 70px;
}
.simonBoard {
border: solid 10px black;
width: 600px;
height: 600px;
border-radius: 600px;
box-shadow: -10px 10px 7px 0px rgba(50, 50, 50, 0.75);
position: relative;
left: 50%;
top: 50%;
transform: translate(-50%, 0);
}
.pad {
margin: 0;
float: left;
position: relative;
width: 290px;
height: 290px;
z-index: 8;
border: 5px solid black;
}
.pad-green {
background-color: #0a0;
-moz-border-radius: 300px 0 0 0;
border-radius: 300px 0 0 0;
}
.pad-red {
background-color: red;
-moz-border-radius: 0 300px 0 0;
border-radius: 0 300px 0 0;
}
.pad-yellow {
background-color: yellow;
-moz-border-radius: 0 0 0 300px;
border-radius: 0 0 0 300px;
}
.pad-blue {
background-color: blue;
-moz-border-radius: 0 0 300px 0;
border-radius: 0 0 300px 0;
}
.board-controls {
border: 15px solid black;
height: 245px;
width: 245px;
border-radius: 150px;
background-color: white;
z-index: 10;
-webkit-box-shadow: -6px 8px 5px 0px rgba(50, 50, 50, 0.75);
/* -moz-box-shadow: -6px 8px 5px 0px rgba(50, 50, 50, 0.75);
box-shadow: -6px 8px 5px 0px rgba(50, 50, 50, 0.75); */
position: absolute;
transform: translate(50%, 50%);
}
.title {
padding-top: 60px;
}
<div class="container">
<div class="header">
<h1>SIMON</h1>
</div>
<div class="simonBoard">
<div class="pad pad-green"></div>
<div class="pad pad-red"></div>
<div class="pad pad-yellow"></div>
<div class="pad pad-blue"></div>
<div class="board-controls">
<div class="title">SIMON</div>
<div class="display">07</div>
<div class="start">START</div>
<div class="strict">STRICT</div>
<div class="switch">ON/OFF</div>
</div>
</div>
</div>
First of all, the main issue is you are not clearing the floats that you are applying to the four pad divs. That is why when using floating containers, it is always said that we should properly clear the floats. The rest is easy.
Clear float by giving clear: both to the board-controls.
Now add position: relative to simonBoard and center the board-controls using this:
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
(the queer thing is that clearing floats doesn't matter now though as you are using absolute position, but you should be doing it)
Now center the divs inside the board-controls by using line-height if you'd like that:
.board-controls > * {
line-height: 45px;
}
See demo below:
body {
background: url("http://cdn.backgroundhost.com/backgrounds/subtlepatterns/purty_wood.png");
font-family: 'Righteous', cursive;
color: black;
}
.container {
margin: 0 auto;
text-align: center;
}
h1 {
font-size: 70px;
}
.simonBoard {
margin: 0 auto;
border: solid 10px black;
width: 600px;
height: 600px;
border-radius: 600px;
box-shadow: -10px 10px 7px 0px rgba(50, 50, 50, 0.75);
position: relative;
}
.pad {
margin: 0;
float: left;
position: relative;
width: 290px;
height: 290px;
z-index: 8;
border: 5px solid black;
}
.pad-green {
background-color: #0a0;
-moz-border-radius: 300px 0 0 0;
border-radius: 300px 0 0 0;
}
.pad-red {
background-color: red;
-moz-border-radius: 0 300px 0 0;
border-radius: 0 300px 0 0;
}
.pad-yellow {
background-color: yellow;
-moz-border-radius: 0 0 0 300px;
border-radius: 0 0 0 300px;
}
.pad-blue {
background-color: blue;
-moz-border-radius: 0 0 300px 0;
border-radius: 0 0 300px 0;
}
.board-controls {
border: 15px solid black;
height: 245px;
width: 245px;
border-radius: 150px;
background-color: white;
z-index: 10;
clear: both;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-webkit-box-shadow: -6px 8px 5px 0px rgba(50, 50, 50, 0.75);
}
.board-controls > * {
line-height: 45px;
}
<div class="container">
<div class="header">
<h1>SIMON</h1>
</div>
<div class="simonBoard">
<div class="pad pad-green"></div>
<div class="pad pad-red"></div>
<div class="pad pad-yellow"></div>
<div class="pad pad-blue"></div>
<div class="board-controls">
<div class="title">SIMON</div>
<div class="display">07</div>
<div class="start">START</div>
<div class="strict">STRICT</div>
<div class="switch">ON/OFF</div>
</div>
</div>
</div>

Center Div Expanding Border

I'm working on an image grid and want to create an effect similar to this http://instagram.com/instagram/ (the images in the squares on the lower part of the page where the border expands. This is what I have so far:
HTML:
<div id="page-title"> </div>
<div id="wrapper" style="min-height:300px;">
<!--start: Container -->
<div class="container" style="margin-left:100px;">
<div style="position: absolute; width:200px; border: 1px solid black; height:200px;">
<div style="position: relative; background:url('/testimages/1354189822.jpg')" class="polaroids">
</div>
</div>
</div>
</div>
</div>​
CSS:
.polaroids {
background: #fff;
float: left;
width: 158px;
height:158px;
padding: 5px 5px 5px;
text-align: center;
text-decoration: none;
color: #333;
-webkit-box-shadow: 0 3px 6px rgba(0,0,0,.25);
-moz-box-shadow: 0 3px 6px rgba(0,0,0,.25);
-webkit-transition: all .2s ease-in-out;
border: 4px solid white;
background-color: black;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
margin-left: auto;
margin-right: auto;
margin:0 auto !important;
}
.polaroids:hover {
-webkit-box-shadow: 0 3px 6px rgba(0,0,0,.5);
-moz-box-shadow: 0 3px 6px rgba(0,0,0,.5);
z-index: 5; border-top: 10px solid white;
border-bottom: 10px solid white;
border-left: 8px solid white;
border-right: 8px solid white;
}​
The middle div does not seem to want to centre. Where am I going wrong? http://jsfiddle.net/b5XDK/​​​
for horizontal center use margin:0 auto; on the child element and remove the float:left;
http://jsfiddle.net/roine/b5XDK/10/
remove this
.polaroids { float:left }
remove your float:left of .polaroids

HTML Header and border Issues

Issues I'm having:
When I decided to take the borders off the css the header area gets smaller (which i do not want to happen). - I want to take off the border lines without moving anything around.
When I place an image into the header(it stretches and does not display correctly). Also over the image, I want to place a text is that possible?
Also, if you go onto the menu page, you will see that the thumbnails are not aligned, why is that?
Here is the website: http://younani.com/finalsite/finalindex.html
Here is my css:
#header {
text-align: center;
background: url('bg1.gif');
}
#container {
width: 960px;
margin: 0 auto;
background-color: #FAFAFA;
color: #003300;
font-family: Arial, Helvetica, sans-serif;
background-image: url('backgroundflower5.jpg');
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
#h2 {
text-align: center;
}
#container {
width: 960px;
margin: 0 auto;
}
#container div {
border: 1px solid;
}
#center2 {
float: left;
margin: 10px 0 10px 20px;
min-width: 200px;
width: 494px;
border-radius: 8px;
}
#left,#center,#right {
float: left;
margin: 10px 0 10px 20px;
min-width: 200px;
}
#center {
font-family: Josefin Slab;
background-color: #FFFFFF;
width: 494px;
border-radius: 8px;
text-align: center;
}
.clear {
clear: both;
}
#right {
font-family: Josefin Slab;
font-weight: bold;
border-radius: 8px;
background-color: #FFFFFF;
}
#left a {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #ffffff;
display: block;
padding: 10px 20px;
background: -moz-linear-gradient(
top,
#ffffff 0%,
#2a07ed);
background: -webkit-gradient(
linear, left top, left bottom,
from(#ffffff),
to(#2a07ed));
-moz-border-radius: 30px;
-webkit-border-radius: 30px;
border-radius: 30px;
border: 3px solid #ffffff;
-moz-box-shadow: 0px 3px 11px rgba(000,000,000,0.5),
inset 0px 0px 1px rgba(026,020,219,1);
-webkit-box-shadow: 0px 3px 11px rgba(000,000,000,0.5),
inset 0px 0px 1px rgba(026,020,219,1);
box-shadow: 0px 3px 11px rgba(000,000,000,0.5),
inset 0px 0px 1px rgba(026,020,219,1);
text-shadow: 0px -1px 0px rgba(000,000,000,0.2),
0px 1px 0px rgba(255,255,255,0.3);
}
#left a:link {
background-color: #E6E6E6;
}
#left a:visited {
background-color: #E6E6E6;
}
#left a:hover {
border: 3px inset #333333;
}
#left ul {
list-style-type: none;
margin: 0;
padding-left: 0;
}
#footer {
text-align: center;
font-family: Audimat;
clear: both;
width: 38%;
border-radius: 8px;
background-color: white;
text-align: center;
margin-right: auto;
margin-left: auto;
}
Here is the relevant HTML of my home page:
<div id="container" class="clearfix">
<!-- Header -->
<div id="header">
<h1>Younani Flowers</h1>
</div>
<!-- Left Column -->
<div id="left">
<ul>
<li>Home</li>
<li>Menu</li>
<li>Occasions</li>
<li>About Us</li>
<li>Contact Us</li>
</ul>
</div>
<!-- Center Column -->
<div id="center">
HELLLLLO :D :D
</div>
<!-- Right Column -->
<div id="right">
<p><span style="text-decoration: underline;"><strong>Birth Month Flowers</strong></span></p>
<p>January Carnation</p>
<p>February Iris</p>
<p>March Daffodil</p>
<p>April Daisy</p>
<p>May Lily</p>
<p>June Rose</p>
<p>July Delphinium</p>
<p>August Dahlia</p>
<p>September Aster</p>
<p>October Calendula</p>
<p>November Chrysanthe</p>
<p>December Poinsettia</p>
</div>
<!-- Footer -->
<div id="footer" class="clear">
<div class="nav">
<b>
Home
Menu
Occasions
About Us
Contact Us
</b>
</div>
</div>
</div>
<!-- #container -->
<div id="header" style="float: left; width: 100%;">
<h1>Younani Flowers</h1>
</div>
------or-----
Apply clearfix
<div id="header" class="clearfix">
<h1>Younani Flowers</h1>
</div>
http://www.webtoolkit.info/css-clearfix.html