Float: Left Not Working on iPhone

Problem

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.

CSS:

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;
}

HTML:

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

<body>

<div id="container">

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

  <div id="body">
  </div>

  <div id="footer">
  </div>

</div>

</body>
</html>
Problem courtesy of: pianoman

Solution

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

Discussion

There is currently no discussion for this recipe.

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