Skip to content

Instantly share code, notes, and snippets.

View zetareticoli's full-sized avatar
👨‍💻
Building stuff on the web

Francesco Improta zetareticoli

👨‍💻
Building stuff on the web
View GitHub Profile
@zetareticoli
zetareticoli / Fluid-Grid.markdown
Created May 5, 2014 15:42
A Pen by Francesco Improta.
@zetareticoli
zetareticoli / scrollTop
Created May 15, 2014 12:31
Add/Remove class when scrolling page
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= 160) {
$(".primary-navbar").addClass("navbar-fixed-top");
}
else {
$(".primary-navbar").removeClass("navbar-fixed-top");
}
});
@zetareticoli
zetareticoli / gist:a3db665447ffef19bdf4
Created November 26, 2014 08:52
Remove outline from select focus on Firefox
select:-moz-focusring {
color: transparent;
text-shadow: 0 0 0 #000;
}
@zetareticoli
zetareticoli / Toggle visibility
Created December 2, 2014 15:55
Trigger event click on a button which makes something visible.
$('.button').click(function(event){
event.stopPropagation();
event.preventDefault();
$(this).toggleClass("clicked");
$('.element').toggleClass("visible");
});
display:-moz-inline-stack;
display:inline-block;
zoom:1;
*display:inline;
@zetareticoli
zetareticoli / clearfix
Created October 31, 2010 20:23
Clearfix
.clearfix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.clearfix {
@zetareticoli
zetareticoli / CSS
Created March 10, 2011 14:36
Box shadow curl effect in CSS
ul.box {
margin: 0;
padding: 0;
clear: both;
overflow: hidden; }
ul.box li {
list-style-type: none;
margin: 0 30px 30px 0;
padding: 0;
@zetareticoli
zetareticoli / gist:934071
Created April 21, 2011 09:41
Micro clearfix
/* For modern browsers */
.cf:before,
.cf:after {
content:"";
display:block;
}
.cf:after {
clear:both;
}
@zetareticoli
zetareticoli / gist:1042158
Created June 23, 2011 08:37
Stick footer to bottom
* {
margin: 0;
}
html, body {
height: 100%;
}
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
@zetareticoli
zetareticoli / gist:1760518
Created February 7, 2012 16:21
Drop and Inset tiny shadow
-webkit-box-shadow: 2px 2px 3px rgba(0,0,0,0.08), inset 0 1px 0 white;
-moz-box-shadow: 2px 2px 3px rgba(0,0,0,0.08), inset 0 1px 0 white;
box-shadow: 2px 1px 3px rgba(0,0,0,0.08), inset 0 1px 0 white;