2011-12-08 5 views
1

13 Reasons Why CSS Is Superior to Tables in Website DesignApache Tiles - テーブルレイアウトを使用しない場合に便利ですか?

によると、それは、テーブルレイアウトよりもはるかに優れ使用CSSレイアウトです

は今、すべてのタイルの例は

<table border="2" width="300" bordercolor="Gray"> 
    <tr> 
    <td bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td> 
    </tr> 
    <tr> 
    <td><tiles:insert attribute="header"/></td> 
    </tr> 
    <tr> 
    <td><tiles:insert attribute="body"/></td> 
    </tr> 
</table> 

タイルを挿入する表のレイアウトを使用して、私の質問は、それは無用ですCSS-Layoutを使っているときにTilesフレームワークを使うのは無意味ですか?このようなもの?それはタイルズを殺しますか?

<body> 
    <div id="header"> 
     <div id="headerTitle"><tiles:insertAttribute name="header" /></div> 
    </div> 
    <div id="content"> 
     <tiles:insertAttribute name="body" /> 
    </div> 
    <div id="footer"> 
     <tiles:insertAttribute name="footer" /> 
    </div> 
</body> 

おかげ

答えて

2

いいえ、それはその必要がなくなるわけではありません。レイアウトがCSSで行われるためdivの順序が重要ではない場合でも、アプリケーションのすべてのJSPでヘッダーとフッターのdivを繰り返す必要はありません。 HTMLヘッドはあなたが繰り返したくないものです。ですから、アプリケーションのすべてのページに本文の内容を入れるだけで、レイアウトページに入れておくことがより効果的です。

関連する問題