Making a footer not rise above the bottom of the screen without extraneous markup

后端 未结 10 972
陌清茗
陌清茗 2021-02-01 09:06

If you only had to worry about Firefox and Webkit browsers, what CSS would you use to make the footer in the following HTML not rise above the bottom or the screen (and go lower

10条回答
  •  孤街浪徒
    2021-02-01 09:36

    Okay, here is the alternative css that I was talking about. It works in Firefox, Safari, and Chrome. IE7/IE6 don't work, you'd probably have to a little tweaking to get that working. Opera has a small bug with the body margins. Other than that, it uses just basic CSS (unlike the display:table that isn't very compatible).

    
    
        Test page
        
    
    
        
    Foo bar baz
    Foo bar baz
    Foo bar baz
    Foo bar baz
    Foo bar baz
    Foo bar baz

    Wow, if you just tweaked it a little and made it IE6-7 compatible, you'd be famous. I think this is the first solution I've seen.

提交回复
热议问题