IE 既 CSS 處理雖則唔標準,不過有樣野我幾認同

編寫、設計網頁與程式。

版主: hamu278, 銘仔

版面規則
  • 本版面亦可以討論網頁寄存公司

IE 既 CSS 處理雖則唔標準,不過有樣野我幾認同

文章bananasims » 2008-10-26, 23:13

IE 既 CSS 處理雖則唔標準,出晒名好多奇形怪狀既問題,不過有樣野我幾認同,就係佢 Box Model 中對 width 既處理。
假設有個 element:
代碼: 選擇全部
<div style="width: 200px; margin: 5px; padding: 5px">Some Text</div>

W3C:個 box 有 210px 咁闊;Internet Explorer:exactly 200px 咁闊。

你邏輯上面,你覺得邊個會更貼近設計師既原意?我覺得 IE 嗰個係。
因為 IE 既 width 真係 exactly 個 box 個 width,padding 會計埋喺入面。
而 W3C 標準就係計內容既 width,padding 係計個 width 既出面。

唔明?睇埋下面幅圖就會明(轉自維基百科
圖檔

http://en.wikipedia.org/wiki/Internet_E ... _box_model
呢一段我幾認同
Douglas Bowman 及 Ethan Marcotte 寫: ... the original Internet Explorer box model actually represents a better, more logical approach based on common sense.

Peter-Paul Koch 寫: ... a physical, real-world box, whose dimensions always refer to the box itself, including potential padding, but never its content.

Peter-Paul Koch 寫: ... is more useful for graphic designers, who create designs based on the visible width of boxes rather than the supposed width of their content


本來 W3C 諗住加 box-sizing、box-width 同 box-height 3 個屬性,不過最後無加…
其實我希望加,咁樣設計就會有多啲彈性。
影像.從心 At the heart of the ímage
bananasims
太陽會員
 
文章: 13541
註冊時間: 2005-09-22, 00:00

Re: IE 既 CSS 處理雖則唔標準,不過有樣野我幾認同

文章Freeman » 2008-10-26, 23:25

padding 同 margin 混亂左 :oops:
Freeman
地球會員
 
文章: 1680
註冊時間: 2008-06-25, 21:04

Re: IE 既 CSS 處理雖則唔標準,不過有樣野我幾認同

文章bananasims » 2008-10-26, 23:31

padding 係 border 入面,margin 係 border 出面
影像.從心 At the heart of the ímage
bananasims
太陽會員
 
文章: 13541
註冊時間: 2005-09-22, 00:00

Re: IE 既 CSS 處理雖則唔標準,不過有樣野我幾認同

文章Freeman » 2008-10-26, 23:36

明白 :oops:


咁講又真係IE岩
Freeman
地球會員
 
文章: 1680
註冊時間: 2008-06-25, 21:04

Re: IE 既 CSS 處理雖則唔標準,不過有樣野我幾認同

文章lsp » 2008-10-27, 17:56

其實我覺得 W3C 果個應該係用另一個諗法去諗, 其實都唔會話有嘜問題既, 但唔清楚既人就慘 :P
頭像
lsp
地球會員
 
文章: 1374
註冊時間: 2008-02-07, 11:58

Re: IE 既 CSS 處理雖則唔標準,不過有樣野我幾認同

文章dickyho01025 » 2008-10-27, 18:48

CSS 3 唔知有無 (box-sizing、box-width 同 box-height )
dickyho01025
土星會員
 
文章: 215
註冊時間: 2005-10-22, 00:00

Re: IE 既 CSS 處理雖則唔標準,不過有樣野我幾認同

文章skyhks » 2008-10-28, 23:21

IE 同 FX 成日差 1px, 好鬼煩
圖檔
頭像
skyhks
地球會員
 
文章: 1337
註冊時間: 2006-10-01, 17:08
來自: 香港


回到 [B1] 網頁製作、程式編寫與介面設計



誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 26 位訪客

cron