Skip to content

Instantly share code, notes, and snippets.

Alex Meub meub

View GitHub Profile
@meub
meub / gist:5936187
Created Jul 5, 2013
Wrap around a fixed element
View gist:5936187
div {
border:4px solid black;
height:100px;
position:fixed;
left:250px;
right: 0;
}
A fixed position happens relative to the viewport, so that the positioning properties left, right, top, and bottom, as well as width and height will position and size the element based on the size and boundaries of the viewport.
@meub
meub / gist:5864429
Created Jun 26, 2013
Semantic Div with Anchor
View gist:5864429
.container{
width:200px;
height:200px;
background-color:black;
color:white;
/*Important:*/
position:relative;
}
/*Important:*/
@meub
meub / gist:5828616
Last active Dec 18, 2015
Mac Setup ProTips™
View gist:5828616

##Mac Setup

####1. Disable Mouse acceleration permanently (must reboot)

defaults write .GlobalPreferences com.apple.mouse.scaling -1

####2. Install TotalTerminal Run this command to fix duplicate terminal windows:

defaults write com.apple.Terminal TotalTerminalCloseWindowsOnStart -bool YES
@meub
meub / gist:5818904
Created Jun 19, 2013
Sticky Footer CSS
View gist:5818904
html {
position: relative;
min-height: 100%;
}
body {
margin: 0 0 100px; /* bottom = footer height */
}
.footer {
position: absolute;
left: 0;
@meub
meub / gist:5807911
Created Jun 18, 2013
Cross Browser Inline Block CSS
View gist:5807911
/* Inline Block X-Browser Hack */
display:-moz-inline-stack;
display:inline-block;
zoom:1;
*display:inline;
You can’t perform that action at this time.