CSS
讓FLASH置底於其他DIV的方法 (Dreamweaver版)
星期一, 7月 26th, 2010讓FLASH置底於其他DIV的方法 (Dreamweaver版)
第一:
AC_FL_RunContent( …..,’wmode’, ‘transparent’…. ); //end AC code
第二:
param name=”wmode” value=”transperant”
第三:
embed ……wmode=”transperant” ..
position:fixed問題
星期一, 1月 11th, 2010<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
以上標籤會影響IE8的一些HTML性質,
如CSS中的 position:fixed;
若沒有插入上述的標籤則會造成IE無法使用position:fixed;
但這個性質在FireFox是沒有影響的.
注意:
不能在header上方插入任何的註解, 否則就會完全不能使用.
<!– #include virtual=”inc/IZClsPage.asp” –>
<!– #include virtual=”inc/pageclass.asp”–>
<!– #include virtual=”webclass.asp”–>
<!– test –>
<!– #include virtual=”inc/headerv6.asp”–>
<!– test –
如上所示, <!– test –> 會造成問題, 我就被這個問題搞的我兩天沒睡, 最後終於被我DEBUG出來! = =+
從此以後我一定會記得,不要在檔頭插入任何的註解….
IE-only CSS 設計法
星期一, 1月 11th, 2010很多時候由於瀏覽器版本的問題而造成諸多不便,如果我們要針對不同的瀏覽器做CSS設計,可以用以下的方法:
只針對 IE 系列的瀏覽器
只針對非 IE 系列的瀏覽器
只針對 IE-7 的瀏覽器
只針對 IE-6 的瀏覽器
只針對 IE-5 的瀏覽器
只針對 IE-5.5 的瀏覽器
只針對 IE-6 以下的瀏覽器
若是要在CSS針對不同版本的IE做設計則方式如下:
只針對 IE-7:
html #div {
*height: 300px;
}
只針對 IE-6:
#div {
_height: 300px;
}
不要影響到 IE 6 以下的版本:
#div {
height/**/: 300px;
}
不要影響到 IE 6 以下的版本(方法二)
html > body #div {
height: 300px;
}
參考資料:
1. how-to-create-an-ie-only-stylesheet
2. ie-css-bugs-thatll-get-you-every-time/
相容於IE6, IE7 及其他瀏覽器的CSS註解
星期四, 1月 7th, 2010相容於IE6, IE7 及其他瀏覽器的CSS註解
#wrapper
{
color: #999; /* 所有瀏覽器適用*/
*color: #999; /* IE 7 */
_color: #999; /* IE 6 */
}
CSS 置底浮動footer
星期六, 1月 2nd, 2010#bottombar {
background-color: #efefec;
position: fixed; !important;
width: 100%;
bottom: 0;
z-index: 5;
height: 34px;
border: 1px solid #999999;
background-repeat:repeat-x;
color:#FFFFFF;
_position:absolute;
_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);
}
float:left 在IE及FF的使用
星期一, 12月 15th, 2008很多時候我們需要做出同一頁面有二到三個欄位的排版, 除了使用table劃分外, 另外一種常見的方式是使用float: left, 將div 定義為float:left可以使division之間會自動向左靠, 若因大小限制而擠不進, div會自動移到下一行, 所以您只要定義好div之間的大小就可以達成column-column的排版. 然而, 在IE與FF實作時會發現有些不同點.
IE:
<div id=”parent”> <!– parent 不需定義大小, child1, child2 會自動插到parent裡面 –>
<div id=”child1″> <!– float: left –>
<div id=”child2″> <!– float: left –>
</div>
FF:
<div id=”parent”>
<!– parent 一定要定義大小(width=”400px”), child1, child2 才會插到parent裡面, 否則height的呈現是會出現問題的 –>
<div id=”child1″> <!– float: left –>
<div id=”child2″> <!– float: left –>
</div>

