Skip to content

Instantly share code, notes, and snippets.

@plavet
plavet / gist:fb87ad25dcecdffe0994
Created July 5, 2014 22:16
Wordpress - Checking blog id
<?php
global $blog_id;
if( $blog_id == 1 ) :
?>
<!--code here-->
<?php endif;?>
@plavet
plavet / gist:4695560
Last active December 12, 2015 01:59
CSS - Opacity
.transparent_class {
/* IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
/* IE 5-7 */
filter: alpha(opacity=50);
/* Netscape */
-moz-opacity: 0.5;
@plavet
plavet / gist:4190710
Last active October 13, 2015 11:47
CSS - Sprite Setup
.logo, .the_indie_oracle_header, .english, .english_h, .french, .french_h, .home-link, .home-link_h, .books, .books_h, .the_indie_oracle, .the_indie_oracle_h, .appearances_and_events, .appearances_and_events_h, .feedback_and_reviews, .feedback_and_reviews_h, .downloads, .downloads_h, .rw_journey_headline, .naslov_mission, .naslov_where_i_go, .naslov_about_me, .archangels_hollytreasure_headline, .snfb, .snfb_h, .sntw, .sntw_h, .snb, .snb_h, .snms, .snms_h, .snyt, .snyt_h, .books_rick1, .books_rick1_h, .books_arch1, .books_arch1_h, .the_indie_oracle_about, .the_indie_oracle_about_h, .the_indie_oracle_mission, .the_indie_oracle_mission_h, .the_indie_oracle_where, .the_indie_oracle_where_h, .appearances_and_events_radio, .appearances_and_events_radio_h, .appearances_and_events_television, .appearances_and_events_television_h, .appearances_and_events_special, .appearances_and_events_special_h, .appearances_and_events_blogs, .appearances_and_events_blogs_h, .appearances_and_events_signings, .appearances_and_events_
@plavet
plavet / gist:3848702
Created October 7, 2012 15:39
CSS - Vertical align
#kutija{width:100%;height:100%;}
#vertical{/*vertical centering*/
width: 1124px;
height: 616px;
position: absolute;
top: 50%;left: 50%;
margin-top: -308px; margin-left: -562px; /* negativna margina upola da bi centar funkcionisao vertikalno */
}
@plavet
plavet / gist:3390389
Created August 18, 2012 23:46
HTML - IE force compatibity mode off
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
@plavet
plavet / gist:3222472
Created August 1, 2012 01:33
HTML5 - Start
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="keywords" content="key, words">
<meta name="description" content="description">
<link rel="stylesheet" href="stylesheet.css">
<link rel="alternate" title="Website Feed" href="rss.php" type="application/rss+xml">
<link rel="icon" href="favicon.ico" type="image/x-icon">
@plavet
plavet / gist:3071534
Created July 8, 2012 16:08
CSS - transition
#id_of_element {
-webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
@plavet
plavet / gist:2806211
Created May 27, 2012 11:15
Jquery - Ready Function noConflict
jQuery.noConflict();
(function($) {
$(function() {
});
})(jQuery);
@plavet
plavet / gist:2806066
Created May 27, 2012 11:13
Jquery - Ready function Shorthand
$(function() {
});
@plavet
plavet / gist:2805965
Created May 27, 2012 11:13
Jquery - Ready Function
$(document).ready(function() {
});