How to Avoid ugly border around images & links using css

Every web developer would come across this issue. In Firefox, when you’d clicked a image or link there you’ll see a dotted border around the image or link. It makes ugly to the website. I googled around this issue & found a way to resolve it. If you see the image below you could easily identify the bug.

To resolve this issue just a single line css is enough.

<style type="text/css">
a:active, a:focus{outline: 0;}
</style>;

Courtesy:  mycodings.blogspot.com

In-line Block for cross browsing

li {
width: 100px;
min-height: 150px;
display: inline-block;
vertical-align: top;
*display: inline;
margin: 15px;
zoom: 1;
_height: 150px;
border: 2px solid #000000;
display: -moz-inline-stack;
}

html ui li no bullet

To remove the bullet, use this below stylesheet, this will apply to all the list across the page.
  li {
     list-style: none;
  }

If you want for only for specific list, use ID
  #listBar li {
     list-style: none;
  }

email validation using regular expression with PHP


<?php
if(!empty($_POST['email'])){
	$regularexp = "^[A-Za-z0-9\.|-|_]*[@]{1}[A-Za-z0-9\.|-|_]*[.]{1}[a-z]{2,5}$";
	$email = $_POST['email'];
	$validemail = ereg($regularexp, $email);
	if ($validemail)
	{
		echo "<div style='color:green;'> <b>'$email'</b> is a valid email</div>";
	}
	else
		echo "<div style='color:red;'> <b>'$email'</b> is not a valid email</div>";
}else{
	echo "<div style='color:red; font-weight:bold;'> Please enter email</div>";
}
?>
<html>
	<body>
	<h2>Email Validator</h2>
	<form method="post">
		<div style="width:50px; font-family:Verdana, Arial, Helvetica, sans-serif; float:left; padding-top:3px;">
			Email:
		</div>

		<div style="width:300px">
			<input type="text" name="email" />
		</div>

		<input type="submit" />
	</form>
	</body>
</html>

Fly move according to the mouse movement

This code shows the movement of the object fly according to the mouse movement


var flySpeed:Number = 0.1;

fly.addEventListener(Event.ENTER_FRAME,flyMove);

function flyMove(event:Event):void {

	var fly_x:Number = (mouseX - fly.x) * flySpeed;
	var fly_y:Number = (mouseY - fly.y) * flySpeed;
	var angle = Math.atan2(fly_y, fly_x);
	fly.x += fly_x;
	fly.y += fly_y;
	fly.rotation = 90 +(angle * 180 / 3.141593E+000);

}

This movie requires Flash Player 9

CSS unicode-bidi using html

This code shows how to display text with different reading directions


<html>
	<body>
		<p style="direction:rtl;">
			Text using right to left direction
		</p>

		<p style="direction:rtl; unicode-bidi:bidi-override">
			Text using right to left direction and unicode-bidi
		</p>
	</body>
</html>