Nice and simple. In your CSS: img.center { display: block; margin-left: auto; margin-right: auto; } And then in your HTML: Courtesy of about tech
Center an image with CSS
ClickHandler for AnchorElement in GWT
ClickHandlers can only be added to Anchors in GWT, and not AnchorElements. The solution however is to wrap the AnchorElement in an Anchor and add the ClickHandler to the Anchor:…
spotify: error while loading shared libraries: libgcrypt.so.11: cannot open shared object file: No such file or directory – SOLVED Ubuntu 15.10
A minor issue with Spotify on Ubuntu 15.10. First install Spotify on Ubuntu 15.10 as per normal, and then execute the following commands: wget http://security.debian.org/debian-security/pool/updates/main/libg/libgcrypt11/libgcrypt11_1.5.0-5+deb7u3_amd64.deb And then: sudo dpkg -i…
Change default upload size PHP WordPress Ubuntu
To edit the default upload size for WordPress on Ubuntu, edit the following file: /etc/php5/apache2/php.ini Search for upload_max_filesize and change this to the desired value. Reload Apache with service apache2 reload
Move Android apps to SD card
To move apps from your internal storage to external SD card storage, follow these steps: Go to settings, and click on “Application manager” Select the app to be moved from…
Fixing Warning: require_once(Cache/Lite.php): failed to open stream Joomla SOLVED
When moving Joomla from one server to another you might come across this nasty little error. To solve, simply edit configuration.php in your www or public_html directory and locate <code…
Creating a desktop/application launcher Ubuntu
Start off by executing the following command: sudo nano /usr/share/applications/YOUR-PROGRAM-NAME.desktop Add the following to the file: [Desktop Entry] Version=13.0 Type=Application Terminal=false Icon[en_US]=/home/USERNAME/PATH-TO-PROGRAM-FOLDER/PROGRAM-ICON.png Name[en_US]=PROGRAM-NAME Exec=/home/USERNAME/PATH-TO-PROGRAM-FOLDER/PROGRAM-NAME.sh Name=PROGRAM-NAME Icon=/home/USERNAME/PATH-TO-PROGRAM-FOLDER/PROGRAM-ICON.png Change permissions and ownership…
Install mod_jk to remove Tomcat port 8080 from URL
mod_jk is an apache module which connects Tomcat to webservers. What this allows is for you to remove any port numbers from the url. In short mod_jk forwards requests from…
Use Gmail or Google Apps email with OpenCart
Input the following details: Select “SMTP” as the mail protocol Insert “ssl://smtp.gmail.com” as the SMTP hostname Insert your SMTP username and SMTP password. This is your email address and password used…
CSS rotate or spin image
Simply add the spin class to the image, and change the value of the text highlighted in red to increase or decrease the rate of spin. .spin { animation: roll 8s…
