CSS problem - works in Safari but not FireFox and IE7

Discussion in 'Software' started by chrismcfet, Apr 11, 2007.

  1. chrismcfet

    chrismcfet Private E-2

    Hey all,

    I'm a student working on a website project. I'm doing it in XHTML and CSS. Today I came across some problems when viewing on the Windows Platform. The footer is not displayed and accompanying text is without formatting. It works fine in Safari but not in FireFox and IE7. I'm stumped. Could you please help me out? Code is below.

    Thanks,

    Chris

    ----

    Extract from Web page...

    <!-- FOOTER -->
    <div id="footer"></div>
    <!-- SITE CREDITS & COPYRIGHT -->
    <div class="footerCredits">
    site put together by <a href="#">supoib</a> | &copy; Ambeca Properties Ltd. 2007 | <a href="pages/legal/privacy.html" title="Read our Privacy Policy">privacy policy</a> | <a href="pages/legal/terms.html" title="Read our Terms &amp; Conditions">terms &amp; conditions</a>
    <!-- SITE CREDITS & COPYRIGHT END-->
    </div>
    <!-- FOOTER END -->

    Extract from CSS...
    /* FOOTER */

    #footer {
    float: left;
    width: 756px;
    height: 94px;
    margin: 0;
    text-align: right;
    background-image: url(../images/layout/ambeca_footer_shadow.jpg);
    background-color: #5E3757;
    background-repeat: no-repeat top left;
    }

    .footerCredits {
    color: #666666;
    text-decoration: none;
    padding-top: 10px;
    padding-right: 10px;
    padding-bottom: 0px;
    padding-left: 10px;
    }

    .footerCredits a {
    color: #666666;
    text-decoration: underline;
    }

    /* FOOTER END */
     
  2. Jawa Slayer

    Jawa Slayer Corporal

    I don't know if you've fixed this by now, but looking at your code

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

    seems to be closing the div tags before anything can be formatted. I'm guessing you want that closing div tag at the end of the code so it's all formatted as #footer? You might also try renaming ".footerCredits" and ".footerCredits a" to "#footerCredits" and "#footerCredits a" respectively. No idea why it works in safari as it is.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds