Border around 100% body height and width (HTML 4.01 Strict)

后端 未结 7 672
灰色年华
灰色年华 2020-12-15 18:18

Okay, this is driving me crazy right now.

I want to have a border around my document. It should be nicely going around the whole window/viewport. So I define:

<
7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-15 18:56

    You'll love this one.

    
    
    
    
    
    
    
    
        

    http://www.test.dev.arc.net.au/100-percent-border.html

    I figured since tables keep a lot of "quirky" behavior even under standards mode they might be the solution. Turning the HTML element into a table is pretty funny though.

    Before marking this down for not working in IE6 consider that's a very trivial issue to fix. The point is that using the table drawing algorithm is the solution, and a pure CSS solution is also possible:

    ...page content...

    提交回复
    热议问题