Tuesday, April 1, 2014
how to add google translate
http://support.jimdo.com/tutorials/apps-and-plugins/how-to-add-google-translate-to-your-website/
Monday, March 31, 2014
Sunday, March 23, 2014
remove text decoration
CSS CODE
#navcontainer ul
{
margin: 0;
padding: 0;
list-style-type: none;
}
#navcontainer ul li { display: inline; }
#navcontainer ul li a { text-decoration: none; }
HTML CODE
css menu N box-shadow
ul li{ text-decoration:none; padding-left:50px; padding-right:50px}
.nav li{ display:block; padding: 5px 5px; background:#09C;margin-bottom:1px; width:170px}
li:hover{background:#99F}
https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow
Monday, March 17, 2014
embed font
@font-face {
font-family:'xyzfont';
src: url('fonts/abc-font.eot?') format('eot'),
url('fonts/abc-font.woff') format('woff'),
url('fonts/abc-font.ttf') format('truetype');
}
.siemreap{
color:#FFF; float:right ; font-size:24px; margin: 10px 10px;
font-family: 'xyzfont', Georgia, Arial;
}
Tuesday, March 11, 2014
css third level dropdown menu
nav li ul li ul li{
background: #e4ca3b;
display: none;
height: auto;
padding: 0px;
margin: 0px;
border: 0px;
position: absolute;
width: auto;
z-index: 200;
left:3px;
}
nav li ul li:hover ul li{
height: auto;
padding: 0px;
margin: 0px;
border: 0px;
position:relative;
width: auto;
z-index: 200;
left:3px;display:block
}
Friday, February 14, 2014
compress image during upload
function compress_image($source_url, $destination_url, $quality) {
$info = getimagesize($source_url);
if ($info['mime'] == 'image/jpeg')
$image = imagecreatefromjpeg($source_url);
elseif ($info['mime'] == 'image/gif')
$image = imagecreatefromgif($source_url);
elseif ($info['mime'] == 'image/png')
$image = imagecreatefrompng($source_url);
imagejpeg($image, $destination_url, $quality);
return $destination_url;
}
if(isset($_FILES['add_image1'])){
$tt=time();
$target_path = "../product_image/".$tt;
$target_path = $target_path . basename( $_FILES["add_image1"]['name']);
$pn="product_image/".basename( $_FILES["add_image1"]['name']);
$ch=strtolower(substr($pn, strrpos($pn,".")+1));
if($ch=="jpg" or $ch=="png" or $ch=="jpeg" or $ch=="gif"){
if(move_uploaded_file($_FILES['add_image1']['tmp_name'], $target_path)) {
mysqli_query($db_con,"update table_question set image='".$target_path."' where question_id=".$pro_id);
$destination=$target_path;
$t=compress_image($target_path,$destination, 50);
if($t!=''){
mysqli_query($db_con,"update table_question set image='".$filename."' where question_id=".$pro_id);
}
}
}
}
Subscribe to:
Posts (Atom)