24 October, 2007

align="absmiddle" or align="absbottom" not validate in W3C Markup Validator

Normally we will use align="absmiddle" to make an image align in the middle between a HTML element/object, e.g:


< input name="text1" type="text" maxlength="17">< src="button_ok.gif'" alt="OK" style="margin-bottom:1px;" align="absmiddle">
or
<img src="images/icon_diamond.gif" alt="" align="absbottom">

You will get error when you try to validate your page with W3C Markup Validator (http://validator.w3.org/check).

How to solve?

Use this:

<img src="images/icon_diamond.gif" alt="" style="vertical-align:bottom">

Same to:

<img src="images/icon_diamond.gif" alt="" style="vertical-align:middle">

19 October, 2007

How do you stretch a background image?

<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

< html>
< head>
< title>Background to fit screen</title>

<style type="text/css">

html {height:100%;}

body {height:100%; margin:0; padding:0;}

/* set the background image to full capacity of the viewing area */

#bg {position:fixed; top:0; left:0; width:100%; height:100%;}

/* places the content on top of the background image */

#content {position:relative; z-index:1;}

</style>
<!--[if IE 6]>
<style type="text/css">

/* some css fixes for IE browsers */
html {overflow-y:hidden;}
body {overflow-y:auto;}
#bg {position:absolute; z-index:-1;}
#content {position:static;}

</style>
<![endif]-->
</head>

<body>

<div id="bg"><img height="100%" alt="" src="yourimage.jpg" width="100%" /></div>
<div id="content"><p>Enter your content here.</p></div>


17 October, 2007

Div height problem in IE


The following, as the only content in a file, is the requested 5px high in Mozilla and Opera, but 12px high in IE (5.0, 6.0 & 7.o):

<div class="dot" style="height:1px; border:1px solid red;"></div>

Divs in IE have a minimum height when the <div> is empty. There is a couple of ways to solve this:
1) Put a comment tag inside the div:
<div class="dot" style="height:1px; border:1px solid red;"><!-- --></div>

2) Add this to its style inside the div:
<div class="dot" style="font-size:2px; height:2px; border:1px solid red;"></div>

08 September, 2007

2008 财政预算案(The Economic Report 2008)

Total of RM168.8bil has been allocated under The Economic Budget 2008, it is increase of 2.5% over 2007.

教育 (Education)
●所有中小学生可享贷书,不计家庭收入及孩子人数。
●废除中小学生年费。
●非营利学校包括独中、华小、淡小和宗教学校,来自学费、利息及捐款免税。
●月入1千令吉以下家庭的学生,课外活动制服免费。
●赞助学校建设礼堂及其他非营利基本设施的企业,可获扣税。

公司税务 (Companies)
●2008年公司税26%(-1%),2009年再降至25%。
●中小企业首两年不必呈报预估所得税及分期缴税。只需在结账后7 个月内,一次过缴税。
●实施单层次征税制,包括股息可直接免税,直到2013年12月31日。
●上市公司合并活动免印花税优惠期,延长至2010年12月31日。但计划须在2011年12月31日前完成。

个人 (Private)
●购买运动器材可减免300令吉。
●5千令吉深造费减免,扩至硕士及博士课程。
●从2007估税年起,受雇于特定领域,提早在50岁或以上退休的女性,所得税全免。

金融 (Finance)
●明年1月1日起,股票结算费从0.04%减至0.03%,最高为1千令吉。
●股票经纪每项交易抽佣最低40令吉。
●外资在资金管理公司持股权可达70%;土著持股权至少30%。

产业 (Housing/Properties)
●明年1月1日起,公积金会员可每月可从第二户头提款供屋。
●购买不超过25万令吉的房屋印花税减半,只限第一间屋子,优惠期到2010年12月31日。
●设立基金担保无收入证明者,贷款买屋。
●夫妻产业转名手续免印花税。

社会、治安 (Public Safety)
●残疾工人每月津贴从200令吉提高至300令吉。
●照顾卧床及慢性病患者,每月获300令吉特别援助金。
●为残疾员工建设友好环境的资本开销可减税。
●拨款60亿令吉予警察部队,5年内增聘6万警员、增购2千辆警车和1千900辆电单车。

农业 (Farm)
●禽畜业者投资在关闭式农场的再投资津贴优惠延至2010年。
●非橡胶种植公司,种植至少10%胶木所得的提升农业津贴优惠,延至2010年12月31日。

科技 (Technology)
●再生能源公司可免所得税,投资配备可享100%投资税津贴,并可全额抵销法定收入。
●投资省电的配备开销,可100%免税,为期10年。
●工厂保安实施投资的开销,可享更高资本折旧率。
●提供员工电脑或租借宽频的雇主,可获税务回扣。

转载自南洋商报、星洲日报

02 September, 2007

How to speed up my Window XP (1) - Indexing.

Windows XP keeps a record of all files on the hard disk so when you do a search on the hard drive it is faster. There is a downside to this and because the computer has to index all files, it will slow down normal file commands like open, close, etc.
If you do not do a whole lot of searches on your hard drive then I suggest turnning this feature off:
1. Control Panel
2. Administrative Tools
3. Services
4. Disable Indexing Services