Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Footer Help

  1. #1
    Join Date
    Feb 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Footer Help

    Currently working on a site, my footer is correct in IE but wrong in Firefox.

    Just wondering if there is a quick easy fix for the css.

    Here is an example of my page:
    http://www.dan-cepromotions.co.uk/te...mo/prodops.htm

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Except for reading minds, which I only do on the weekends or when I need extra cash, what is the actual problem with the footer?

    It looks fine to me centered well and all.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Feb 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    In firefox it adds too much space, pretty sure it has something to do with the padding in the content.

    But if I take that out the footer is right in Firefox is right and then its wrong in IE.

    Confused...

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Browser padding is different. In your CSS try the following (never hurts to try, yeah?)

    at the top of the CSS find this:

    Code:
    html,
    body {
    	margin:0;
    	padding:0;
    	height:96%;
    	font: 90%/1.5 Arial, Helvetica, sans-serif;
    }
    Replace it with this:

    Code:
    * {
         padding:0;
         margin: 0;
    }
    
    html,
    body {
    	height:96%;
    	font: 90%/1.5 Arial, Helvetica, sans-serif;
    }
    This will force most browsers to set the margins first, before declaring the body and html sections.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Feb 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Nope, that doesn't seem to work either.

    Code:
    #content {
    	float : left;
    	padding: 0px 0px 6em 0px;
    	width : 800px;
    	height : 55%;
    }
    If I take out the 6em here it works perfect in firefox. Very strange! I hate compability issues!!

  6. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Use the position attribute. Have the containing div be relative positioned and use position:absolute on the footer div. That should work nicely for most all occasions.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #7
    Join Date
    Feb 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Nope that didnt work either, it made the footer go into the header in Firefox.

  8. #8
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by abzd View Post
    Nope, that doesn't seem to work either.

    Code:
    #content {
    	float : left;
    	padding: 0px 0px 6em 0px;
    	width : 800px;
    	height : 55%;
    }
    If I take out the 6em here it works perfect in firefox. Very strange! I hate compability issues!!
    If you only need the padding in IE, just use a hack

    Code:
    #content { *padding: 0 0 6em 0;}

  9. #9
    Join Date
    Feb 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    as easy as that...

    thank you

    is there any good sites with lists of hacks? I need one for my header too as it fits in firefox but not in IE.

  10. #10
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    In general, relying on hacks isn't such a good idea. If you find yourself having to hack your way through CSS, then you might want to rethink how you're structuring your markup.

    In general, most things do work in IE and FF. There are some thing which you'll always have to use a hack for (at least for the time being, until IE gets more CSS support).

    Stick with the technique I used above...
    add an asterisk(*) in front of any property that you want to only be read by IE. Remember to have the true value also listed for the sake of the standards complaint browsers.

  11. The Following User Says Thank You to Medyman For This Useful Post:

    abzd (02-27-2008)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •