โปรแกรม ColorPic สำหรับดึงค่าสีต่าง ๆ จาก Windows เป็น Freeware
เหมาสำหรับ Web Design ครับ
Download ได้ที่นี่เลย
http://www.iconico.com/download.aspx?app=ColorPic&type=free
วิธีใช้
http://www.iconico.com/colorpic/gettingStarted.aspx
Showing posts with label HTML XHTML. Show all posts
Showing posts with label HTML XHTML. Show all posts
Thursday, June 28, 2012
Saturday, August 8, 2009
Disable auto complete on textbox
เวลาเราสร้าง Textbox ขึ้นมาถ้าเรา Input ทาง Browser มันจะมีชื่อที่เราเคย Input ใน Textbox นั้นมา ถ้าเราไม่ต้องการให้มี List ชื่อที่เราเคยป้อนเข้าใน Textbox นั้นเราก็ Disable มันซะ ตาม code ด้านล่างเลยครับ
ASP.NET
HTML
ASP.NET
<asp:TextBox ID="txtName" runat="server" AutoCompleteType="Disabled" ></asp:TextBox>
HTML
<input name="txtName" type="text" autocomplete="off" />
Labels:
ASP.NET,
HTML XHTML
Monday, November 24, 2008
How to Add a Shortcut Icon to a Web Page
<head>
<link rel="SHORTCUT ICON" href="http://www.mydomain.com/myicon.ico"/>
<title>My Title</title>
</head>
<link rel="SHORTCUT ICON" href="http://www.mydomain.com/myicon.ico"/>
<title>My Title</title>
</head>
http://msdn.microsoft.com/en-us/library/ms537656.aspx
Labels:
HTML XHTML
Thursday, September 18, 2008
How to disable right click (Context Menu) on object in browser
Example in picture object:
Or use this code:
Result:

<!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">
<head>
<title> new document </title>
<script language="javascript">
function disableContextMenu(obj) {
obj.oncontextmenu = function() {
return false;
}
}
function onLoad() {
disableContextMenu(document.getElementById("Pic1"));
}
</script>
</head>
<body onload="onLoad()">
<img id="Pic1" src="Pic1.jpg" alt="Picture" />
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<script language="javascript">
function disableContextMenu(obj) {
obj.oncontextmenu = function() {
return false;
}
}
function onLoad() {
disableContextMenu(document.getElementById("Pic1"));
}
</script>
</head>
<body onload="onLoad()">
<img id="Pic1" src="Pic1.jpg" alt="Picture" />
</body>
</html>
Or use this code:
<img id="Pic1" src="Pic1.jpg" alt="Picture" onmouseover="this.oncontextmenu=function(){return false}" />
Result:

Labels:
HTML XHTML,
Java Script
XHTML table or div height in percentage (%)
<!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" >
<head>
<title>Height 100%</title>
<style type="text/css">
html {
height:100%;
}
body {
height:100%;
margin:0;
padding:0;
}
</style>
</head>
<body>
<table style="height:100%; width:100%" border="1">
<tr><td>Top</td></tr>
<tr><td>Middle</td></tr>
<tr>
<td valign="bottom">
<table style="height:80px; width:100%" border="1">
<tr><td>bottom</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Height 100%</title>
<style type="text/css">
html {
height:100%;
}
body {
height:100%;
margin:0;
padding:0;
}
</style>
</head>
<body>
<table style="height:100%; width:100%" border="1">
<tr><td>Top</td></tr>
<tr><td>Middle</td></tr>
<tr>
<td valign="bottom">
<table style="height:80px; width:100%" border="1">
<tr><td>bottom</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
http://apptools.com/examples/tableheight.php
http://www.webmasterworld.com/forum83/200.htm
Labels:
HTML XHTML
Tuesday, September 16, 2008
Auto delete text on textbox on focus and restore text on unfocus
Code:
Result:
<!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">
<head>
<title> new document </title>
<meta name="generator" content="" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>
<body>
<input type="text" id="email" value="Your e-mail here" onfocus="if(this.value=='Your e-mail here')this.value=''"
onblur="if(this.value=='')this.value='Your e-mail here'" />
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>
<body>
<input type="text" id="email" value="Your e-mail here" onfocus="if(this.value=='Your e-mail here')this.value=''"
onblur="if(this.value=='')this.value='Your e-mail here'" />
</body>
</html>
Result:
Labels:
HTML XHTML
Auto select all text on textbox
Code:
Result:
<!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">
<head>
<title> new document </title>
<meta name="generator" content="" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>
<body>
<input type="text" id="email" value="Your E-mail here" onfocus="this.select()" />
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>
<body>
<input type="text" id="email" value="Your E-mail here" onfocus="this.select()" />
</body>
</html>
Result:
Labels:
HTML XHTML
Saturday, August 30, 2008
Friday, August 29, 2008
Transparent DIV SPAN for Internet Explorer, Firefox
Style sheet:
Apply code:
.transparency
{
filter:alpha(opacity=60);
-moz-opacity: 0.6;
opacity: 0.6;
}
{
filter:alpha(opacity=60);
-moz-opacity: 0.6;
opacity: 0.6;
}
Apply code:
<div class="transparency">A transparent div.</div>
<img src="image_basic.jpg" alt="Sample" class="transparency" />
<img src="image_basic.jpg" alt="Sample" class="transparency" />
Labels:
CSS,
HTML XHTML
Thursday, August 21, 2008
How to vertical align the text within a text box
Use padding-top tab in CSS style.
For an example
Result
For an example
<input type="text" style="width:140px; height:24px; padding-top:4px; font-family:Tahoma; font-size:18px" />
Result
Labels:
CSS,
HTML XHTML
Subscribe to:
Posts (Atom)

