.Positioning

There are 4 states to the position property: position: static;    /*(default)*/ Not affected by the top, bottom, left, and right properties. position: relative; Positioned relative to its normal position.Setting the top, right, bottom, and left properties will cause it to be adjusted away from its normal position. Other content will not be adjusted to […]

Read More

.Images General

Specifying Image Size (e.g. using double resolution images for retina displays) .header_logo {background-image: url(images/header_logo.png);background-size: 260px 55px;width: 260px;height: 55px;border: none;} Adding an image (e.g. an icon) to the left of some text Cropping overflow: hidden; Curved Corners border-radius: 4px 4px 4px 4px; Specifying Image Class <a href=”school_home.php”><img class=”my_thumb_class” src=”a.png” ></a> img.my_thumb_class { Floating An Image Over […]

Read More

.Useful CSS

Setting style <div class="style1"> <div style="color:#FF0000"> <span style="color:#FF0000">colored</span> Size width: 100%; height: 20px; Padding padding: 2px; (All) padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; Margin margin: 2px; (All) margin: 1px 2px; (Top+Bottom, Right+Left) margin: 1px 2px 3px; (Top, Right+Left, Bottom) margin: 1px 2px 3px 4px; (Top, Right, Bottom, Left) margin-top: 2px; margin-right: 2px; margin-bottom: […]

Read More

Site Root

You can’t do this in php: require_once ‘/s3_settings.php’; So instead do this: require_once($_SERVER[‘DOCUMENT_ROOT’] . ‘/s3_settings.php’);

Read More

Upload A Server File

This uses an old aws method Upload A Saved File $upload_file = if (file_exists($upload_file)) { try { $options = array('key' => $s3_accesskey, 'secret' => $s3_secretkey); $s3 = new AmazonS3($options); //Upload file $response = $s3->create_object($s3_thumbnails_bucket, basename($upload_file), array( 'fileUpload' => $upload_file, //'storage' => AmazonS3::STORAGE_REDUCED, 'acl' => AmazonS3::ACL_PUBLIC )); if ($response->isOK()) echo "Upload success"; else echo "Upload failed"; […]

Read More

Using WordPress Dev Javascript

WordPress minifies the core javascript files.  For instance it uses editor.js instead of the original source code file editor.dev.js.  You can’t just rename the .dev.js files as the minifying also changes things such as variable names.  However you can tell wordpress to use the dev.js files instead by adding this to wp-config.php (before any requires): define(‘SCRIPT_DEBUG’, true);

Read More