Is there a business reason for striving for pure CSS layout?

后端 未结 21 1304
情深已故
情深已故 2021-02-02 08:30

It seems like every time I try to create a pure CSS layout it takes me much longer than if I\'d use a table or two. Getting three columns to be equal lengths with different amou

21条回答
  •  天命终不由人
    2021-02-02 09:15

    I'm of the thought that CSS layout with as few tables as possible is cleaner and better, but I agree that sometimes you just gotta use a table.

    Business-wise, it's generally "what's going to get it done the fastest and most reliable way." In my experience, using a few tables generally falls into that category.

    I have found that a very effective way to mitigate cross-browser differences in CSS rendering is to use the "strict" doctype at the top of your page:

    
    

    Also, for the dreaded IE6 CSS issues, you can use this hack:

    .someClass {
        background-color:black; /*this is for most browsers*/
        _background-color:white; /*this is for IE6 only - all others will ignore it*/
    }
    

提交回复
热议问题