Monday, May 24, 2010

Replacing Link Text with an Image using CSS

To replace link text by an image using CSS. This works for most of the browsers - tested on IE8, FF, Chrome...
<html>
<head>
 <style>
  a.enlarge{ 
   width:67px; /*width of the image used*/
   height:21px; /*height of the image used*/
   text-indent:-9000px; 
   display:block; 
   float:left; 
   margin-right:4px; 
   margin-bottom:4px;
   background:url('/images/enlarge.png') top left no-repeat;
  }
  a.enlarge:hover{
   background:url('/images/enlarge_hover.png') top left no-repeat; 
  }
  </style>
</head>
<body>
<a href="#" class="enlarge">enlarge</a>
</body>
</html>

cPanel/WHM magic_quote_gpc

I don't exactly know, why the magic_quotes_gpc is turned On by default in cPanel/WHM even for PHP 5.3.2 when it has been deprecated from PHP 5.3.0. And you can't even turn them off from WHM.

To globally turn off the thing (which is what you should do), you will have to login as root, edit the /usr/lib/php.ini, find magic_quotes_gpc and set it to Off.