Tag Archive for 'web'

DIV vs. TABLES

Tables were not created for web layout or positioning. Tables were created to provide structure to data. They were created to contain tabular data. Though the early html standard uses table for layout purposes, yet it is not the best tool for it. The main disadvantage of using tables to layout a page is its complex code(specially if nested tables are present) and limited attributes.

Div on the other hand are very much flexible. You can position the div anywhere on your page and you can position anything and anywhere on it. Unlike tables which can only be positioned on LEFT, CENTER, or RIGHT side of your page. In short, Div has no limitations when it comes to positioning, resizing, and designing.

I found a site that teaches CSS layouting (page layout using div) that is very easy to understand and easy to implement. Very helpful for both the novice and the css veteran. Check it at glish.com.

Passing URL variables with non-URL-friendly characters

When passing information via URL variables, we have to be careful that those variables do not contain non-URL-friendly characters. This includes spaces and non-alpha-numeric characters…
to be able to pass this characters, you have to first convert it to URL-safe hexadecimal escape characters…

And to do that, just use the URL encode function..

In classic Asp and Asp.Net:
Server.UrlEncode()

In classic PHP:
urlencode()

In classic Coldfusion:
URLEncodedFormat()