Load transparent PNG images in IE6

Although IE6 has existed for many years, there are so many users who use this browser to surf the Internet. That why we (the developers) have to support them, don’t we? :)

In IE6 there are so many bugs that causes our HTML and CSS design breaks down into pieces. One of them is transparent PNG images can not be transparent! That’s sad!

However, there also has many solutions and tricky ways to overcome that. I’ve found this article

http://www.komodomedia.com/blog/2007/11/css-png-image-fix-for-ie/

is very interesting. Let me summarize the steps:

- Put in your CSS the following code:

** html img,
* html .png{
position:relative;
behavior: expression((this.runtimeStyle.behavior=”none”)&&(this.pngSet?this.pngSet=true:(this.nodeName == “IMG” && this.src.toLowerCase().indexOf(‘.png’)>-1?(this.runtimeStyle.backgroundImage = “none”,
this.runtimeStyle.filter = “progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’” + this.src + “‘, sizingMethod=’image’)”,
this.src = “transparent.gif”):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace(‘url(“‘,”).replace(‘”)’,”),
this.runtimeStyle.filter = “progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’” + this.origBg + “‘, sizingMethod=’crop’)”,
this.runtimeStyle.backgroundImage = “none”)),this.pngSet=true)
);
}
- Put a 1×1 transparent.gif  transparent (and blank) image in the server root directory.
And see how it works! That’s great !

Gửi phản hồi »

PHP Send Mail

It’s quite easy to do Mailing function (Send mail) with PHP code using mail() function.

Search php mail function manual at php.net.

Now you want to test with your localhost? Following these steps:

- Start SMTP (Simple Mail Transfer Protocol) services (Control Panel -> Administrator Tools -> Services).

- If you can’t find SMTP service, maybe it hasn’t been installed. Go to Add/Remove Windows Components in Control Panel->Add/Remove Programs; the SMTP service is in  IIS components. (remember that you have to have Windows CD :D )

- Config your php.ini file if necessary : search [mail function] text

- Go to Control Panel -> Administrator Tools -> IIS ;

+ Expand your local computer

+ Right click on SMTP Virtual Server

+ Go to Access tab, click Relay

+ Click Add;  enter 127.0.0.1  in IP Address (choose Single Computer)

+ Click OK; OK; OK… (just to close windows :D )

- Now you can send mail to any mail without entering your email account :D

Ex: mail(‘anyone@mail.com’, ‘test’, ‘hi you’);

// from email is configed in php.ini file

OR:

$headers = ‘From: webmaster@example.com’ . “\r\n” .
‘Reply-To: webmaster@example.com’ . “\r\n” .
‘X-Mailer: PHP/’ . phpversion();
(mail($to, $subject, $body, $headers);

Test it :)

Gửi phản hồi »

Valentine’s gift ^.^

Em mo ve anh – Arthemix

Nhạc : Huy Tuấn

Lời : Dương Thụ

Lặng im bóng cây, lặng im bóng mây, lặng im góc sân trưa nắng vàng Lặng im ngón tay, lặng im cánh hoa ngát hương thơm nơi hoang dại em mơ về anh Rồi em mơ thấy, thấy anh nhìn em .[Thấy anh đang nhìn em] thấy tiếng anh cười và lời anh nói lúc anh làm quen [rất nồng nàn] nghe sao rất gần Rồi em mơ thấy, thấy anh kề bên [Thấy anh kề bên] và rồi lại thấy em nằm mơ những giấc mơ buồn. [Và như bài hát xa rồi] anh như bài hát xa rồi Giờ đây vắng anh, giờ đây thiếu anh mà sao thấy anh anh rất gần. Ngồi trong bóng đêm, mình em với em giữa bao gương mặt xa lạ. Em mơ về anh Rồi em mơ thấy, thấy anh nhìn em [Thấy anh đang nhìn em], thấy tiếng anh cười và lời anh nói lúc anh làm quen [rất nồng nàn] nghe sao rất gần Rồi em mơ thấy, thấy anh kề bên [Thấy anh đang kề bên] và rồi lại thấy em nằm mơ vì em đang nhớ anh người yêu hỡi

A sweet valentine’s gift.

Gửi phản hồi »

VisualStudio “Binding handle is invalid”

For those who has encounter this eror “Binding handle is invalid” when trying to debug a project in Visual Studio 2005 (or 2008 maybe), try one of these following solutions:

- Disable the “Enable the Visual Studio hosting process” checkbox in [YourProject] / Properties / Debug section.

or

- Start the “Terminal Process” service in ControlPanel/Administrative Tools/ Services.

I don’t know why this error happens, perhaps another programs (or virus, maybe) are in conflict with VS!   but those are solutions i find out when googling ! :) Hope it useful !

Enjoy! :D

Gửi phản hồi »

Nhà mới!

Welcome to my world !

Sau lưng ta là bầu trời và mây núi

Sau lưng ta là bầu trời và mây núi

Gửi phản hồi »

Follow

Get every new post delivered to your Inbox.