Skip to main content


Showing posts from 2011

Creating arbitrary grid layouts in HTML/CSS

I love building websites. But, the long arduous efforts to get page layouts done, scare me. So started experimenting with ways to create arbitrary grid layouts, so I can write a layout manager someday , to take care of this business for me. I refer the reader to this excellent post on "What does width:100% do in CSS"  to get a feel for block elements vs inline elements. To summarize, block elements generate a newline before and after them, but setting their width to something takes effect absolutely, i.e whether or not there is enough content inside the element to fill up the space. This is much like "fill_parent" in the android world. Inline elements are the opposite. They don't have the newline , but by default they expand only as much as their content, like "wrap_content" in android world. However, what we need is a container that would behave as a block element, housing child elements that will be laid out horizontally, as well as vertica

Whats new in HTML5?

I started reading up on html5 tags on my favorite .. Here are the ones I find very interesting and useful to know. Note: some of them are not supported yet in major browsers. New Features : Offline storage support ditching cookies. New Tags Elements : menu - Not yet supported. But a step towards making web sites like desktop apps nav - Gives a navigation header of links meter - Provides a progress bar like control to denote process completion progress - Similar to meter above time - represent time as machine parsable wbr - Mark places that are suitable for word breaking. useful in formatting paragraphs media : audio - Self explanatory play audio figcaption / figure - caption for an image and an image or chart itself. video - Most expected feature that is touted to rid of all the flash woes.  track - Support for closed captions etc. graphics : canvas - Basically treat browser window area as a drawable canvas element using js.  f

Enabling SSL in MAMP

Open /Applications/MAMP/conf/apache/httpd.conf, Add the line LoadModule ssl_module modules/          or uncomment this out if already in the conf file Also add lines to listen on 80, if not there already Listen 80   ServerName localhost:80 Open /Applications/MAMP/conf/apache/ssl.conf. Remove all lines as well as . Find the line defining SSLCertificateFile and SSLCertificateKeyFile, set it to SSLCertificateFile /Applications/MAMP/conf/apache/ssl/server.crt SSLCertificateKeyFile /Applications/MAMP/conf/apache/ssl/server.key Create a new folder /Applications/MAMP/conf/apache/ssl. Drop into the terminal and navigate to the new folder cd /Applications/MAMP/conf/apache/ssl Create a private key, giving a password openssl genrsa -des3 -out server.key 1024 Remove the password cp server.key server-pw.key openssl rsa -in server-pw.key -out server.key Create a certificate signing request, pressing return for defa

Wamp enable mod_rewrite

To get mod rewrite working with Apache under wamp.. Near the following block in httpd.conf # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None to # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All Uncomment the followiung line in httpd.conf LoadModule rewrite_module modules/ Restart Apache !!

Wampserver & php

For some stupid reason, Wamp grabs the main installation of PHP outside wamp by default. This makes no sense to me since the sole purpose of using Wamp was to get an all-at-one-shot solution.. Anyways, here is something to get it to use the php included with wamp (!!) Add the following line to the end of the httpd.conf (click on the wamp icon in system tray , choose Apache > httpd.conf) PHPIniDir "D:/wamp/bin/php/php5.3.5"