Hi there
I am working on my new website for my organisation's festival. All pages working well thus far EXCEPT for the Contact page. The footer is below the black area. I must be missing something in the code to get it to sit where every other page has the footer.

Any help would be greatly appreciated!

http://home.comcast.net/~waynetorrance/festival2/CSS3_six_dark/index.html

http://home.comcast.net/~waynetorrance/festival2/CSS3_six_dark/contact.php

Dani AI

Generated

Short summary: was correct — the contact page’s footer was outside the main wrapper, so it sat below the black content area while the other pages kept the footer inside the wrapper. confirmed moving it solved the symptom. Below are focused, practical notes and quick fixes so the same problem is easy to spot and impossible to miss later.

Why that happens: when a footer (or any block meant to follow page content) is placed outside the site’s main/container element the document flow puts it after that container. If the container also contains floated children and those floats aren’t cleared, the container can “collapse” visually even when the footer is inside, producing similar gaps. Common culprits: extra or mismatched closing tags, stray elements after </footer>, or accidental absolute/fixed positioning on the footer.

Quick fixes and modern options (safe, copy/paste-ready)

  • Simple clearfix to make a container include floats:

    #site_content::after {
    content: "";
    display: table;
    clear: both;
    }
  • Fast containment using overflow (legacy-safe):

    #site_content { overflow: auto; } /* or hidden when safe */
  • Modern sticky-footer layout (Flexbox):

    html, body { height: 100%; }
    body { display: flex; flex-direction: column; }
    #main { flex: 1 0 auto; }
    footer { flex-shrink: 0; }

Diagnostic checklist (in order)

  • Inspect DOM with browser DevTools: confirm footer is inside the same wrapper as header/content.
  • Toggle outlines to see boxes (apply temporary outline:1px solid red to #main, #site_content, footer).
  • Search for mismatched or extra closing tags and stray nested anchors or </form> leftovers.
  • Check position on footer (avoid absolute unless intentional).
  • Run the page through an HTML validator to catch structural errors.

The fix that closed this thread — moving the footer back into the main wrapper and ensuring floats are cleared — is the most straightforward. The CSS snippets above are safe fallbacks to prevent similar layout collapse on other pages.

Recommended Answers

All 4 Replies

I apologise, I see that my testing site does not support php pages. here is the code:

<!DOCTYPE HTML>
<html>

<head>
  <title>Newtown Festival 2013</title>
<meta content="The Newtown Festival is the principal fundraiser for the Newtown Neighbourhood Centre (NNC) which aims to build an inclusive, resilient, self-reliant and creative community. All monies raised by the Festival are returned to the Centre to provide community support services to the local community and in particular the disadvantaged groups such as the aged, people with disabilities, people who are homeless, people with mental illness, people from culturally and linguistically diverse backgrounds and people on low incomes." name="description">
<meta content="NNC, community, community services, NSW, New South Wales, community sector, community services sector, volunteers, media, sponsorship, sponsors, sustainability, Newtown, eco, Camperdown Memorial Rest Park, stalls, food" name="keywords">
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  <link rel="stylesheet" type="text/css" href="css/style.css" />
  <!-- modernizr enables HTML5 elements and feature detects -->
  <script type="text/javascript" src="js/modernizr-1.5.min.js"></script>
</head>

<body>
  <div id="main">
    <header>
      <div id="logo">
        <div id="logo_text">
          <!-- class="logo_colour", allows you to change the colour of the text -->
          <h1><a href="index.html">Newtown<span class="logo_colour">Festival 2013</span></a></h1>
          <h2>10 November 2013 | 9:30am - 5:30pm</h2>
        </div>
      </div>
      <nav>
        <div id="menu_container">
          <ul class="sf-menu" id="nav">
            <li><a href="index.html">Home</a></li>
            <li><a href="about.html">About</a>
               <ul>
                <li><a href="donations.html">Donations</a></li>
                <li><a href="history.html">History</a>
                 <li><a href="maps.html">Maps</a>
                <li><a href="safety.html">Safety</a>
                </li>
              </ul>
            </li>
            <li><a href="contact.php">Contact</a></li>
            <li><a href="media.html">Media</a>
             <ul>
                 <li><a href="downloads.html">Downloads</a></li>
                <li><a href="media_photos.html">Media Photos</a></li>
                <li><a href="press_releases.html">Press Releases</a>
                 <li><a href="social_media.html">Social Media</a></li>
              </ul>
            </li>
            <li><a href="#">Performers</a>
              <ul>
                <li><a href="bands.html">Bands</a></li>
                <li><a href="bike_zone.html">Bike Zone</a></li>
                <li><a href="eco_zone.html">Eco Zone</a></li>
                <li><a href="food.html">Food & Drink</a></li>
                <li><a href="kids_zone.html">Kids Zone</a></li>
                <li><a href="stages.html">Stages</a></li>
              </ul>
            </li>
            <li><a href="sponsors.html">Sponsors</a>   
                <ul><li><a href="sponsors_list.html">2013 Sponsors</a></li>
              </ul>
              </li>
            <li><a href="stalls.html">Stalls</a>
              <ul>
                <li><a href="categories.html">Categories</a></li>
              </ul>
             </li>
            <li><a href="sustainability.html">Sustainability</a></li>
            <li><a href="volunteers.html">Volunteers</a></li>
          </ul>
        </div>
      </nav>
    </header>
   <div id="site_content">
      <div id="sidebar_container">
        <div class="sidebar">
          <h3>Latest News</h3>
          <h4>Twitter Updates! </h4>
          <p>Newtown Festival Twitter feed will go in this space and will be constantly updated when important things are said about the festival.<a href="#"></a></p>
        </div>
        <div class="sidebar">
          <h3>Latest News</h3>
          <h4>Like Us On Facebook!          </h4>
          <p>Newtown Festival wants more facebook hits and if I put a facebook badge here, we should see alot more traffic.<a href="#"></a></p>
        </div>
        <div class="sidebar">
          <h3>Gallery</h3>
<p>If you were at the Newtown Festival, chances are you could be in our gallery! Check out our photos!</p>
<p>Picture Pages</p>
        </div>
      </div>
      <div class="content">
        <img style="float: left; vertical-align: middle; margin: 0 10px 0 0;" src="images/contact.png" alt="contact" /><h1 style="margin: 15px 0 0 0;">Contact Us</h1>
        <p>Get Your Questions Answered!</p>

<p><b>Phone - General Festival Inquiries</b><br>
 +612 9564 7333</p>

<p><b>Phone - Stall Enquiries</b><br>
 +612 9564 7317 </p>

<p><b>Fax Number</b><br>
 +612 9519 2509 </p>

<p><b>Address</b><br>
Newtown Neighbourhood Centre<br>
 1 Bedford Street<br>
 Newtown NSW 2042 </p>



<a href="javascript:void( window.open('http://form.jotform.co/form/31186949435868', 'blank','scrollbars=yes,toolbar=no,width=700,height=500'))">Send The Festival Team A Message!</a>
          </div>
        </form>
      </div>
    </div>
    <footer>
      <p>Copyright © 2013 Newtown Neighbourhood Centre, Inc. |  ABN: 96 884 462 833 | festival@newtowncentre.org</p>
    </footer>
<br>Sponsored by:<br><br>
<center><a href="http://www.marrickville.nsw.gov.au/#&panel1-1" target="_blank"><img src="images/mcouncil_logo.png" width="112" height="28" border="1"></a> 

<a href="http://www.cityofsydney.nsw.gov.au/" target="_blank"><img src="images/citysydney_logo.gif" width="112" height="28" border="1"></a> 

<a href="http://lovepolice.com.au/" target="_blank"><img src="images/lovepolice_logo.jpg" width="112" height="28" border="1"></a> 

<a href="http://mccyclery.com.au/" target="_blank"><img src="images/mccyclery_logo.jpg" width="70" height="50" border="1"></a> 

<a href="http://www.signwave.com.au/" target="_blank"><img src="images/signwave_logo.jpg" width="112" height="28" border="1"><a></a> 

<a href="http://www.betterread.com.au/discount-books/home.do;jsessionid=F5E51364D8EACC4A171E7C4E120FCE2D" target="_blank"><img src="images/betterread_logo.jpg" width="112" height="28" border="1"></a> 

<a href="http://www.dendy.com.au/Page/Home" target="_blank"><img src="images/dendy_logo.jpg" width="112" height="28" border="1"></a> 

<a href="http://www.zenstudios.com.au/" target="_blank"><img src="images/zen_logo.jpg" width="70" height="50" border="1"></a></center>
</div>
  <p> </p>
  <!-- javascript at the bottom for fast page loading -->
  <script type="text/javascript" src="js/jquery.js"></script>
  <script type="text/javascript" src="js/jquery.easing-sooper.js"></script>
  <script type="text/javascript" src="js/jquery.sooperfish.js"></script>
  <script type="text/javascript">
    $(document).ready(function() {
      $('ul.sf-menu').sooperfish();
    });
  </script>
</body>
</html>

I am not sure if you solved the problem or not but the 2nd link doesn't work.

In you html page you have header, body and footer into main div.
But in php page your footer is out of main div.
Make your php page structure same as the other html pages.

commented: :) +8

...thank you so much for the help! Works perfectly now! Cheers!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.