html-css‎ > ‎

width height 100%

2010/01/17 18:44 に いつかはちょうになる が投稿   [ 2010/01/18 11:39 に更新しました ]
css で 縦横 100% で表示するcss。

横は width 100% で思い通りに100%で表示される。
縦はうまくいかない。

cssで

html,body{
  height: 100%;
}

として、html は

<body>

  <table style="width: 100%;height:100%">
  </table>

</body>

のようにすると縦も100%に設定できる。

<body>

  <table style="width: 90%;height:100%">
  </table>

</body>
なんかにすると最近よく見るブログのような感じ。

<body>

  <table style="max-width: 1000px; min-width: 800px; width: 800px;height:100%">
  </table>

</body>

とすれば少し動的なデザインになる。
Comments