Search Results

Search found 2 results on 1 pages for 'bonny'.

Page 1/1 | 1 

  • use a sprite png in li-class and display in div

    - by bonny
    hello i have some problem with displaying a sprite in a div that is in a li-class. so the structure is: <li id="aa"> <div><a href="#">one</a></div> </li> and the css: li{ width: 120px; height: 18px; margin-top: 5px; } li div{ width: 20px; height: 10px; background-image:url(../images/sprite.png) background-repeat: no-repeat; margin-left: 0px; font-weight:bolder; border: 1px solid #fff; } when i use this i can see the sprite even outside the div. so i tried adding to li background-image: none; that makes the image in the div not visible too. so if there is someone who know about that i really would appreciate. thanks alot.

    Read the article

  • uploading images with the help of arrays and fetch errors

    - by bonny
    i use a script to upload a couple of images to a directory. the code works great in case of just one picture will be uploaded. if i like to upload two images or more and have an extension that is not accepted, the script will upload the one with the extension that is allowed to upload and shows the errormessage for the one who is not accepted. but the upload takes place. that's my first problem. second problem will be: in case of an errormessage i would like to display a message in which it is said, which of the images will be not allowed. i do not know how to fetch this one that has an unaccepted ending into a variable that i can echo to the errormessage. here is the code i use: if(!empty($_FILES['image']['tmp_name'])){ $allowed_extension = array('jpg', 'jpeg', 'png', 'bmp', 'tiff', 'gif'); foreach($_FILES['image']['name'] as $key => $array_value){ $file_name = $_FILES['image']['name'][$key]; $file_size = $_FILES['image']['size'][$key]; $file_tmp = $_FILES['image']['tmp_name'][$key]; $file_extension = strtolower(end(explode('.', $file_name))); if (in_array($file_extension, $allowed_extension) === false){ $errors[] = 'its an unaccepted format in picture $variable_that_count'; continue; } if ($file_size > 2097152){ $errors[] = 'reached maxsize of 2MB per file in picture $variable_that_count'; } if (count($errors) == 0){ $path = "a/b/c/"; $uploadfile = $path."/".basename($_FILES['image']['name'][$key]); if (move_uploaded_file($_FILES['image']['tmp_name'][$key], $uploadfile)){ echo "success."; } } } } hope it will be clear what i like to approach. if there is someone who could help out i really would appreciate. thanks a lot.

    Read the article

1