CSS Protips

A collection of tips to help take your CSS skills pro. Use :not() to Apply/Unapply Borders on Navigation Add Line-Height […]

Read More

CSS Refresher Notes

Table of Contents Positioning Display Floats CSS Selectors Selector efficiency Repaints and Reflows CSS3 Properties CSS3 Media queries Responsive Web […]

Read More

Flip an Image

img { -moz-transform: scaleX(-1); -o-transform: scaleX(-1); -webkit-transform: scaleX(-1); transform: scaleX(-1); filter: FlipH; -ms-filter: “FlipH”; }

Read More

Remove Paragraph Tags From Around Images

function filter_ptags_on_images($content){ return preg_replace(‘/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU’, ‘\1\2\3’, $content); } add_filter(‘the_content’, ‘filter_ptags_on_images’);

Read More

Force Perfect JPG Images

WordPress doesn’t use 100% quality for images served on the website, to conserve space and bandwidth. add_filter( ‘jpeg_quality’, ‘smashing_jpeg_quality’ ); […]

Read More