Select Page

Responsive Breakpoints

// Responsive breakponts // ——————— // Fallback / v-small .class{ color:orange; } // mobile @media (min-width: 576px) { .class{ color:white; } } // large mobile @media (min-width: 768px) { .class{ color:red; } } // tablet...

Remove wordpress admin panels

By default, the WordPress dashboard does look quite cluttered with too many widgets. You can of course add or remove the dashboard widgets manually, but this can be a pain if you manage a lot of sites. Also if you are building websites for clients the default widgets...

PHP string truncate

The Function Here’s the PHP truncate function (must be in tags): 1 2 3 4 5 6 7 8 9 function truncate($text, $chars = 120) { if(strlen($text) > $chars) { $text = $text.’ ‘; $text = substr($text, 0, $chars); $text = substr($text, 0, strrpos($text ,’...

Black and White filter

CSS3 has some really great, convenient features. One that you may or may not know about is you can convert an image to black and white using only CSS. This is great when you don’t want/need to edit the original image. Here’s how to do it The CSS 1 2 3 .blackandwhite {...

On page class switcher

<div class=”test” style=”padding: 1rem; font-size: 12px; position: absolute; left: 0; margin-left: 1rem; width: 160px; top: 50px; border: solid 1px #000; background-color: #00000055;”> <button onclick=”mbStyle1()”...