Float: Left Not Working on iPhone


For the time being, I'm trying to remedy my footer that overlaps my content by specifying width:100% and float:left, so that it just goes underneath my content.

HOWEVER, on my iPhone, the footer is still overlapping my content... and I can't understand why. I've deleted the cache/etc... and it still overlaps. The CSS worked for another page, but not this page.


html {
    background: #000;
body {
    margin: 0;
    padding-left: 40px;
    padding-top: 25px;
#container {
    min-width: 900px;
    overflow: hidden;
#header {
.logo {
    font-family: Didot;
    font-size: 4.5em;
    color: #FFF;
    letter-spacing: 4px;
.main_nav {
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 150px;
    float: left;
.main_nav li {
    margin: 5px;
.main_nav li a {
    color: #FFF;
    text-decoration: none;
    font-size: 32px;
    font-family: Garamond;
    font-variant: small-caps;
.main_nav li a:hover {
    color: #06F;
#body {
    padding-bottom: 100px;
    float: left;
    background-color: rgba(0,0,0,0.7);
    width: 750px;
    height: 500px;
#footer {
    width: 100%;
    height: 100px;
    float: left;
.footer_text {
    font-family: Garamond;
    font-size: 12px;
    color: #FFF;


<link href="services.css" rel="stylesheet" type="text/css">
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ieservices.css" />


<div id="container">

  <div id="header">
    <div class="logo"></div>
    <ul class="main_nav">

  <div id="body">

  <div id="footer">


Problem courtesy of: pianoman


Your #body div has a height of 500px - if the content is taller than 500px it is being cut off.

To fix, remove the height setting, or change it to min-height:500px.

Solution courtesy of: Gurmesh Singh


There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.