
Change the aspect ratio of an image using CSS
24/09/2021In this post I'll show you how to change the aspect ratio of an image or element using CSS, and explain why this is important.
Every office has those useful commands which, inexplicably, nobody can remember when actually needed. In my last office, for some reason, it was MySql database imports and dumps. For nostalgic reasons I’m going to leave this here:
Import
mysql -u username -p [database_name] < [path_to_file.sql]
Export/Dump
mysqldump -u [username] -p [database_name] > [name_of_file.sql]
An easy trick for remembering this is to notice the direction of the less than and greater than signs. Greater than points away from the database (exporting) whereas less than points towards the database (importing).
In this post I'll show you how to change the aspect ratio of an image or element using CSS, and explain why this is important.
Here is how you can fix node incompatibility error, using "Node Sass does not yet support your current environment" as an example.
Need to make a directory in PHP? No Problem! mkdir has you covered... Need to recursively make directories in PHP? mkdir has you covered, too!
Learn how to regenerate and update WordPress media and image sizes both programmatically (without plugin), and also with a handy plugin.
Ever seen constants like __DIR__ and __FILE__ being used in PHP? These are 'Magic Constants', and this is how we can use them.
Learn how to use event listeners to detect and handle single and multiple keypress events in JavaScript. Add modifier keys to your application!