Skip to content

Instantly share code, notes, and snippets.

View vedranjaic's full-sized avatar

Vedran Jaic vedranjaic

  • NEOS
  • Zagreb, Croatia
View GitHub Profile
@vedranjaic
vedranjaic / rwd_embeded_videos.css
Created May 26, 2013 17:46
css: Responsive embeded videos
/* wrap <iframe> in a div */
.responsive-video {
position: relative;
padding-bottom: 56.25%; /* 16/9 ratio */
padding-top: 30px; /* IE6 workaround*/
height: 0;
overflow: hidden;
}
.responsive-video iframe,
.responsive-video object,
@vedranjaic
vedranjaic / printing_acronyms.css
Created May 26, 2013 17:45
css: Printing acronyms with content from title tag
acronym:after {
content: " (" attr(title) ")";
}
@vedranjaic
vedranjaic / iphone_prevent_font_scaling.css
Created May 26, 2013 17:44
css: Prevent font resize on landscape - iOS/WinMobile
/* prevent font scaling in landscape */
@media screen and (max-device-width:480px) {
html {
-webkit-text-size-adjust: none;
-ms-text-size-adjust:none;
}
}
@vedranjaic
vedranjaic / scroll_top.js
Created May 26, 2013 17:43
jQ: Scroll to top
$(document).ready(function(){
$("#ANCHOR_ID").click(function(){
$('html, body').animate({
scrollTop: '0px'
},
500);
return false;
})
});
@vedranjaic
vedranjaic / document_ready.js
Created May 26, 2013 17:41
jQ: document.ready()
$(document).ready(function() {
// put all your jQuery goodness in here.
});
@vedranjaic
vedranjaic / iphone_disable_autozoom_input.css
Created May 26, 2013 17:40
css: iPhone - Disable auto-zoom on input fields
/*
* disable auto-zoom on iphone input field focus
* http://www.456bereastreet.com/archive/201212/ios_webkit_browsers_and_auto-zooming_form_controls/
*/
input[type='text']:focus,
input[type='number']:focus,
textarea:focus {
font-size: 16px;
}
@vedranjaic
vedranjaic / if_ie_conditional_statements.html
Created May 26, 2013 17:37
html: If IE & IE Mobile Conditional Statement
<!--
Operator Description
IE represents Internet Explorer; if a number value is also specified, it represents a version vector
lt less than operator
lte less than or equal to
gt greater than
gte greater than or equal to
! the NOT operator
() subexpression operator
& the AND operator
@vedranjaic
vedranjaic / ie_css_hacks.css
Created May 26, 2013 17:35
css: IE CSS Hacks
/*IE10 and above */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
/* IE10+ specific styles go here */
}
/* IE8 and below */
body {
color: red; /* all browsers, of course */
color: green1; /* IE8 and below */
}
@vedranjaic
vedranjaic / media_queries.css
Created May 26, 2013 17:33
css: Media Queries
/************************** iPads (portrait and landscape) */
@media
only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
/* Styles */
}
/************************** iPads (landscape) */
@media
@vedranjaic
vedranjaic / css_loader.css
Created May 26, 2013 17:26
css: CSS Loader
.loader {
text-align: center;
}
.loader span {
display: inline-block;
vertical-align: middle;
width: 10px;
height: 10px;
margin: 50px auto;
background: black;