-3

http://amtportal.org/Layouts/navbar2.php

The footer doesn't show up in Firefox and the Navigation bar on top doesn't show in IE. Why?

user3068010
  • 59
  • 1
  • 2
  • 4
  • You have no (or other variant, depending on what doctype you want) as the first tag in the document, which forces IE into quirks mode. – Paul Abbott Nov 24 '14 at 23:09
  • All that did was removed the footer. :( – user3068010 Nov 24 '14 at 23:18
  • This site isn't intended for "Please visit my site and tell me why it doesn't work" question. The problem is that, once you've fixed the issue, there is no future value for others to the question, as the problem has been fixed and there is no indication of what it was prior to that happening. If you include the relevant portions of the code/HTML *here* in your question itself, it may be possible to get some help. Otherwise, this question should be closed. – Ken White Nov 24 '14 at 23:25
  • To answer your actual question, we don't use tables anymore because it makes html very hard to maintain (tables within tables within tables become a nightmare) and it also causes big issues with assistive technologies like screen readers for blind people. Tables are for tabular data, period. – Paul Abbott Nov 24 '14 at 23:41

1 Answers1

2

You have no <!DOCTYPE html> (or other variant, depending on what doctype you want) as the first tag in the document, which forces IE into quirks mode. I can't speak for Firefox because I don't have it installed, but this might cause similar issues.

Adding a doctype is just the first step so all browsers will attempt to render the page to the same standard. Without it, you will never get a non-trivial page to look the same in all browsers.

For a quick fix,

.footer{
    height:70px;
    background:#d3d3d3;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.wrapper{
    position: relative;
    width:770px;
    margin: 0px auto;
    padding-left: 10px;
   min-height: 100%;
}

margin-bottom: -70px; was forcing the page up, making the navigation bar disappear off the top of the screen. Making the footer abosolutely positioned on the bottom is a bit of a hack, but it works. But there are many templates and examples out there for content with footers on the bottom; having a doctype will make them actually work.

Paul Abbott
  • 7,065
  • 3
  • 27
  • 45