Outer Block – set the line-height: {some value} Inner Block – set the line-height: normal, along with display: inline-block; vertical-align: middle; Also works if you set OUTER height instead of the line-height (or together with the same value as the height).
I needed to use an iframe between a pre-defined header and footer that would auto-fill the full height on any size screen. On a desktop, the combined height of the header + footer was 223px and for mobile was 157px, so below find the CSS example: calc(100vh – 223px) – for desktop calc(100vh – 157px) […]
If when trying to use SVG as an image <img src=”image.svg”> or as a CSS background-image, the browser doesn’t display it, your web host is probably serving the SVG with the wrong content-type. Add this to your web server config or .htaccess file: AddType image/svg+xml .svg .svgz
Prerequisites: LESS Compiler YUI Compressor Unzip and copy the build/yuicompressor-2.4.7.jar file to a known location. Java runtime Install of this is beyond the scope of this post
I did this as root. YMMV… gem uninstall less (just in case you used the old way…) git clone git://github.com/ry/node.git (or use wget http://nodejs.org/dist/v0.6.15/node-v0.6.15.tar.gz; tar xvzf node-*) cd node ./configure make make install cd .. curl http://npmjs.org/install.sh | sh npm install less ln -s /usr/lib/nodejs/less/bin/lessc /usr/bin/lessc
If you’re using inline-block on elements that are inline by nature (a, span, etc.), IE7 will not recognize your inline-block. Simply use this IN ADDITION to your CSS to make it work.