How To Vertically Align Blocks Using CSS

Author: , June 4th, 2020

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).

How To Calculate CSS Height On The Fly Using Calc

Author: , March 25th, 2020

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) […]

How To List Running AWS Instances in all Regions Sorted by LaunchTime and Email in a Monospaced Font

Author: , July 1st, 2019

How To Create a PayPal-styled Button Using CSS and HTML

Author: , August 31st, 2018

Trademark Symbol

Author: , June 15th, 2018

™ ™

How To Force SVG To Use the Correct Content-Type

Author: , April 22nd, 2016

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

How To Select the First Table Cell in the First Row Using CSS

Author: , April 19th, 2014

table.myTable > tbody > tr:first-child > td:first-child

How To Get SMF 2.0.6 to Open in a New Frame

Author: , October 23rd, 2013

The latest patch version of the SMF forum, 2.0.6, now prevents the site from opening up in an HTML frame. Simply comment out line 104 inside index.php: The Problem: $ grep -Rni X-Frame-Options * index.php:104: header(‘X-Frame-Options: SAMEORIGIN’); The Solution: //header(‘X-Frame-Options: SAMEORIGIN’);

How To Get Smarty html_radios To Display An ID

Author: , October 1st, 2012

Add the parameter label_ids=true. For example:

How To Clear An HTML File Input Field

Author: , July 19th, 2012

An HTML file input can’t be cleared by normal means (i.e. setting the value to null or an empty string) because of browser security restrictions. In most browsers, setting a null value attribute either will have no effect or cause an error. Creating a new element that clones the old element and swap the two […]