Search the Community
Showing results for tags 'icon'.
-
I've followed a few tutorials, as I've never touched drop down before (more of a conventional navbar guy ). But none are dropping the nested list . I even took the code from one, no changes made, and it still didn't drop the menu This is as far as I got on this tutorial (http://line25.com/tutorials/how-to-create-a-pure-css-dropdown-menu) before coming here #topbar-navigation { width: 101%; margin: 0 auto; ; margin-top: -8px; height: 56px; background: #ffffff; display: inline-block; text-align: center; min-width: 1100px; -webkit-box-shadow: 0 1px 8px 0px #b5b5b5; -moz-box-shadow: 0 1px 8px 0px #b5b5b5; box-shadow: 0 1px 8px 0px #b5b5b5; } #topbar-navigation ul { display: inline-table; list-style: none; position: absolute; margin-left: auto; margin-right: auto; margin-top: 20px; top: 0; left: 765px; right: 0; } #topbar-navigation ul:after { content: ""; clear: both; display: block; } #topbar-navigation ul ul { display: none; } #topbar-navigation ul li:hover > ul { display: block; } #topbar-navigation ul li a { display: block; padding: 25px 40px; color: #99a0a8; text-decoration: none; font-family: 'sinkin_sans400_regular'; font-size: 12px; } <div id="topbar-navigation"> <a href="index.php"><img src="images/moduniverselogo.png" class="site-logo" draggable="false" /></a> <ul> <li><a href="#">Welcome, <b style="color:#ff924e" ><?php echo $user->data['username'] ?></b></a></li> <ul> <li><a href="#">My Profile</a></li> <li><a href="#">Edit Account</a></li> <li><a href="#">Log Out</a></li> </ul> </ul> </div> I want it nested to the right like on the site currently: http://i.imgur.com/llZPUbZ.png
-
I found a script that resizes all images in a given directory to a new size. I need some guidance to modify this script to my needs. The script resizes images to a specified image width and height. I would like to change that to make it scale the image to half the original size if it is above a certain size. I would also like for it to create a new image of a given size of 150px * 150px [icons]. How can I achieve this? <?php //Maximize script execution time ini_set('max_execution_time', 0); //Initial settings, Just specify Source and Destination Image folder. $ImagesDirectory = 'images/gallery/'; //Source Image Directory End with Slash $DestImagesDirectory = 'images/main/'; //Destination Image Directory End with Slash $NewImageWidth = 500; //New Width of Image $NewImageHeight = 500; // New Height of Image $Quality = 80; //Image Quality //Open Source Image directory, loop through each Image and resize it. if($dir = opendir($ImagesDirectory)){ while(($file = readdir($dir))!== false){ $imagePath = $ImagesDirectory.$file; $destPath = $DestImagesDirectory.$file; $checkValidImage = @getimagesize($imagePath); if(file_exists($imagePath) && $checkValidImage) //Continue only if 2 given parameters are true { //Image looks valid, resize. if(resizeImage($imagePath,$destPath,$NewImageWidth,$NewImageHeight,$Quality)) { echo $file.' resize Success!<br />'; /* Now Image is resized, may be save information in database? */ }else{ echo $file.' resize Failed!<br />'; } } } closedir($dir); } //Function that resizes image. function resizeImage($SrcImage,$DestImage, $MaxWidth,$MaxHeight,$Quality) { list($iWidth,$iHeight,$type) = getimagesize($SrcImage); $ImageScale = min($MaxWidth/$iWidth, $MaxHeight/$iHeight); $NewWidth = ceil($ImageScale*$iWidth); $NewHeight = ceil($ImageScale*$iHeight); $NewCanves = imagecreatetruecolor($NewWidth, $NewHeight); switch(strtolower(image_type_to_mime_type($type))) { case 'image/jpeg': case 'image/png': case 'image/gif': $NewImage = imagecreatefromjpeg($SrcImage); break; default: return false; } // Resize Image if(imagecopyresampled($NewCanves, $NewImage,0, 0, 0, 0, $NewWidth, $NewHeight, $iWidth, $iHeight)) { // copy file if(imagejpeg($NewCanves,$DestImage,$Quality)) { imagedestroy($NewCanves); return true; } } } ?>