<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"><id>tag:blogger.com,1999:blog-6718406939865222936</id><updated>2012-03-03T07:08:23.408+01:00</updated><category term="syntax error" /><category term="VBScript" /><category term="web application" /><category term="flash" /><category term="ranking methods" /><category term="navigator object" /><category term="RFC822 date" /><category term="create table" /><category term="PDF T-Maker" /><category term="cleartype" /><category term="dynamic descriptions" /><category term="dynamic keywords" /><category term="instr" /><category term="adobe" /><category term="ie netrenderer" /><category term="ranking" /><category term="jQuery.browser" /><category term="web safe area" /><category term="Server.MapPath" /><category term="alter column" /><category term="special characters" /><category term="MOD" /><category term="content.width" /><category term="broswer detection" /><category term="FileExists" /><category term="extension" /><category term="online help" /><category term="lightbox" /><category term="email" /><category term="coalesce" /><category term="progress indicator" /><category term="preloaders" /><category term="transitional" /><category term="at-rules" /><category term="next" /><category term="ltrim" /><category term="while" /><category term="backslash" /><category term="prompt box" /><category term="elipse" /><category term="import mailbox" /><category term="reset css" /><category term="request.querystring" /><category term="request.cookies" /><category term="current user online" /><category term="Christmas" /><category term="selected" /><category term="property" /><category term="multicell" /><category term="padding" /><category term="web developer" /><category term="experiment" /><category term="IIS" /><category term="rotate" /><category term="input type" /><category term="substring" /><category term="creating an help file" /><category term="server-side include" /><category term="compatibility" /><category term="ranking technics" /><category term="emulator" /><category term="z-index" /><category term="tablets" /><category term="adodb.recordset" /><category term="free images" /><category term="unique identifier" /><category term="statistics" /><category term="RPC over HTTP" /><category term="notification" /><category term="overlapping" /><category term="blog rank" /><category term="technorati" /><category term="56K" /><category term="alert box" /><category term="SQL Scheduler" /><category term="month" /><category term="embed videos" /><category term="iframe" /><category term="alter table" /><category term="datepart" /><category term="colours" /><category term="tooltips" /><category term="jQuery UI" /><category term="template" /><category term="document object model" /><category term="content rotator" /><category term="new features" /><category term="toolbox" /><category term="creativity" /><category term="session_onstart" /><category term="Steve Jobs" /><category term="multilingual web sites" /><category term="http request" /><category term="SQL Server Management Studio" /><category term="newid()" /><category term="analog clock" /><category term="response" /><category term="sound" /><category term="description" /><category term="counter-increment" /><category term="modernizr" /><category term="typeface.js" /><category term="custom font" /><category term="request.form" /><category term="handheld" /><category term="image" /><category term="head" /><category term="web analysis" /><category term="InStrRev" /><category term="create index" /><category term="update" /><category term="user experience" /><category term="dateadd" /><category term="exchange server" /><category term="declaration" /><category term="xmlhttp.status" /><category term="resizeMyBrowser" /><category term="cookies" /><category term="top.opener" /><category term="fittext" /><category term="the cult of done" /><category term="export to word" /><category term="remainder" /><category term="hand-drawn" /><category term="passcode lock" /><category term="round corner" /><category term="alexa" /><category term="final user" /><category term="autocomplete" /><category term="resizable" /><category term="adodb.command" /><category term="print" /><category term="slider" /><category term="palette" /><category term="HTML Dog" /><category term="browscap.ini" /><category term="analogue clock" /><category term="please wait" /><category term="add-in" /><category term="browser usage" /><category term="media queries" /><category term="includes" /><category term="virtualisation" /><category term="fadeOut" /><category term="GetDrive" /><category term="outlook pst viewer" /><category term="active directory" /><category term="li" /><category term="relative" /><category term="word-wrap" /><category term="document.getElementById" /><category term="plug-in" /><category term="execute stored procedures" /><category term="method" /><category term="browsershots" /><category term="database backup" /><category term="upgrading" /><category term="return confirm" /><category term="response.cookies" /><category term="bulleted list" /><category term="sum" /><category term="nav" /><category term="css" /><category term="pseudo classes" /><category term="rand()" /><category term="polls" /><category term="MSWC.BrowserType" /><category term="ms excel" /><category term="pdfforge" /><category term="rtrim" /><category term="BlockUI" /><category term="float" /><category term="chm" /><category term="backup" /><category term="vgx.dll" /><category term="asp" /><category term="css gradient" /><category term="re-design" /><category term="jQuery" /><category term="truncate table" /><category term="mysql" /><category term="attribute" /><category term="font detection" /><category term="XML response" /><category term="toolbar" /><category term="XML" /><category term="info site" /><category term="regular expression" /><category term="offtopic" /><category term="gui" /><category term="LDAP" /><category term="case" /><category term="ie8" /><category term="IN" /><category term="Google Analytics" /><category term="response.isclientconnected" /><category term="try" /><category term="window effect" /><category term="parameters.append" /><category term="blog comments" /><category term="file exists" /><category term="ie7" /><category term="ActiveSync" /><category term="Google Webmaster Central" /><category term="Mozilla Developer Network" /><category term="SSMS Tools Pack" /><category term="screen resolutions" /><category term="selectors" /><category term="center" /><category term="2011" /><category term="window.open" /><category term="GUID" /><category term="layer styles" /><category term="related post widget" /><category term="web development" /><category term="pivot" /><category term="CSS3 pie" /><category term="terminology" /><category term="help" /><category term="recovery storage group" /><category term="opentextfile" /><category term="each" /><category term="scrollHeight" /><category term="wazala" /><category term="keyword" /><category term="onfocus" /><category term="OR" /><category term="AddHeader" /><category term="owanotify" /><category term="background" /><category term="conditional comment" /><category term="progressive enhancement" /><category term="linear" /><category term="count" /><category term="manipulate property" /><category term="GetFile" /><category term="debug" /><category term="at-media" /><category term="drop database" /><category term="tool" /><category term="tabs" /><category term="background image" /><category term="php" /><category term="loops" /><category term="internet explorer" /><category term="modify_date" /><category term="random" /><category term="custom feed" /><category term="modem" /><category term="execute" /><category term="google blogger ranking" /><category term="what the font" /><category term="FPDF" /><category term="merge mailbox" /><category term="vml" /><category term="create database" /><category term="font" /><category term="balloon" /><category term="opacity" /><category term="session_onend" /><category term="animated gif" /><category term="border-radius" /><category term="live character count" /><category term="day" /><category term="blogger" /><category term="break-word" /><category term="fixed" /><category term="strict" /><category term="soundex" /><category term="Google Web Fonts" /><category term="call" /><category term="wend" /><category term="target.window.location.href" /><category term="mobile devices" /><category term="structure" /><category term="doctype" /><category term="PHI" /><category term="article" /><category term="visitors" /><category term="window.close" /><category term="rtt" /><category term="CodePage" /><category term="OMA" /><category term="design inspiration" /><category term="GetAllContent" /><category term="avg" /><category term="browsertype" /><category term="do" /><category term="e-commerce" /><category term="google+" /><category term="simulator" /><category term="progressbar" /><category term="embedded image" /><category term="topics" /><category term="browser support" /><category term="positioning" /><category term="draggable" /><category term="chrome" /><category term="option.explicit" /><category term="selectivzr" /><category term="default stylesheet" /><category term="background-origin" /><category term="inner join" /><category term="video" /><category term="captha" /><category term="nested list" /><category term="response.buffer" /><category term="scrollable" /><category term="Linked Servers" /><category term="transform" /><category term="loader" /><category term="response.flush()" /><category term="len" /><category term="scheme" /><category term="section" /><category term="load content" /><category term="table" /><category term="datename" /><category term="createparameter" /><category term="absolute" /><category term="font-face" /><category term="onblur" /><category term="file name" /><category term="left" /><category term="open()" /><category term="ms word" /><category term="outlook mobile access" /><category term="bigtext" /><category term="alternate colours" /><category term="infinite scroll" /><category term="search box" /><category term="sys.tables" /><category term="wordpress" /><category term="submenu" /><category term="pdf" /><category term="vertical text" /><category term="counter-reset" /><category term="global.asa" /><category term="iPhone" /><category term="w3c wiki" /><category term="text" /><category term="alert" /><category term="radial" /><category term="form validation" /><category term="try...catch" /><category term="ie6" /><category term="application_onend" /><category term="CMS" /><category term="BuildPath" /><category term="isdate" /><category term="feedburner" /><category term="T-SQL" /><category term="content" /><category term="my fonts" /><category term="data type" /><category term="loop" /><category term="XMLHttpRequest" /><category term="folder" /><category term="application_onstart" /><category term="Windows Live Writer" /><category term="event" /><category term="writing-mode" /><category term="accordion" /><category term="CharSet" /><category term="DOM tree" /><category term="year" /><category term="conditional statement" /><category term="the web thought" /><category term="canvas" /><category term="getdate" /><category term="textarea" /><category term="footer" /><category term="entity codes" /><category term="response.flush" /><category term="JSON" /><category term="browser capabilities component" /><category term="menu" /><category term="confirm box" /><category term="drop index" /><category term="golden ratio" /><category term="art of coding" /><category term="catch" /><category term="SQL Server utilities" /><category term="background-size" /><category term="header" /><category term="highlight" /><category term="pop2owa" /><category term="fluid" /><category term="datediff" /><category term="real-time" /><category term="bkf" /><category term="post" /><category term="ie" /><category term="GetFolder" /><category term="replace" /><category term="slowed down" /><category term="columns" /><category term="export blog" /><category term="getfilename" /><category term="mso-number-format" /><category term="div" /><category term="pseudo elements" /><category term="export mailbox" /><category term="every windows version" /><category term="ul" /><category term="Acucobol" /><category term="problem" /><category term="openquery" /><category term="ServerXMLHTTP" /><category term="dynamic columns" /><category term="ampersand" /><category term="3d" /><category term="export to mdb" /><category term="parent" /><category term="Google Api" /><category term="drop table" /><category term="functions" /><category term="syntax" /><category term="date" /><category term="insert" /><category term="validation" /><category term="meta tags" /><category term="writing an help file" /><category term="firefox" /><category term="DOM" /><category term="online shop" /><category term="popup" /><category term="fit screenauto" /><category term="cast" /><category term="sql query" /><category term="mailbox store" /><category term="outlook 2003" /><category term="link" /><category term="Scripting.FileSystemObject" /><category term="constrains" /><category term="built-in stylesheet" /><category term="background-gradient" /><category term="animated photos" /><category term="remote server" /><category term="get" /><category term="blogs" /><category term="double quotes" /><category term="html tables" /><category term="bar charts" /><category term="at-import" /><category term="Personal Websites" /><category term="apostrophe" /><category term="Shalom Help Maker" /><category term="popup boxes" /><category term="mistakes" /><category term="object" /><category term="meta tag" /><category term="css3" /><category term="aside" /><category term="pst" /><category term="browser check" /><category term="columnizer" /><category term="margin" /><category term="self.close" /><category term="fibonacci" /><category term="subroutines" /><category term="html 4.01" /><category term="max" /><category term="dynamic table" /><category term="screen.width" /><category term="RSG" /><category term="graceful degradation" /><category term="html" /><category term="color" /><category term="session" /><category term="coding" /><category term="MOD function" /><category term="file upload" /><category term="one page" /><category term="font size" /><category term="isnull" /><category term="components" /><category term="JavaScript" /><category term="ms access" /><category term="web design" /><category term="sitemap" /><category term="shapes" /><category term="value" /><category term="jQuery tools" /><category term="apple" /><category term="permission" /><category term="forums" /><category term="ContentRotator" /><category term="collection" /><category term="create_date" /><category term="windows server" /><category term="random quotes" /><category term="hand drawn" /><category term="evolution" /><category term="isnumeric" /><category term="form" /><category term="IDENTITY" /><category term="refresh parent window" /><category term="DataTables" /><category term="zoom" /><category term="ExMerge" /><category term="multiple images" /><category term="timer()" /><category term="flip" /><category term="feedback" /><category term="onunload" /><category term="onkeyup" /><category term="adjacent sibling" /><category term="round-trip time" /><category term="internet" /><category term="buzzboost" /><category term="right" /><category term="layout" /><category term="box-shadow" /><category term="custom filter" /><category term="authorization" /><category term="slideToggle" /><category term="HTML5" /><category term="excerpt" /><category term="rss feed" /><category term="blogger buzz" /><category term="stored procedure" /><category term="ajax" /><category term="counter" /><category term="AcuODBC" /><category term="convert" /><category term="static" /><category term="programming" /><category term="tutorial" /><category term="deprecated tags" /><category term="text-shadow" /><category term="DSN" /><category term="RegEx" /><category term="cross browser" /><category term="simple" /><category term="offsetHeight" /><category term="owa" /><category term="overlay" /><category term="ChooseContent" /><category term="export to excel" /><category term="ultimate css gradient generator" /><category term="sql server" /><category term="virtual server" /><category term="ietester" /><category term="min" /><category term="outlook" /><category term="URL parameters" /><category term="clock" /><category term="fadeIn" /><category term="icon" /><category term="screen.height" /><category term="operators" /><category term="quotes" /><category term="mixed" /><category term="progress" /><category term="basic editor" /><title type="text">the web thought</title><subtitle type="html">Web development, web design and programming.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://thewebthought.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default?start-index=51&amp;max-results=50&amp;redirect=false" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>264</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>50</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/TheWebThought" /><feedburner:info uri="thewebthought" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-6760317073127946864</id><published>2012-03-02T07:00:00.002+01:00</published><updated>2012-03-02T07:00:08.727+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="plug-in" /><category scheme="http://www.blogger.com/atom/ns#" term="image" /><category scheme="http://www.blogger.com/atom/ns#" term="zoom" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title type="text">jQuery: image zoom plug-ins</title><content type="html">As one of the web thought visitors has &lt;a href="http://thewebthought.blogspot.com/2012/02/css-image-preloader.html?showComment=1328851928507#c1544404916487740481" target="_blank"&gt;commented&lt;/a&gt; a few days ago, there are many &lt;b&gt;jQuery &lt;/b&gt;plug-ins that help us in creating &lt;b&gt;zoom &lt;/b&gt;effects on &lt;b&gt;images&lt;/b&gt;. Here's a list of the best.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jacklmoore.com/zoom/" target="_blank"&gt;Zoom&lt;/a&gt;&lt;br /&gt;"A small (1.4kb) jQuery plugin to enlarge images on mouseover or mousedown."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dynamicdrive.com/dynamicindex4/imagemagnify.htm" target="_blank"&gt;jQuery Image Magnify&lt;/a&gt;&lt;br /&gt;"jQuery Image Magnify enables  any image on the page to be magnified by a desired factor when clicked on,  via a sleek zoom in/out effect. The enlarged image is centered on the user's  screen until dismissed. It works on both images with and without explicit  width/height attributes defined. This means you can take a large image that  by default would look out of place when shown, shrink it using explicit  width/height attributes, then enable users to magnify it on demand to its  original dimensions when the image is clicked on using this script."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.professorcloud.com/mainsite/cloud-zoom.htm" target="_blank"&gt;Cloud Zoom&lt;/a&gt;&lt;br /&gt;"Cloud Zoom is a free jQuery image zoom plugin, a comparable alternative to  products such as Magic Zoom. Compared to the popular jQZoom plugin, Cloud Zoom is smaller,  has more features and more robust compatability across browsers."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.eyecon.ro/zoomimage/" target="_blank"&gt;Zoomimage - jQuery plugin&lt;/a&gt;&lt;br /&gt;"Present you images in stylish way. The links are unobtrusively highjacked  to open the images in an inpage popup with drop shadow and border."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mind-projects.it/projects/jqzoom/" target="_blank"&gt;JQZoom&lt;/a&gt;&lt;br /&gt;"JQZoom is a javascript image magnifier built at the top of the popular jQuery javascript framework. jQzoom is a great and a really easy to use script to magnify what you want." &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dailycoding.com/Posts/imagelens__a_jquery_plugin_for_lens_effect_image_zooming.aspx" target="_blank"&gt;ImageLens – A jQuery plug-in for Lens Effect Image Zooming&lt;/a&gt;&lt;br /&gt;"Use this jQuery plug-in to add lens style zooming effect to an image"&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cssglobe.com/post/9711/jquery-plugin-easy-image-zoom" target="_blank"&gt;Easy Image Zoom&lt;/a&gt;&lt;br /&gt;"I have been working on a little script for a client of mine, that required product image magnification. The task was to create a script that will allow users to see large details of the product while moving cursor over medium sized image. During the process I decided to create a jQuery plugin and share it with you guys!"&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-6760317073127946864?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=eyZFwpZyX2o:H789OlZQIn0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=eyZFwpZyX2o:H789OlZQIn0:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=eyZFwpZyX2o:H789OlZQIn0:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/eyZFwpZyX2o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/6760317073127946864/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/03/jquery-image-zoom-plug-ins.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/6760317073127946864" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/6760317073127946864" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/eyZFwpZyX2o/jquery-image-zoom-plug-ins.html" title="jQuery: image zoom plug-ins" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/03/jquery-image-zoom-plug-ins.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-2287320016718997825</id><published>2012-02-29T07:00:00.001+01:00</published><updated>2012-02-29T07:00:09.164+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="font" /><category scheme="http://www.blogger.com/atom/ns#" term="cleartype" /><title type="text">Fonts: the browser doesn't display fonts properly</title><content type="html">Is your preferred browser suddenly displaying all the basic&lt;b&gt; fonts&lt;/b&gt; in an unclear and garbled way? Before starting to pull your hair off, it might be that something got in the way and some Windows preference has been changed.&lt;br /&gt;What happened to me once, is that Firefox, Chrome and Safari started displaying system fonts strangely, while Internet Explorer was rendering the text in the correct way.&lt;br /&gt;I remember that I started searching for a solution, and, at first I thought it was something related to my system font files that got corrupted. But it wasn't that.&lt;br /&gt;I noticed that other programs and applications were displaying the menus and text in a strange way.&lt;br /&gt;I decided to rebuild the font system folder. Nothing changed...&lt;br /&gt;Well, to make a long story short, it was the &lt;b&gt;Clear Type&lt;/b&gt; option.&lt;br /&gt;&lt;br /&gt;In Windows 7, there's a control panel section that's taking care of Clear Type fonts: ClearType tuning.&lt;br /&gt;In Windows XP and Vista, we need to download ClearType Tuner from Microsoft.&lt;br /&gt;If for some reason, the clear type option has been turned off, the result will be that all the fonts in your applications will be in some way less clear (sorry for the pun). And even your browser will display system fonts in that way.&lt;br /&gt;Just turn ClearType on again and everything will be fine.&lt;br /&gt;&lt;br /&gt;More info &lt;a href="http://www.microsoft.com/typography/ClearTypePowerToy.mspx" target="_blank"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-2287320016718997825?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=hIapIfSjedc:AXpB45FWqZ4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=hIapIfSjedc:AXpB45FWqZ4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=hIapIfSjedc:AXpB45FWqZ4:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/hIapIfSjedc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/2287320016718997825/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/fonts-browser-doesnt-display-fonts.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/2287320016718997825" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/2287320016718997825" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/hIapIfSjedc/fonts-browser-doesnt-display-fonts.html" title="Fonts: the browser doesn't display fonts properly" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/fonts-browser-doesnt-display-fonts.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-8226790113873487302</id><published>2012-02-27T07:00:00.004+01:00</published><updated>2012-02-27T07:00:09.965+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="internet explorer" /><category scheme="http://www.blogger.com/atom/ns#" term="ie8" /><category scheme="http://www.blogger.com/atom/ns#" term="fadeIn" /><category scheme="http://www.blogger.com/atom/ns#" term="fadeOut" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">jQuery: fadeIn and fadeOut for IE8</title><content type="html">If you have used &lt;b&gt;jQuery &lt;a href="http://api.jquery.com/fadeIn/" target="_blank"&gt;fadeIn&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://api.jquery.com/fadeOut/" target="_blank"&gt;fadeOut&lt;/a&gt;&lt;/b&gt; effects, you might have noticed that they don't always work on &lt;b&gt;IE8&lt;/b&gt;.&lt;br /&gt;There's a solution for that issue: in this very short article we are going to explore it.&lt;br /&gt;&lt;br /&gt;I don't think I have to explain much about it, so I will get into it very quickly and shortly.&lt;br /&gt;&lt;br /&gt;If we have an element to which we applied a fade effect using jQuery, we should have something like:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;div id="fading" style="display:none;"&amp;gt;Some content&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;in the body of our page.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;In the head we control the fade effect. In the following example we create the fadeIn effect on the click event (on some other element with id="sometrigger"):&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;script type="text/javascript" language="javascript"&amp;gt;&lt;br /&gt;&amp;lt;!-- &lt;br /&gt;$(document).ready(function(){&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $("#sometrigger").click(function(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $("#fading").fadeIn();&lt;br /&gt;});&lt;br /&gt;// --&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;If you test the above code in IE8, the div with id="fading" will just appear without the fading effect.&lt;br /&gt;In order to solve the issue, we just need to add a CSS rule to the fading div:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;div id="fading" style="display:none;filter:inherit;"&amp;gt;Some content&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;As you can see we added:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;filter:inherit;&lt;/code&gt;&lt;/blockquote&gt;The above rule will make the fading effect work on IE8 as well.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-8226790113873487302?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=meIuojyUkr4:yhKbwuOy2H4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=meIuojyUkr4:yhKbwuOy2H4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=meIuojyUkr4:yhKbwuOy2H4:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/meIuojyUkr4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/8226790113873487302/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/jquery-fadein-and-fadeout-for-ie8.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/8226790113873487302" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/8226790113873487302" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/meIuojyUkr4/jquery-fadein-and-fadeout-for-ie8.html" title="jQuery: fadeIn and fadeOut for IE8" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/jquery-fadein-and-fadeout-for-ie8.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4181290182380266198</id><published>2012-02-24T07:00:00.006+01:00</published><updated>2012-02-24T07:00:09.473+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSS3 pie" /><category scheme="http://www.blogger.com/atom/ns#" term="box-shadow" /><category scheme="http://www.blogger.com/atom/ns#" term="internet explorer" /><category scheme="http://www.blogger.com/atom/ns#" term="ie8" /><category scheme="http://www.blogger.com/atom/ns#" term="border-radius" /><category scheme="http://www.blogger.com/atom/ns#" term="vgx.dll" /><category scheme="http://www.blogger.com/atom/ns#" term="vml" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">CSS &amp; HTML: solution for border radius not working on IE8</title><content type="html">Today, I would like to share something I've discovered only recently (there is always something to learn!).&lt;br /&gt;It's related to &lt;b&gt;border radius&lt;/b&gt; and &lt;b&gt;box shadows&lt;/b&gt; solutions for &lt;b&gt;Internet Explorer 8&lt;/b&gt; and previous versions. It might happen that the rendering of round corners and shadows is not working at all, and that every &lt;b&gt;CSS&lt;/b&gt; rule applied is completely ignored to the point that the styled element won't even be displayed at all.&lt;br /&gt;While the solution is very simple, the problem needs to be explained, and, please, read all the article if you're interested in the solution, because you really need to know what's happening.&lt;br /&gt;Follow me.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;A little bit of background&lt;/b&gt;&lt;/div&gt;How did I discover the problem? It happened at work. In the company where I work, there's an intranet which I have developed. The main menu of the web app has round corners, rendered with a jQuery plug-in.&lt;br /&gt;A colleague, a few days ago, called me because the background colour, the round corners and the shadows on the intranet menu had disappeared. I immediately checked the browser configuration and security options, asking if he had changed something there. "I haven't", he replied.&lt;br /&gt;We all know from experience that IE8 (the browser he's using) is not a great piece of technology and that it gives us a lot of troubles, but I immediately understand that the problem was not strictly related to the browser configuration. Any site using round corner was not working; even the &lt;a href="http://thewebthought.blogspot.com/2011/07/css3-use-css3-in-ie-6-8-with-pie.html" target="_blank"&gt;CSS Pie&lt;/a&gt; homepage was not showing those wonderful round corners.&lt;br /&gt;And so I started my quest.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;What I discovered&lt;/b&gt;&lt;/div&gt;After a while, it came to my mind that when the border radius rule is not recognised by the browser (such as IE8), we use fallbacks like CSS Pie or jQuery plug-ins. Those solutions use VML (Vector Markup Language). I don't want to get into too much complicated reasonings here. If you need to know more about VML please refer to the &lt;a href="http://www.w3.org/TR/NOTE-VML" target="_blank"&gt;W3C page&lt;/a&gt;.&lt;br /&gt;What we need to know here is that VML, on Windows machines, is controlled and implemented via a specific library: vgx.dll (vector graphic rendering). And Internet Explorer is using that library to render VML.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The first step and the final solution&lt;/b&gt;&lt;/div&gt;If the vgx library is not working, Internet Explorer is not rendering VML, and thus the round corners.&lt;br /&gt;How come that a library is suddenly not working anymore? A corrupted library may be the problem, but that was not my case.&lt;br /&gt;A while ago, someone discovered a possible exploit threat that uses the vgx library.&lt;br /&gt;&lt;blockquote&gt;"The vulnerability could allow remote code execution if a user viewed a specially crafted Web page using Internet Explorer. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights." (from Microsoft bulletin MS11-052) &lt;/blockquote&gt;And some well known anti malware softwares are simply de-registering the library in order to prevent the vulnerability.&lt;br /&gt;That means VML is not working anymore.&lt;br /&gt;The aforementioned &lt;a href="http://technet.microsoft.com/en-us/security/bulletin/ms11-052" target="_blank"&gt;bulletin&lt;/a&gt; is providing a permanent solution, but if you used some sort of anti malware software, your vgx library may have been unregistered.&lt;br /&gt;So - and you may have already understood it - the solution is simple: register again the library. We need to do it via Windows command prompt or create a small .bat file. Whichever solution we choose the command is the following:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;%WinDir%\system32\regsvr32.exe "%CommonProgramFiles%\Microsoft Shared\VGX\vgx.dll"&lt;/code&gt;&lt;/blockquote&gt;After that, we can see the beautiful round corners working again.&lt;br /&gt;Last but not least, remember to apply the aforementioned Microsoft patch, to avoid possible threats.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;A side note&lt;/b&gt;&lt;/div&gt;VML is active and used only in Internet Explorer. I have found that it is possible to check if VML is active by using a conditional statement:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;!--[if vml]&amp;gt;VML&amp;lt;![endif]--&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;If your browser display the "VML" text, VML is active for that browser... I must say I'm a bit confused on the matter, but I wanted to share this finding with you.&lt;br /&gt;&lt;br /&gt;I hope you have found the solution useful. As usual use the comments section below for your thoughts!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-4181290182380266198?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=xuUAygi59c8:ioOI1iTUHfk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=xuUAygi59c8:ioOI1iTUHfk:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=xuUAygi59c8:ioOI1iTUHfk:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/xuUAygi59c8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/4181290182380266198/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/css-html-solution-for-border-radius-not.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4181290182380266198" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4181290182380266198" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/xuUAygi59c8/css-html-solution-for-border-radius-not.html" title="CSS &amp; HTML: solution for border radius not working on IE8" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/css-html-solution-for-border-radius-not.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-7719939493104960432</id><published>2012-02-22T07:00:00.003+01:00</published><updated>2012-02-23T09:11:17.550+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="at-import" /><category scheme="http://www.blogger.com/atom/ns#" term="round-trip time" /><category scheme="http://www.blogger.com/atom/ns#" term="rtt" /><category scheme="http://www.blogger.com/atom/ns#" term="http request" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">Web Development: optimise JavaScript and CSS</title><content type="html">Recently I've been asked to optimise an already developed web site. It's always a bit difficult to look into code written by someone else, and in this case it has been a pain in the neck: no comments, no code layout, strange and obscure variable names and so on. One thing however has caught my eye: &lt;b&gt;external JavaScript files&lt;/b&gt; and &lt;b&gt;CSS stylesheets&lt;/b&gt; were scattered all around, making the loading of the web pages not fluid.&lt;br /&gt;&lt;br /&gt;I would like to share with you some considerations that we all should be very aware when we develop web pages. We will talk about external JavaScript files and CSS stylesheets, how to optimise them and how to reduce &lt;b&gt;RTT&lt;/b&gt; (&lt;b&gt;round-trip time&lt;/b&gt;).&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;RTT&lt;/b&gt;&lt;/div&gt;First of all, we should consider what's the round-trip time.&lt;br /&gt;RTT is the time it takes for a client request to reach the server and get an answer from the server itself. It doesn't include the data transfer time.&lt;br /&gt;The RTT is usually measured in milliseconds.&lt;br /&gt;In order to produce an efficient web page, we should try to reduce RTT and thus reduce the number of HTTP requests and responses.&lt;br /&gt;Already confused? Don't worry, just keep in mind that we have to reduce RTT.&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;JavaScript external files&lt;/b&gt;&lt;/div&gt;In our projects, we are used to link and include JavaScript external files. We do it by placing a link inside the head of our document. It is a good practise, because a modular approach is always good: we can reuse components, code, functions and so without writing them more than once; and when we need to improve the code, we just need to change it once.&lt;br /&gt;This can lead to a high number of external files. And that's not good for RTT. Infact, loading a lot of files, produces a lot of HTTP requests and responses. This is definitely not a matter of kilobytes: what matters here is the number of times the client is making a request to the server, waiting for the proper reply.&lt;br /&gt;Reducing the number of JavaScript files will reduce RTT. I will suggest to use 2 or 3 files: one with basic functions, and 1 or 2 with advanced functions (only to be loaded in some special page).&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;CSS stylesheets&lt;/b&gt;&lt;/div&gt;What we saw for JavaScript files, is completely valid for external CSS stylesheets. I know that we like to create different stylesheets for different media type or even target browser. However, we should not overdo it; we should avoid not necessary HTTP requests.&lt;br /&gt;We then should consider the fact that many web gurus are saying the @import rules are to be avoided as well. A nested CSS stylesheets situation is decisively not good in term of RTT.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The correct loading order&lt;/b&gt;&lt;/div&gt;As for the correct order for loading external resources, I've noticed that it is better to place CSS stylesheets before JavaScript files. In the head of our document, we should place links to all the stylesheets and afterwards, the links to the JS files.&lt;br /&gt;I've seen charts which explain how the RTT is reduced by one third, using the above method. And that's not bad at all.&lt;br /&gt;If you have specific scripts in the head of the document, remember to put them after the links to external files. &lt;br /&gt;To summarise: put external scripts after external stylesheets; put inline script after all the other resources.&lt;br /&gt;&lt;br /&gt;I hope you liked the article. If you want, please share your experience.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-7719939493104960432?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=H1jRSp2KtIw:2ADzf3MdLfY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=H1jRSp2KtIw:2ADzf3MdLfY:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=H1jRSp2KtIw:2ADzf3MdLfY:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/H1jRSp2KtIw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/7719939493104960432/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/web-development-optimise-javascript-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7719939493104960432" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7719939493104960432" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/H1jRSp2KtIw/web-development-optimise-javascript-and.html" title="Web Development: optimise JavaScript and CSS" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/web-development-optimise-javascript-and.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1707007522976346681</id><published>2012-02-20T07:00:00.001+01:00</published><updated>2012-02-20T07:00:04.018+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="image" /><category scheme="http://www.blogger.com/atom/ns#" term="web design" /><category scheme="http://www.blogger.com/atom/ns#" term="free images" /><title type="text">Web Design: free images deposits</title><content type="html">When designing a new web site, images, icons and photos are important. A general theme for the site is strongly emphasised by graphic elements. Sometimes we can use original images, sometimes we need to search the net, but being sure that there's not copyright infringements when we use them on our web site (especially if it's a commercial one).&lt;br /&gt;There are free images deposits that can be browsed and, provided we check the eventual license agreement, those pictures are freely usable in our own projects.&lt;br /&gt;Here are some useful links to those kind of repositories:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.flickr.com/creativecommons/" target="_blank"&gt;Flickr: Creative Commons&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://morguefile.com/archive/" target="_blank"&gt;MorgueFile: free photos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://freephotosbank.com/" target="_blank"&gt;FreePhotosBank&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.freemediagoo.com/" target="_blank"&gt;FreeMediaGoo&lt;/a&gt; (audio, images, textures and flash)&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.freedigitalphotos.net/" target="_blank"&gt;FreeDigitalPhotos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://interfacelift.com/icons/downloads/date/any/" target="_blank"&gt;InterfaceLift Icons&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;I hope the above list might be of some use for you.&lt;br /&gt;In the meantime, happy coding!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-1707007522976346681?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=J7464hrbv3s:LZkSUVNQciQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=J7464hrbv3s:LZkSUVNQciQ:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=J7464hrbv3s:LZkSUVNQciQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/J7464hrbv3s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/1707007522976346681/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/web-design-free-images-deposits.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1707007522976346681" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1707007522976346681" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/J7464hrbv3s/web-design-free-images-deposits.html" title="Web Design: free images deposits" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/web-design-free-images-deposits.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-5033457540188845115</id><published>2012-02-17T07:00:00.001+01:00</published><updated>2012-02-17T07:00:08.634+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="onkeyup" /><category scheme="http://www.blogger.com/atom/ns#" term="textarea" /><category scheme="http://www.blogger.com/atom/ns#" term="document.getElementById" /><category scheme="http://www.blogger.com/atom/ns#" term="live character count" /><title type="text">JavaScript: live character count</title><content type="html">In many situation, we offer the user the possibility of filling in a form and specifically a textarea. In those cases, we might decide to limit the number of characters and thus show the user how many remaining letters are available, with some sort of &lt;b&gt;live character count&lt;/b&gt;.&lt;br /&gt;It is possible to show the countdown using a &lt;b&gt;JavaScript &lt;/b&gt;function called on key up. Let's see how we can do it.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The HTML&lt;/b&gt;&lt;/div&gt;We build the text area inside a form. In our example the calling of the function is placed in the form itself, but it possible to use it directly inside the textarea (if you prefer):&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;form onkeyup="count();"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type="text" id="message" size="40" maxlength="40"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Character count: &amp;lt;span id="characterCount"&amp;gt;40&amp;lt;/span&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The textarea has a max length of 40 characters, and so we start our character countdown from that value. The span tag with a specific id (&lt;i&gt;characterCount&lt;/i&gt;) will initially show a starting value of 40, and then the function count() will change that value on the key up event.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The function&lt;/b&gt;&lt;/div&gt;The JavaScript function is simple and should be placed in the head of your page:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;function count(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var characterCount = document.getElementById("message").value.length;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById("characterCount").innerHTML = 40-characterCount;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;It basically inspects the length of our textarea which has an id="message". Then it changes the value inside the span with a value equal to 40 (our max length) minus the length of the textarea.&lt;br /&gt;Every time a new letter is inserted in the textarea the span value decreases by one, starting from 40.&lt;br /&gt;We can obviously change the max length according to our need.&lt;br /&gt;&lt;br /&gt;And that's all for today.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-5033457540188845115?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=_9wM61m1qIQ:uLPxsjpJxaU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=_9wM61m1qIQ:uLPxsjpJxaU:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=_9wM61m1qIQ:uLPxsjpJxaU:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/_9wM61m1qIQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/5033457540188845115/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/javascript-live-character-count.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/5033457540188845115" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/5033457540188845115" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/_9wM61m1qIQ/javascript-live-character-count.html" title="JavaScript: live character count" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/javascript-live-character-count.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4501441622479406</id><published>2012-02-15T07:00:00.002+01:00</published><updated>2012-02-15T07:00:07.564+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="data type" /><category scheme="http://www.blogger.com/atom/ns#" term="alter table" /><category scheme="http://www.blogger.com/atom/ns#" term="alter column" /><category scheme="http://www.blogger.com/atom/ns#" term="sql query" /><title type="text">SQL: the alter table statement</title><content type="html">In &lt;b&gt;SQL&lt;/b&gt; we usually create tables, pre-deciding the columns and their characteristics, like default values and data types. It is possible to insert new columns and eventually alter them afterwards, using the &lt;b&gt;alter table statement&lt;/b&gt;.&lt;br /&gt;In the following post we are going to see what we can do with it.&lt;br /&gt;&lt;br /&gt;With alter table, we can add, change the data type or delete a column inside a table.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Add&lt;/b&gt;&lt;/div&gt;We can add a new column with a simple statement:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;ALTER TABLE tableName&lt;br /&gt;ADD columnName dataType&lt;/code&gt;&lt;/blockquote&gt;where tableName is the name of an existing table, columnName is the name of the new column and dataType is the data type of the new column.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Change&lt;/b&gt;&lt;/div&gt;In order to change the data type of table, we can use:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;ALTER TABLE tableName&lt;br /&gt;ALTER COLUMN columnName dataType&lt;/code&gt;&lt;/blockquote&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Delete&lt;/b&gt;&lt;/div&gt;The dropping of a column is again very simple, however it should be used with care, because it will obviously delete all the values in the column:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;ALTER TABLE tableName&lt;br /&gt;DROP COLUMN columnName&lt;/code&gt;&lt;/blockquote&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Use of alter table&lt;/b&gt;&lt;/div&gt;There are many possible use of the alter table statement. For example, we might need to create a temporary column in a table, use it and then drop it. Or maybe, in some rare cases, columns might be added on users need, specifically in web applications, where a super user can manage the back end database through an option panel board.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-4501441622479406?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=ezikhggfd0k:7su0BVmq0Tc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=ezikhggfd0k:7su0BVmq0Tc:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=ezikhggfd0k:7su0BVmq0Tc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/ezikhggfd0k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/4501441622479406/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/sql-alter-table-statement.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4501441622479406" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4501441622479406" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/ezikhggfd0k/sql-alter-table-statement.html" title="SQL: the alter table statement" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/sql-alter-table-statement.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4041607911086092534</id><published>2012-02-13T07:00:00.000+01:00</published><updated>2012-02-13T07:00:06.830+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VBScript" /><category scheme="http://www.blogger.com/atom/ns#" term="link" /><category scheme="http://www.blogger.com/atom/ns#" term="instr" /><category scheme="http://www.blogger.com/atom/ns#" term="asp" /><title type="text">ASP: convert a string into a link</title><content type="html">If you often visit social networks or, generally speaking, discussion web sites, you surely have noticed that sometimes when you insert a message or a post, every possible &lt;b&gt;link &lt;/b&gt;is automatically recognised and "transformed" into a &lt;b&gt;clickable link&lt;/b&gt;. How is it done?&lt;br /&gt;&lt;br /&gt;With &lt;b&gt;ASP &lt;/b&gt;we can manipulate a given string, find a possible link and change it.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The code&lt;/b&gt;&lt;/div&gt;The code is quite simple:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;Dim str&lt;br /&gt;str= "This is a link http://thewebthought.blogspot.com/"&lt;br /&gt;&lt;br /&gt;Dim strS&lt;br /&gt;strS = Split(str, " ")&lt;br /&gt;&lt;br /&gt;Dim strLink, i&lt;br /&gt;i = 0&lt;br /&gt;For i = 0 To Ubound(strS)&lt;br /&gt;If InStr(strS(i), "http://") Then&lt;br /&gt;strLink= "&amp;lt;a href='" &amp;amp; strS(i) + "'&amp;gt;" + strS(i) &amp;amp; "&amp;lt;/a&amp;gt;"&lt;br /&gt;Else&lt;br /&gt;strLink = strS(i)&lt;br /&gt;End If&lt;br /&gt;Response.Write strLink &amp;amp; " "&lt;br /&gt;Next&lt;br /&gt;%&amp;gt;&amp;nbsp;&lt;/code&gt;&lt;/blockquote&gt;Ok, let me explain it to you.&lt;br /&gt;&lt;i&gt;str &lt;/i&gt;is our string. It can be submitted by a form, retrieved from a database or else.&lt;br /&gt;&lt;br /&gt;We first split the string (&lt;i&gt;str&lt;/i&gt;) into an array (using the space as separator).&lt;br /&gt;We then use a for cycle to go through the array and check if "http://" is present. If so we convert it into a link. After that we show the complete text. We can obviously use &lt;i&gt;strLink &lt;/i&gt;the way we prefer.&lt;br /&gt;&lt;br /&gt;Easy and simple.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-4041607911086092534?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=IuL7AOXsJCE:fj5iXHMcsDE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=IuL7AOXsJCE:fj5iXHMcsDE:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=IuL7AOXsJCE:fj5iXHMcsDE:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/IuL7AOXsJCE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/4041607911086092534/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/asp-convert-string-into-link.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4041607911086092534" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4041607911086092534" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/IuL7AOXsJCE/asp-convert-string-into-link.html" title="ASP: convert a string into a link" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/asp-convert-string-into-link.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-7196790653492724463</id><published>2012-02-10T07:00:00.002+01:00</published><updated>2012-02-10T07:00:10.967+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="text-shadow" /><category scheme="http://www.blogger.com/atom/ns#" term="text" /><category scheme="http://www.blogger.com/atom/ns#" term="3d" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">CSS: 3d text!</title><content type="html">Can you see anything special in the following text?&lt;br /&gt;&lt;style&gt;.Three-Dee{font-family: Garamond, serif;line-height: 1em;color: #1808fa;font-weight:bold;font-size: 112px;text-shadow:0px 0px 0 rgb(-2,-18,224),1px 1px 0 rgb(-9,-25,217),2px 2px 0 rgb(-16,-32,210),3px 3px 0 rgb(-23,-39,203),4px 4px 0 rgb(-30,-46,196),5px 5px 0 rgb(-38,-54,188),6px 6px 0 rgb(-45,-61,181),7px 7px 0 rgb(-52,-68,174),8px 8px 0 rgb(-59,-75,167),9px 9px 0 rgb(-66,-82,160),10px 10px 0 rgb(-73,-89,153), 11px 11px 0 rgb(-80,-96,146),12px 12px 11px rgba(0,0,0,0.2),12px 12px 1px rgba(0,0,0,0.5),0px 0px 11px rgba(0,0,0,.2);}&lt;/style&gt;&lt;br /&gt;&lt;div class="Three-Dee"&gt;3D Text&lt;/div&gt;If you see it just as a big text, your browser is not compatible. Try to use the latest version of Firefox, Chrome, Safari, Opera or IE10.&lt;br /&gt;How can it be achieved?&lt;br /&gt;&lt;br /&gt;Let me explain it to you.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;b style="color: #6fa8dc;"&gt;A secret revealed&lt;/b&gt; &lt;br /&gt;It uses CSS text-shadow rule. And there's an online tool that helps us creating the effect. What we basically need is just a container (for example a div) with the text in it. We then assign a specific class to the div and apply some rules. For the above text, the CSS is:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;.Three-Dee{&lt;br /&gt;&amp;nbsp; font-family: Garamond, serif;&lt;br /&gt;&amp;nbsp; line-height: 1em;&lt;br /&gt;&amp;nbsp; color: #1808fa;&lt;br /&gt;&amp;nbsp; font-weight:bold;&lt;br /&gt;&amp;nbsp; font-size: 112px;&lt;br /&gt;&amp;nbsp; text-shadow:0px 0px 0 rgb(-2,-18,224),1px 1px 0 rgb(-9,-25,217),2px 2px 0 rgb(-16,-32,210),3px 3px 0 rgb(-23,-39,203),4px 4px 0 rgb(-30,-46,196),5px 5px 0 rgb(-38,-54,188),6px 6px 0 rgb(-45,-61,181),7px 7px 0 rgb(-52,-68,174),8px 8px 0 rgb(-59,-75,167),9px 9px 0 rgb(-66,-82,160),10px 10px 0 rgb(-73,-89,153), 11px 11px 0 rgb(-80,-96,146),12px 12px 11px rgba(0,0,0,0.2),12px 12px 1px rgba(0,0,0,0.5),0px 0px 11px rgba(0,0,0,.2);}&lt;/code&gt;&lt;/blockquote&gt;Just go to &lt;a href="http://www.3dcsstext.com/" target="_blank"&gt;3D CSS Text&lt;/a&gt; and start creating your own 3D text!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-7196790653492724463?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=DDhhrZEFK-E:1pwoV-KyZ60:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=DDhhrZEFK-E:1pwoV-KyZ60:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=DDhhrZEFK-E:1pwoV-KyZ60:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/DDhhrZEFK-E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/7196790653492724463/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/css-3d-text.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7196790653492724463" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7196790653492724463" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/DDhhrZEFK-E/css-3d-text.html" title="CSS: 3d text!" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/css-3d-text.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4437635484974081107</id><published>2012-02-08T07:00:00.002+01:00</published><updated>2012-02-08T07:00:01.278+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="image" /><category scheme="http://www.blogger.com/atom/ns#" term="background image" /><category scheme="http://www.blogger.com/atom/ns#" term="preloaders" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">CSS: image preloader</title><content type="html">Today we are going to explore another &lt;b&gt;CSS &lt;/b&gt;basic usage: &lt;b&gt;image preloaders&lt;/b&gt;. It is a good practise not to use big images (in terms of weight) for web sites, however sometimes it's part of the game. Just consider the fact that a web site may be centred on photography and high resolution pictures may constitute its most important element.&lt;br /&gt;In those cases, images may take a while to load and empty boxes shown on the home page aren't really a good welcoming sight for users.&lt;br /&gt;With CSS we can reproduce a loading gif like:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-tjTf199MGDQ/TFEsEa55cXI/AAAAAAAAABg/wKG259BKg1g/s1600/loading.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-tjTf199MGDQ/TFEsEa55cXI/AAAAAAAAABg/wKG259BKg1g/s1600/loading.gif" /&gt;&lt;/a&gt;&lt;/div&gt;which will be displayed while the main image is being loaded.&lt;br /&gt;Let's see how we can do it.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The HTML&lt;/b&gt;&lt;/div&gt;We need to create a container for the image:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;div class="preloader"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;img src="image.path.jpg" width="840" height="281"&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The image sits inside a div with class="preloader". In the img tag we set the original width and height of the image (840 and 281 are just examples).&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The CSS&lt;/b&gt;&lt;/div&gt;With some basic rules, we can style the image container:&lt;br /&gt;div.preloader&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 852px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 293px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 5px 5px 5px 5px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: solid 1px #000000;&lt;br /&gt;}&amp;nbsp;&lt;/code&gt;&lt;/blockquote&gt;The width and the height of the container is considering the image size and the borders and padding (840+5+5+2=852 and 281+5+5+2=293). The above rules can be changed according to your needs, as usual.&lt;br /&gt;Now we set rules for the image itself: &lt;br /&gt;div.preloader img&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; display: block;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-image: url(images/loading.gif);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-repeat: no-repeat;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-position: center center;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;We use as background image the animated gif shown above (the classic rotating gif, but you can use the one you prefer as long as it is showing that something is going on). We position it at the centre of the container, without repeat.&lt;br /&gt;And that is all. While the big image is loading, the user will see the animated gif. When the big image has been loaded, it will cover and hide the animated gif.&lt;br /&gt;&lt;br /&gt;Hope you liked the example and see you next time.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-4437635484974081107?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=TQfYmp4c9fg:LE85HCFxpWs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=TQfYmp4c9fg:LE85HCFxpWs:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=TQfYmp4c9fg:LE85HCFxpWs:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/TQfYmp4c9fg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/4437635484974081107/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/css-image-preloader.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4437635484974081107" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4437635484974081107" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/TQfYmp4c9fg/css-image-preloader.html" title="CSS: image preloader" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-tjTf199MGDQ/TFEsEa55cXI/AAAAAAAAABg/wKG259BKg1g/s72-c/loading.gif" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/css-image-preloader.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-5738865063705220371</id><published>2012-02-06T07:00:00.001+01:00</published><updated>2012-02-06T07:00:05.152+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="image" /><category scheme="http://www.blogger.com/atom/ns#" term="zoom" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">CSS: image zoom effect</title><content type="html">Today, we will see how to create a &lt;b&gt;zoom effect on image&lt;/b&gt;, with &lt;b&gt;CSS&lt;/b&gt;. Today we have many useful tools to perform zooming effects on images, however the following approach could be of some use in specific situation where not complicated solutions are required.&lt;br /&gt;The effect is simple, however, starting from this example, we can eventually develop a more complex one, for example using absolute positioning.&lt;br /&gt;Said that, let's see how to do it.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The HTML&lt;/b&gt;&lt;/div&gt;We are going to use two images: one is the small version and the second is the large one. When the user puts the cursor on the small one, the large one will appear. Very simple, isn't it?&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;a href="#" class="zoom"&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;img src="images/small.jpg"&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;span&amp;gt;&amp;lt;img src="images/large.jpg"&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The CSS&lt;/b&gt;&lt;/div&gt;In the CSS rules, we need to temporary hide the large image and then create a hover rule to make it visible.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;a.zoom span&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; position: absolute;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; visibility: hidden;&lt;br /&gt;}&lt;br /&gt;a.zoom&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; position: relative;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; z-index: 0;&lt;br /&gt;}&lt;br /&gt;a.zoom:hover&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; z-index: 1;&lt;br /&gt;}&lt;br /&gt;a.zoom:hover span&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; visibility: visible;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; top: 10;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left: 70px;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;As you can see the large image has an absolute position. We can change the top and left values in order to make it visible in a particular section of your viewport.&lt;br /&gt;&lt;br /&gt;Piece of cake!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-5738865063705220371?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=vnmkyCzrSY4:4fDZ1NRsnDU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=vnmkyCzrSY4:4fDZ1NRsnDU:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=vnmkyCzrSY4:4fDZ1NRsnDU:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/vnmkyCzrSY4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/5738865063705220371/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/css-image-zoom-effect.html#comment-form" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/5738865063705220371" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/5738865063705220371" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/vnmkyCzrSY4/css-image-zoom-effect.html" title="CSS: image zoom effect" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>7</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/css-image-zoom-effect.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4512675802276130802</id><published>2012-02-03T07:00:00.003+01:00</published><updated>2012-02-03T07:00:07.661+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="box-shadow" /><category scheme="http://www.blogger.com/atom/ns#" term="overlay" /><category scheme="http://www.blogger.com/atom/ns#" term="border-radius" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">HTML &amp; CSS: text overlay with shadows and round corners</title><content type="html">Today, I'm going to explain a simple effect that is getting quite popular on web sites: we will position a text over a main container. The box will have &lt;b&gt;shadows&lt;/b&gt; and &lt;b&gt;round corners&lt;/b&gt;. Something like:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-uhet07XuqxA/Tx6TbDclQoI/AAAAAAAAAO8/WtTnS-BTep0/s1600/over.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="192" src="http://2.bp.blogspot.com/-uhet07XuqxA/Tx6TbDclQoI/AAAAAAAAAO8/WtTnS-BTep0/s640/over.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;It will be an easy solution with full browser compatibility... please follow me...&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;b style="color: #6fa8dc;"&gt;HTML&lt;/b&gt;&lt;br /&gt;The HTML part of this exercise contains just two divs: the first is the main container (with the "Lorem ipsum..." text) and the second is the overlaying box ("This text is over..."). The first div has a class="longText". The second div has a class="over". We will use CSS to style the two divs.&lt;br /&gt;So, here is the HTML:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;div class="longText"&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus at lacus lorem, eget tristique sapien. Maecenas malesuada est eget urna dictum sollicitudin. Nulla facilisi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec erat purus, faucibus vel convallis eget, luctus sit amet elit. Curabitur non libero quis tellus vulputate luctus non eget velit. Suspendisse sed enim nisi, ultrices molestie turpis. In hac habitasse platea dictumst. Donec purus lacus, commodo nec malesuada at, faucibus non erat. Etiam commodo neque et justo consequat sagittis. Nullam rhoncus turpis sodales dui molestie sollicitudin. Ut vel tellus eu est dictum lobortis id sit amet nisl. In nec justo purus.&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div class="over"&amp;gt;This text is over the main container.&amp;lt;br&amp;gt; It has round borders and shodows!&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The text used in the example is a bit long, just because we need enough space to place the overlay.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;CSS&lt;/b&gt;&lt;/div&gt;Now we need to style the two divs. Let's start with "longText":&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;.longText {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 50%;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;To obtain the overlay effect, we just reduce the width of the div. It is just for the understanding of the example (to make the long text go down vertically and to make the overlay effect more visible).&lt;br /&gt;Now the "over" div:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;.over {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 16px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-weight: bold;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align: left;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -moz-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -webkit-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -webkit-box-shadow: 0 0 10px #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -moz-box-shadow: 0 0 10px #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; box-shadow: 0 0 10px #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-top: 1px solid #FFFFFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-right: 1px solid #FFFFFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-bottom: 1px solid #FFFFFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-left: 1px solid #FFFFFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; behavior:&amp;nbsp;&amp;nbsp; url(/PIE/PIE.htc);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #FFFFFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 15px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; position: absolute;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; top: 40px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left: 40px;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;Do I need to explain everything here? Probably not, but I need to make some remarks.&lt;br /&gt;The rounded corners are achieved with border-radius; the shadows with box-shadow.&lt;br /&gt;The position is absolute (40px from top and left).&lt;br /&gt;The following rule is used to call PIE:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;behavior:&amp;nbsp;&amp;nbsp; url(/PIE/PIE.htc);&lt;/code&gt;&lt;/blockquote&gt;If you don't know what CSS3 PIE is, see my &lt;a href="http://thewebthought.blogspot.com/2011/07/css3-use-css3-in-ie-6-8-with-pie.html" target="_blank"&gt;article&lt;/a&gt; about it. If you don't want to use it, just remove the above line.&lt;br /&gt;It is clear that you can change border widths, colour and style, colour of text, border radius and so, according to your personal taste and needs.&lt;br /&gt;&lt;br /&gt;I hope you've enjoyed the solution.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-4512675802276130802?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=GjdPzr1kbpc:mbbtkafCUE4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=GjdPzr1kbpc:mbbtkafCUE4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=GjdPzr1kbpc:mbbtkafCUE4:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/GjdPzr1kbpc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/4512675802276130802/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/html-css-text-overlay-with-shadows-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4512675802276130802" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4512675802276130802" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/GjdPzr1kbpc/html-css-text-overlay-with-shadows-and.html" title="HTML &amp; CSS: text overlay with shadows and round corners" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-uhet07XuqxA/Tx6TbDclQoI/AAAAAAAAAO8/WtTnS-BTep0/s72-c/over.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/html-css-text-overlay-with-shadows-and.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-7445946372065196370</id><published>2012-02-01T07:00:00.006+01:00</published><updated>2012-02-01T07:00:03.537+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="background-gradient" /><category scheme="http://www.blogger.com/atom/ns#" term="css gradient" /><category scheme="http://www.blogger.com/atom/ns#" term="ultimate css gradient generator" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">CSS: Ultimate CSS Gradient Generator</title><content type="html">Today, in this short post, I would like you to know about a wonderful tool aimed to the creation of gradients with &lt;b&gt;CSS&lt;/b&gt;.&lt;br /&gt;The name of the tool is &lt;a href="http://www.colorzilla.com/gradient-editor/" target="_blank"&gt;Ultimate CSS Gradient Generator&lt;/a&gt;, a powerful Photoshop-like CSS &lt;b&gt;gradient editor&lt;/b&gt; from ColorZilla.&lt;br /&gt;&lt;br /&gt;If you need to create gradients with cross-browser compatibility, the tool is quite powerful. It outputs the CSS code for IE9, FF3.6+, Chrome, Safari4+, Chrome10+, Safari5.1+, IE10+, IE6-8. As you can see it covers really most the browsers.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;The main features of the tool are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Powerful Photoshop-like interface&lt;/li&gt;&lt;li&gt;Cross browser CSS output&lt;/li&gt;&lt;li&gt;Horizontal, vertical, diagonal and radial gradients&lt;/li&gt;&lt;li&gt;Complex multi-stop gradients&lt;/li&gt;&lt;li&gt;Opacity support with multiple opacity stops  &lt;/li&gt;&lt;li&gt;Hex, rgb, rgba, hsl, hsla color formats&lt;/li&gt;&lt;li&gt;Support for full multi-stop gradients with IE9&lt;/li&gt;&lt;li&gt;Import from image (convert image gradient to CSS)&lt;/li&gt;&lt;li&gt;Import from existing CSS&lt;/li&gt;&lt;li&gt;Adjust gradient by hue, saturation, lightness &lt;/li&gt;&lt;li&gt;More than 135 gradient presets&lt;/li&gt;&lt;li&gt;Saving custom gradient presets&lt;/li&gt;&lt;li&gt;Sass output&lt;/li&gt;&lt;li&gt;Flexible preview panel&lt;/li&gt;&lt;li&gt;Gradient permalinks for sending and sharing&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;We really have anything we need here for gradients, believe me.&lt;br /&gt;&lt;br /&gt;Enjoy and see you next time!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-7445946372065196370?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=UnU-H0DgX60:5O60UnO5uzw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=UnU-H0DgX60:5O60UnO5uzw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=UnU-H0DgX60:5O60UnO5uzw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/UnU-H0DgX60" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/7445946372065196370/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/02/css-ultimate-css-gradient-generator.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7445946372065196370" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7445946372065196370" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/UnU-H0DgX60/css-ultimate-css-gradient-generator.html" title="CSS: Ultimate CSS Gradient Generator" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/02/css-ultimate-css-gradient-generator.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4363386705703242170</id><published>2012-01-30T16:53:00.000+01:00</published><updated>2012-01-30T16:53:52.096+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="offtopic" /><category scheme="http://www.blogger.com/atom/ns#" term="blog rank" /><title type="text">Blog ranking... just for fun</title><content type="html">Just a quick note, out of the ordinary flow of posts...&lt;br /&gt;&lt;br /&gt;I've read a short article a few minutes ago and I can't stop laughing. In the article it is said that if you want to increase the traffic to your blog, you should place at the beginning of every post a photo of a beautiful girl... possibly with a small dress... if any...&lt;br /&gt;I won't put the link of the aforementioned article, so don't ask...&lt;br /&gt;&lt;br /&gt;I am just still laughing out loud (and my boss looks at me suspiciously...)&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-4363386705703242170?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=VzpdDYHxDL4:fgpjclZhvHc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=VzpdDYHxDL4:fgpjclZhvHc:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=VzpdDYHxDL4:fgpjclZhvHc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/VzpdDYHxDL4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/4363386705703242170/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/blog-ranking-just-for-fun.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4363386705703242170" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4363386705703242170" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/VzpdDYHxDL4/blog-ranking-just-for-fun.html" title="Blog ranking... just for fun" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/blog-ranking-just-for-fun.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1413965199945432297</id><published>2012-01-30T07:00:00.000+01:00</published><updated>2012-01-30T07:00:03.766+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="highlight" /><category scheme="http://www.blogger.com/atom/ns#" term="VBScript" /><category scheme="http://www.blogger.com/atom/ns#" term="selected" /><category scheme="http://www.blogger.com/atom/ns#" term="getfilename" /><category scheme="http://www.blogger.com/atom/ns#" term="file name" /><category scheme="http://www.blogger.com/atom/ns#" term="menu" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><category scheme="http://www.blogger.com/atom/ns#" term="asp" /><title type="text">ASP &amp; CSS: highlight selected menu item</title><content type="html">When creating &lt;b&gt;menus &lt;/b&gt;for a web site, it is a good practise to use an inclusion, so that we write the menu only once. When the menu is included on every page, we might need to highlight the selected option in the menu itself.&lt;br /&gt;For example, we can have a menu like:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Home Page&lt;/li&gt;&lt;li&gt;Option 1&lt;/li&gt;&lt;li&gt;Option 2&lt;/li&gt;&lt;li&gt;Option 3&lt;/li&gt;&lt;/ul&gt;When the user selects "Option 2" and load the related page, the menu should look like:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Home Page&lt;/li&gt;&lt;li&gt;Option 1&lt;/li&gt;&lt;li&gt;&lt;b&gt;Option 2&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Option 3 &lt;/li&gt;&lt;/ul&gt;How can we do it? It's quite easy: we will use some &lt;b&gt;ASP &lt;/b&gt;and &lt;b&gt;CSS&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The menu&lt;/b&gt;&lt;/div&gt;The menu is very simple in our example, but you will be able to apply the following concepts to any menu. Just for the sake of completeness we will consider the following structure:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href="homepage.asp"&amp;gt;Home Page&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href="option1.asp"&amp;gt;Option 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href="option2.asp"&amp;gt;Option 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href="option3.asp"&amp;gt;Option 3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The above HTML code should be in your document which will be included on every page.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The ASP part&lt;/b&gt;&lt;/div&gt;Now we need to know which is the name of the viewed page. To do so, we are going to use a simple ASP function. Add the following snippet in your menu page (just before or after the &amp;lt;ul&amp;gt; list):&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;SCRIPT Language=VBScript RUNAT=SERVER&amp;gt;&lt;br /&gt;Function getFileName()&lt;br /&gt;&amp;nbsp; Dim lsPath, arPath&lt;br /&gt;&amp;nbsp; lsPath = Request.ServerVariables("SCRIPT_NAME")&lt;br /&gt;&amp;nbsp; arPath = Split(lsPath, "/")&lt;br /&gt;&amp;nbsp; GetFileName =arPath(UBound(arPath,1))&lt;br /&gt;End Function&lt;br /&gt;&amp;lt;/SCRIPT&amp;gt;&lt;br /&gt;&amp;lt;%&lt;br /&gt;Dim fileName&lt;br /&gt;fileName =(getFileName)&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;As you can see, the "fileName" variable will be the name of the viewed page. We are going to use that variable in order to apply a specific CSS rule to the menu options.&lt;br /&gt;&lt;br /&gt;Let's get back to the menu...&lt;br /&gt;&lt;br /&gt;We need to change the &amp;lt;ul&amp;gt; list and make it look like:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href="homepage.asp"&amp;gt;&amp;lt;div &amp;lt;%if fileName="homepage.asp" then%&amp;gt;class="menuSelected"&amp;lt;%end if%&amp;gt;&amp;gt;Home Page&amp;lt;/div&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href="option1.asp"&amp;gt;&amp;lt;div &amp;lt;%if fileName="option1.asp" then%&amp;gt;class="menuSelected"&amp;lt;%end if%&amp;gt;&amp;gt;Option 1&amp;lt;/div&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href="option2.asp"&amp;gt;&amp;lt;div &amp;lt;%if fileName="option2.asp" then%&amp;gt;class="menuSelected"&amp;lt;%end if%&amp;gt;&amp;gt;Option 2&amp;lt;/div&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;li&amp;gt;&amp;lt;a href="option3.asp"&amp;gt;&amp;lt;div &amp;lt;%if fileName="option3.asp" then%&amp;gt;class="menuSelected"&amp;lt;%end if%&amp;gt;&amp;gt;Option 3&amp;lt;/div&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;That way, a div with class="menuSelected" will be added to the &amp;lt;li&amp;gt; that correspond to the page viewed.&lt;br /&gt;Easy like that!&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The CSS&lt;/b&gt;&lt;/div&gt;Now you only need to create appropriate CSS rules. In our example I will only create a simple rule for the menuSelected class:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;.menuSelected {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; font-weight: bold;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;It is clear that you can play around with your styles the way you prefer.&lt;br /&gt;&lt;br /&gt;Hope you've found the post useful. As usual let me know what you think about it...&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-1413965199945432297?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=TD7MesOV5fM:RYnukcLJy4U:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=TD7MesOV5fM:RYnukcLJy4U:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=TD7MesOV5fM:RYnukcLJy4U:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/TD7MesOV5fM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/1413965199945432297/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/asp-css-highlight-selected-menu-item.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1413965199945432297" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1413965199945432297" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/TD7MesOV5fM/asp-css-highlight-selected-menu-item.html" title="ASP &amp; CSS: highlight selected menu item" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/asp-css-highlight-selected-menu-item.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-8460582317406572219</id><published>2012-01-27T07:00:00.000+01:00</published><updated>2012-01-27T07:00:06.226+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VBScript" /><category scheme="http://www.blogger.com/atom/ns#" term="response" /><category scheme="http://www.blogger.com/atom/ns#" term="response.isclientconnected" /><category scheme="http://www.blogger.com/atom/ns#" term="asp" /><title type="text">ASP: is the client still connected?</title><content type="html">I recently wrote a short &lt;a href="http://thewebthought.blogspot.com/2012/01/asp-some-general-tips.html" target="_blank"&gt;post&lt;/a&gt; about things not to forget when creating &lt;b&gt;ASP&lt;/b&gt; document. One of the general tips I mentioned was about checking if the client is still connected, before starting long procedures like complicated server requests (i.e. SQL queries).&lt;br /&gt;In this article we are going to see how to do it with the response object (&lt;b&gt;IsClientConnected&lt;/b&gt;).&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The response object&lt;/b&gt;&lt;/div&gt;The response object is one very important thing in ASP programming. It basically sends responses from the server to the user. It has a very large list of collections, properties and methods, and it is one of those things we can't live without. We use it for managing cookies (set and/or get), controlling the cache, the buffer, the charset, and we use it for redirects, flushes and so on.&lt;br /&gt;In this post we are going to use it to check if the client is still connected or not.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;IsClientConnected&lt;/b&gt;&lt;/div&gt;The IsClientConnected property tells us if the client is connected, returning a true/false value. While the syntax is very simple:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;response.IsClientConnected&lt;/code&gt;&lt;/blockquote&gt;we can use it together with a conditional statement in order to output the client status:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;If Response.IsClientConnected=true then&lt;br /&gt;&amp;nbsp; Response.Write("User connected")&lt;br /&gt;else&lt;br /&gt;&amp;nbsp; Response.Write("User not connected")&lt;br /&gt;end if&lt;br /&gt;%&amp;gt;&amp;nbsp;&lt;/code&gt;&lt;/blockquote&gt;If we use the above code in any of our ASP document, the only possible output is "User connected". That is because, if we (the users) make the request&amp;nbsp; to the server, it is clear that we are connected!&lt;br /&gt;However, if telling the user if he/she is still connected, has no value at all, it is important to check it before starting a long and resources consuming server operation.&lt;br /&gt;So, instead of outputting the result of the IsClientConnected request, we check it, and eventually go on with our long server request:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;If Response.IsClientConnected=true then&lt;br /&gt;&amp;nbsp; *** our long server request ***&lt;br /&gt;end if&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;That's all.&lt;br /&gt;&lt;br /&gt;Please let me know what you think about it, using the comments section below.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-8460582317406572219?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=jBFQzERV0_s:cPhTCC4bjXI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=jBFQzERV0_s:cPhTCC4bjXI:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=jBFQzERV0_s:cPhTCC4bjXI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/jBFQzERV0_s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/8460582317406572219/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/asp-is-client-still-connected.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/8460582317406572219" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/8460582317406572219" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/jBFQzERV0_s/asp-is-client-still-connected.html" title="ASP: is the client still connected?" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/asp-is-client-still-connected.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-7754322816315161210</id><published>2012-01-25T07:00:00.001+01:00</published><updated>2012-01-25T07:00:09.558+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="footer" /><category scheme="http://www.blogger.com/atom/ns#" term="header" /><category scheme="http://www.blogger.com/atom/ns#" term="positioning" /><category scheme="http://www.blogger.com/atom/ns#" term="absolute" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">CSS: fixed header and footer</title><content type="html">Today we are going to create a &lt;b&gt;header &lt;/b&gt;and a &lt;b&gt;footer &lt;/b&gt;with fixed position. Our page will have a center part which will naturally overflow when needed, while the header and the footer will stay where they are (top and bottom). The content in the central part will eventually go under the header (when scrolled down) and under the footer (if longer than the viewport).&lt;br /&gt;Nothing complicated, but we will need some little &lt;b&gt;CSS &lt;/b&gt;tricks.&lt;br /&gt;&lt;br /&gt;Let's start.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;HTML part&lt;/b&gt;&lt;/div&gt;The HTML part is very simple. In the body of our page, we just place three divs: one for the header, one for the footer and one for the content:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;div class="header"&amp;gt; header &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div class="content"&amp;gt; content&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div class="footer"&amp;gt; footer&amp;lt;/div&amp;gt;&amp;nbsp;&lt;/code&gt;&lt;/blockquote&gt;Easy, isn't it? Let's see the CSS part&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;CSS part&lt;/b&gt;&lt;/div&gt;The rules for the above divs should be put in the head of your document. The first part is just generic:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;body&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-family: Tahoma;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 12px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 86px 0px 144px 0px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin: 15px;&lt;br /&gt;}&lt;br /&gt;@media screen{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; body&amp;gt;div.footer{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; position: fixed;&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; body&amp;gt;div.header{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; position: fixed;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;* html body{&lt;br /&gt;&amp;nbsp;&amp;nbsp; overflow:hidden;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;In the above code, what is to be noted is the padding rule for the body. The values are 86px, 0px, 144px and 0px. The important values are 86px for the header height, and 144px for the footer height.&lt;br /&gt;Now let's place some rules for the container div:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;* html .container {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; height:100%;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; overflow:auto;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;And then the header and the footer divs:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;.header {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 100%;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 36px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding-top: 20px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding-bottom: 20px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; position: absolute;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; top: 0px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left: 0px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background:white;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align:center;&lt;br /&gt;}&lt;br /&gt;.footer {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bottom: 0px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left: 0px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align: center;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 100%;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; position: absolute;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 72px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background:white;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding-top: 20px;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;Those two parts place the header and footer (absolute positioned) at the top and at the bottom of our page.&lt;br /&gt;We can play with heights, paddings and margins of the divs, and change the padding of the body as well, in order to find a desired solution.&lt;br /&gt;Important: the background of the header and the footer must be set, in order to make the content go under them.&lt;br /&gt;&lt;br /&gt;And that is all for today: enjoy!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-7754322816315161210?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=YBbXGlHrGh4:ZP1KgjtAu9s:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=YBbXGlHrGh4:ZP1KgjtAu9s:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=YBbXGlHrGh4:ZP1KgjtAu9s:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/YBbXGlHrGh4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/7754322816315161210/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/css-fixed-header-and-footer.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7754322816315161210" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7754322816315161210" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/YBbXGlHrGh4/css-fixed-header-and-footer.html" title="CSS: fixed header and footer" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>4</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/css-fixed-header-and-footer.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-6299449264266006446</id><published>2012-01-23T07:00:00.002+01:00</published><updated>2012-01-23T07:00:09.449+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="footer" /><category scheme="http://www.blogger.com/atom/ns#" term="div" /><category scheme="http://www.blogger.com/atom/ns#" term="HTML5" /><category scheme="http://www.blogger.com/atom/ns#" term="section" /><category scheme="http://www.blogger.com/atom/ns#" term="header" /><category scheme="http://www.blogger.com/atom/ns#" term="aside" /><category scheme="http://www.blogger.com/atom/ns#" term="article" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><category scheme="http://www.blogger.com/atom/ns#" term="nav" /><title type="text">HTML5: is div dead? Not, really...</title><content type="html">I must admit I am not a great fan of &lt;b&gt;HTML5&lt;/b&gt;. First I've tried to understand the new tags and then I've started using them on new projects, sometimes ago. I even contacted the Doctors on &lt;a href="http://html5doctor.com/" target="_blank"&gt;HTML5 Doctor&lt;/a&gt; to submit some questions and prepare an interview to be published on the web thought. They were obviously too busy and, even if they initially agreed on the interview, they've never got back to me with the answers.&lt;br /&gt;Anyway, in this short post I will try to explain where the new content formatting tags should be used and how they can replace the div tag... if ever.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;A page structure&lt;/b&gt;&lt;/div&gt;First of all let me show you how we can use the new tags in a page:&lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" style="color: black; width: 80%;"&gt;   &lt;tbody&gt;&lt;tr align="center" bgcolor="#FF3333" style="height: 50px;"&gt;     &lt;td colspan="2"&gt;&lt;div&gt;&amp;lt;header&amp;gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr align="center" bgcolor="#FFFF00" style="height: 50px;"&gt;     &lt;td colspan="2"&gt;&lt;div&gt;&amp;lt;nav&amp;gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr align="center" style="height: 100px;"&gt;     &lt;td bgcolor="#0066FF" width="60%"&gt;&lt;div&gt;&amp;lt;article&amp;gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" style="color: black; height: 50px; margin-left: auto; margin-right: auto; text-align: left; width: 80%;"&gt;         &lt;tbody&gt;&lt;tr&gt;           &lt;td bgcolor="#00FFCC"&gt;&lt;div align="center"&gt;&amp;lt;section&amp;gt;&lt;/div&gt;&lt;/td&gt;         &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/td&gt;     &lt;td bgcolor="#FF66FF"&gt;&lt;div&gt;&amp;lt;aside&amp;gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr bgcolor="#66FF66" style="height: 50px;"&gt;     &lt;td colspan="2" style="text-align: center;"&gt;&lt;div&gt;&amp;lt;footer&amp;gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;As you can see, following the above schema, every tag has its specific purpose.&lt;br /&gt;In any case, we should remember that even if a tag is named "article", that doesn't mean we have to use it only when strictly dealing with articles.&lt;br /&gt;Let's see every single tag...&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&amp;lt;header&amp;gt;&lt;/b&gt;&lt;br /&gt;The header is a place where we show general information, possibly repeated on every page. It can contain the company logo, for example.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&amp;lt;nav&amp;gt;&lt;/b&gt;&lt;br /&gt;The nav section should contain the web site navigation, such as a menu.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&amp;lt;article&amp;gt;&lt;/b&gt;&lt;br /&gt;It's not just articles, in strict sense. This section is where we insert the web site content.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&amp;lt;section&amp;gt;&lt;/b&gt;&lt;br /&gt;If articles or, generally speaking, content can be divided into sub parts, &amp;lt;section&amp;gt; is the place where to put those parts. It's clear that we can end up having more than one section.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&amp;lt;aside&amp;gt;&lt;/b&gt;&lt;br /&gt;This tag can be used to insert other content not strictly related to the "main" content. For example, it can contain ads, images or other external links.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&amp;lt;footer&amp;gt;&lt;/b&gt;&lt;br /&gt;The footer is normally staying at the bottom of a web page and contains - again like the header - information that we usually repeat on every page.&lt;br /&gt;As a side note: footer and header are not to be considered only related to the page or the web site. They can be used as header or footer of an article as well. We then can have more than one footer or header.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;What about the div?&lt;/b&gt;&lt;/div&gt;As you can see, many of the above tags can replace the div. When we develop web sites, we are used to create containers with divs: for example, a navigation menu is usually contained in a div. Now, we should use &amp;lt;nav&amp;gt;.&lt;br /&gt;So, is the div tag becoming obsolete? Will we use it again?&lt;br /&gt;Well, it is my opinion that the div tag will still be used in new web pages. We can use the above HTM5 tags whenever needed, however we will not forget about our beloved div.&lt;br /&gt;It is clear that when the W3C thought about the above new tags, the idea behind them was rationalise the HTML code, giving a proper name to containers. Generally speaking, it is a good idea and it can help us to maintain the HTML code. However, I humbly do not see anything else about it.&lt;br /&gt;It is certain that you can start use the new tags from now on, but be aware of possible compatibility problems especially with the good old IE (version 8 and below). If you need a good fallback solution see &lt;a href="http://thewebthought.blogspot.com/2011/04/html5-and-internet-explorer-8-not-good.html"&gt;this article&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Ok, that is all.&lt;br /&gt;Please share your idea on the div and the new HTML5 tags: I really like to know what you think...&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-6299449264266006446?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=mm9fLmnWV0I:hYW9DM4SPO4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=mm9fLmnWV0I:hYW9DM4SPO4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=mm9fLmnWV0I:hYW9DM4SPO4:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/mm9fLmnWV0I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/6299449264266006446/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/html5-is-div-dead-not-really.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/6299449264266006446" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/6299449264266006446" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/mm9fLmnWV0I/html5-is-div-dead-not-really.html" title="HTML5: is div dead? Not, really..." /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/html5-is-div-dead-not-really.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1823333879837970413</id><published>2012-01-20T07:00:00.001+01:00</published><updated>2012-01-20T07:00:03.895+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="soundex" /><category scheme="http://www.blogger.com/atom/ns#" term="OR" /><category scheme="http://www.blogger.com/atom/ns#" term="sql query" /><category scheme="http://www.blogger.com/atom/ns#" term="IN" /><category scheme="http://www.blogger.com/atom/ns#" term="operators" /><title type="text">SQL: the IN operator</title><content type="html">The &lt;b&gt;IN&lt;/b&gt; &lt;b&gt;operator &lt;/b&gt;can be very useful when we need to perform &lt;b&gt;SQL &lt;/b&gt;queries where we need to filter the results with more than one possible value.&lt;br /&gt;Just to understand the power of the IN operator,&amp;nbsp; we need to go back a few steps and see how we usually filter data from a table with the OR operator.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;b&gt;The OR operator&lt;/b&gt;&lt;/div&gt;The OR operator is what we normally use to filter data using different values. For example, we can have a table with a list of users. One of the table fields is the first name ("name"). If we want to filter data, and get all the users that have 'John' and 'James' as name, we will create a query like:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;SELECT * FROM users&lt;br /&gt;WHERE name = 'John' OR name = 'James'&lt;/code&gt;&lt;/blockquote&gt;The above query is just an example, but I believe it is the usual way we are used to filter data with multiple values. But it's not the only way of doing it.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The IN operator&lt;/b&gt;&lt;/div&gt;Using the IN operator is much easier and, let me say it, more elegant (if that matters!). Let's see how we could write the above query, using it:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;SELECT * FROM users&lt;br /&gt;WHERE name IN ('John', 'James')&lt;/code&gt;&lt;/blockquote&gt;As you can see the query is cleaner. It is important to note that the list of possible matching values is just a comma separated list. I believe you understand the strenght of such a solution. For example, if we have a multiselect listbox on our page, we can join the selected options and pass the values to our query to obtain the results.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Other considerations&lt;/b&gt;&lt;/div&gt;There's something more I would like you to consider. When we filter results, we sometimes use the LIKE operator, especially when we need to use only part of a string as filtering value. For example in the first above query, we could filter data by names starting with 'J' or 'S':&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;SELECT * FROM users&lt;br /&gt;WHERE name LIKE 'J%' OR name LIKE 'S%'&lt;/code&gt;&lt;/blockquote&gt;On the other hand, the following query won't work the same way:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;SELECT * FROM users&lt;br /&gt;WHERE name IN ('J%', 'S%')&lt;/code&gt;&lt;/blockquote&gt;So what can we do? We can use SOUNDEX. In fact, a correct way for the query using the IN operator will be:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;SELECT * FROM users&lt;br /&gt;WHERE SOUNDEX(name) IN (SOUNDEX('J'), SOUNDEX('S'))&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;And that's it. I hope you found the article useful. If you like, please leave a comment in the section below.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-1823333879837970413?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=NpwTT8RKX8U:tjGncaBE_B0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=NpwTT8RKX8U:tjGncaBE_B0:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=NpwTT8RKX8U:tjGncaBE_B0:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/NpwTT8RKX8U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/1823333879837970413/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/sql-in-operator.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1823333879837970413" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1823333879837970413" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/NpwTT8RKX8U/sql-in-operator.html" title="SQL: the IN operator" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/sql-in-operator.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1493215740237474202</id><published>2012-01-18T07:00:00.002+01:00</published><updated>2012-01-18T07:00:03.345+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="web design" /><category scheme="http://www.blogger.com/atom/ns#" term="mobile devices" /><category scheme="http://www.blogger.com/atom/ns#" term="simulator" /><category scheme="http://www.blogger.com/atom/ns#" term="emulator" /><category scheme="http://www.blogger.com/atom/ns#" term="handheld" /><title type="text">Web Development: handheld device emulators</title><content type="html">In the past months I've made some researches about web development and design for &lt;b&gt;handheld devices&lt;/b&gt;. The main problem, as we all know, is that we should have most of the devices sold, just to test how our web sites or applications are displayed on them. Does our newly created web site look just right on an iPad or a Galaxy Tab?&lt;br /&gt;&lt;br /&gt;To be sure we are doing things properly, we need to test the web creation, and &lt;b&gt;emulators &lt;/b&gt;can be of some help. In this post I gathered all the relevant tools, as a repository for future reference.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://developer.android.com/guide/developing/tools/emulator.html" target="_blank"&gt;Android Emulator&lt;/a&gt;&lt;br /&gt;"The Android SDK includes a mobile device emulator — a virtual mobile device that runs on your computer. The emulator lets you develop and testAndroid applications without using a physical device."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.blackberry.com/developers/downloads/simulators/index.shtml" target="_blank"&gt;BlackBerry Simulator&lt;/a&gt; &lt;br /&gt;"Use BlackBerry device simulators to demonstrate and test how the BlackBerry device software, screen, keyboard and trackwheel will work with your application. These simulators will also simulate behavior in various wireless network conditions. Device simulators are great tools for testing, training and for use in presentations."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ipadpeek.com/" target="_blank"&gt;iPad Peek&lt;/a&gt; &lt;br /&gt;A simple, but effective, iPad emulator.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.marketcircle.com/iphoney/" target="_blank"&gt;iphoney&lt;/a&gt;&lt;br /&gt;"A free iPhone web simulator for designers."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mobilephoneemulator.com/" target="_blank"&gt;Mobile emulator&lt;/a&gt;&lt;br /&gt;This is one of the best emulators I have found. It can check for multiple cell phone terminal with different resolutions. Really helpful.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mobilemoxie.com/handset-emulators/phone-emulator/#" target="_blank"&gt;Phone emulator&lt;/a&gt;&lt;br /&gt;"Emulate and compare your website across a variety of different phones. This is a one-stop mobile emulation shop! Compare how your site looks on three phones at a time, with the handset, browser and operating system (OS) specifications right beside the emulations. No need to download and install these mobile emulators – all the emulations are performed live online!"&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.opera.com/developer/tools/mini/" target="_blank"&gt;Opera mini simulator&lt;/a&gt;&lt;br /&gt;"Below is a live demo of Opera Mini 6.5that functions as it would when installed on a handset."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.opera.com/developer/tools/mobile/" target="_blank"&gt;Opera mobile emulator&lt;/a&gt;&lt;br /&gt;"Do your mobile development straight from your desktop, and pair it with Opera Dragonfly for advanced debugging."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://testiphone.com/" target="_blank"&gt;testiphone&lt;/a&gt;&lt;br /&gt;"This is a web browser based simulator for quickly testing your iPhone web applications. This tool has been so far tested and working using Internet Explorer 7, FireFox 2 and Safari 3."&lt;br /&gt;&lt;br /&gt;&lt;a href="http://chrispederick.com/work/user-agent-switcher/" target="_blank"&gt;User agent switcher&lt;/a&gt;&lt;br /&gt;"The User Agent Switcher extension adds a menu and a toolbar button to switch the user agent of a browser.   The extension is available for  Firefox  and will run on any platform that this browser supports including Windows, Mac OS X and Linux."&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-1493215740237474202?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=mWKnIkeCvVE:5pIfkthYy9A:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=mWKnIkeCvVE:5pIfkthYy9A:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=mWKnIkeCvVE:5pIfkthYy9A:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/mWKnIkeCvVE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/1493215740237474202/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/web-development-handheld-device.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1493215740237474202" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1493215740237474202" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/mWKnIkeCvVE/web-development-handheld-device.html" title="Web Development: handheld device emulators" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/web-development-handheld-device.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-9208654939872595947</id><published>2012-01-16T07:00:00.000+01:00</published><updated>2012-01-16T07:00:03.950+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="document object model" /><category scheme="http://www.blogger.com/atom/ns#" term="DOM" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><category scheme="http://www.blogger.com/atom/ns#" term="DOM tree" /><title type="text">HTML: what is a DOM tree?</title><content type="html">If you are a regular visitor of web sites related to coding and web development, you have surely encountered the term "&lt;b&gt;DOM&lt;/b&gt;" or, more often, the concept of &lt;b&gt;DOM tree&lt;/b&gt;. In this short post we will explore the meaning of DOM and of DOM tree. I will try to put it in the simplest way possible, so that whenever we will encounter the term again in other documents or reference web sites, we will know what they are talking about.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;What is DOM?&lt;/b&gt;&lt;/div&gt;When we create an HTML page, we know that the document is meant to be understood and processed by a dedicated software. The latter is called "User agent" and usually it is a web browser. When our beloved user agent starts to parse the HTML document, it basically transforms the HTML markup into a DOM tree. DOM is an acronym and it stands for &lt;i&gt;D&lt;/i&gt;ocument &lt;i&gt;O&lt;/i&gt;bject &lt;i&gt;M&lt;/i&gt;odel.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The DOM tree&lt;/b&gt;&lt;/div&gt;The DOM tree is actually - guess what - a tree. It has a root and branches that are called nodes. Inside nodes there are elements or other nodes. We can visualise a DOM tree exactly like a tree and nodes like branches that can have other branches and so on.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;Just to better understand the concept, we can create an HTML page and see how the markup is transformed into a DOM tree.&lt;br /&gt;Consider the following example:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;HTML&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;HEAD&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TITLE&amp;gt;HTML Example&amp;lt;/TITLE&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/HEAD&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;BODY&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;p&amp;gt;This is a paragraph&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/BODY&amp;gt;&lt;br /&gt;&amp;lt;/HTML&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;Now let's try to transform the above into a DOM tree!&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; html&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; head&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #text: lbspsp&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #text: HTML Example&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #text: lbsp&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #text: lbsp&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; body&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #text: lnspsp&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #text: This is a paragraph&lt;/code&gt;&lt;/blockquote&gt;Ok, as you can see, the above is literally a tree representation of our markup.&lt;br /&gt;The root element of the tree is the &lt;i&gt;HTML &lt;/i&gt;element which contains two other elements: &lt;i&gt;head &lt;/i&gt;and &lt;i&gt;body&lt;/i&gt;. This is a basic HTML structure as we very well know. Text nodes contains spaces (sp) and line breaks (lb), however it must be noted that whitespaces before the head start tag are removed while all whitespaces after the body end tag are placed at the end of the body section.&lt;br /&gt;Following the tree structure we can see that the &lt;i&gt;head &lt;/i&gt;element has a &lt;i&gt;title &lt;/i&gt;element in it. The &lt;i&gt;title &lt;/i&gt;element contains a &lt;i&gt;text &lt;/i&gt;node ("HTML Example"). At the same time the &lt;i&gt;body &lt;/i&gt;element contains a &lt;i&gt;p&lt;/i&gt; element which contains a &lt;i&gt;text &lt;/i&gt;node ("This is a paragraph").&lt;br /&gt;As you can see it really is a tree, with a root and branches which might have other branches. &lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Manipulating the DOM tree&lt;/b&gt;&lt;/div&gt;It is possible to manipulate the DOM tree and I'm sure you do it a lot, maybe without knowing it. Because every time we use, for example, JavaScript and we change an element attribute, we are actually manipulating the DOM tree. Many times when we use jQuery we do the same. We can select an element and change its appearance or content: doing so we manipulate the DOM tree.&lt;br /&gt;Every element of the DOM tree is actually an object and we can manipulate, for example, attributes related to those elements. &lt;br /&gt;&lt;br /&gt;This concludes our journey. We have explored the DOM tree and I hope I gave you some valuable information about it. Please, again, share your thoughts about it.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-9208654939872595947?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=sCrcJ2_E_ws:4G9es_xqFYE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=sCrcJ2_E_ws:4G9es_xqFYE:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=sCrcJ2_E_ws:4G9es_xqFYE:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/sCrcJ2_E_ws" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/9208654939872595947/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/html-what-is-dom-tree.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/9208654939872595947" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/9208654939872595947" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/sCrcJ2_E_ws/html-what-is-dom-tree.html" title="HTML: what is a DOM tree?" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/html-what-is-dom-tree.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-8750507932229627166</id><published>2012-01-13T07:00:00.000+01:00</published><updated>2012-01-13T07:00:08.511+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="infinite scroll" /><category scheme="http://www.blogger.com/atom/ns#" term="plug-in" /><category scheme="http://www.blogger.com/atom/ns#" term="load content" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title type="text">jQuery: loading content while user scrolls (infinite scroll)</title><content type="html">There's this new fashion of creating page with&lt;b&gt; infinite scroll&lt;/b&gt;. In order to obtain the desired effect, there are some &lt;b&gt;jQuery &lt;/b&gt;plug-ins out there.&lt;br /&gt;Here are some.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.webresourcesdepot.com/load-content-while-scrolling-with-jquery/" target="_blank"&gt;Load Content While Scrolling With jQuery&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"[...]When we are scrolling down a webpage, the code recognizes that you are at the bottom and auto-loads new content."&lt;/blockquote&gt;&lt;br /&gt;&lt;a href="http://www.appelsiini.net/projects/lazyload" target="_blank"&gt;Lazy Load Plugin for jQuery&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"Lazy Load is a jQuery plugin written in JavaScript. It delays loading of images in long web pages. Images outside of viewport (visible part of web page) wont be loaded before user scrolls to them"&lt;/blockquote&gt;&lt;br /&gt;&lt;a href="http://www.infinite-scroll.com/" target="_blank"&gt;Infinite Scroll jQuery Plugin&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"This plugin aims to &lt;i&gt;progressively enhance&lt;/i&gt; your page. Your navigation/pagination elements should be present in the HTML for non-js users, but the plugin will utilize those links to build out a more rich browsing experience."&lt;/blockquote&gt;&lt;br /&gt;&lt;a href="http://andersonferminiano.com/jqueryscrollpagination/" target="_blank"&gt;jQuery ScrollPagination&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"jQuery ScrollPagination plugin has been developed by Anderson Ferminiano for studying purposes, you may use it for free in any project you want, only preserve the credits."&lt;/blockquote&gt;&lt;br /&gt;&lt;a href="http://contextllc.com/tools/jQuery-infinite-scroll-live-scroll" target="_blank"&gt;onScrollBeyond and scrollExtend&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"There are two plugins encapsulated here – onScrollBeyond, which allows the developer to specify a callback to be run when an element is scrolled beyond (or the end of the document is reached), and scrollExtend, which is simply an implementation of onScrollBeyond that automatically loads new content via ajax when a user scrolls past an element."&lt;/blockquote&gt;&lt;a href="http://www.blogger.com/goog_500982709"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.fieg.nl/infinite-ajax-scroll-a-jquery-plugin" target="_blank"&gt;Infinite Ajax Scroll, a jQuery plugin&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"I am proud to announce my first official open-source jQuery plugin release.&amp;nbsp;Infinite Ajax Scroll is a plugin that turns you existing pagination into an infinite scrolling one, with ease."&lt;/blockquote&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-8750507932229627166?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=pijPepKXbdE:WQ0icTxuFXE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=pijPepKXbdE:WQ0icTxuFXE:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=pijPepKXbdE:WQ0icTxuFXE:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/pijPepKXbdE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/8750507932229627166/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/jquery-loading-content-while-user.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/8750507932229627166" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/8750507932229627166" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/pijPepKXbdE/jquery-loading-content-while-user.html" title="jQuery: loading content while user scrolls (infinite scroll)" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/jquery-loading-content-while-user.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4020201109590594748</id><published>2012-01-11T07:00:00.002+01:00</published><updated>2012-01-11T07:00:05.802+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="server-side include" /><category scheme="http://www.blogger.com/atom/ns#" term="response.flush" /><category scheme="http://www.blogger.com/atom/ns#" term="option.explicit" /><category scheme="http://www.blogger.com/atom/ns#" term="includes" /><category scheme="http://www.blogger.com/atom/ns#" term="response.isclientconnected" /><category scheme="http://www.blogger.com/atom/ns#" term="asp" /><title type="text">ASP: some general tips</title><content type="html">The new year has just began, and you're probably still trying to get things working after your well earned holidays. Don't worry, it won't be a too much complicated article: just a few tips not to forget when programming in &lt;b&gt;ASP&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;We will examine tips in no particular order, just as they poured in my mind while I was thinking about how some basic things are easily overlooked while programming. That could happen because we aren't aware of them or just because we might be lazy enough to forget about them.&lt;br /&gt;&lt;br /&gt;Ok, take a deep breath and let's start.&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Save time with includes&lt;/b&gt;&lt;/div&gt;Includes are often overlooked, especially by beginners. Remember that they can save us a lot of time, specifically when we will have to change things afterwards. Keep your main functions and in general anything that you often use (like headers, menus or footers) on external files. Then, include those files when and where they are needed.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Use .asp as extension for includes&lt;/b&gt;&lt;/div&gt;We are taught that includes should have an .inc extension. Forget about it and use .asp extensions, just because they will be treated as .asp file and the code will still be run on the server side. This will avoid people from seeing your code (at least at some levels).&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Remember the order of execution&lt;/b&gt;&lt;/div&gt;In an .asp file, there's a predefined order of execution for anything that the browser is loading. ASP pages are executed following this list:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Server Side Includes (includes are interpreted and executed);&lt;/li&gt;&lt;li&gt;Server Side VBScript code (anything in between &amp;lt;% and %&amp;gt; is then executed);&lt;/li&gt;&lt;li&gt;Client Side JavaScript (finally is the turn of the JavaScript code).&lt;/li&gt;&lt;/ol&gt;This is important, especially when we try to mix server side code and client side code (maybe VBScript and JavaScript). It might happen that, for example, VBScript conditional statements are not working as expected because of that.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Use option explicit&lt;/b&gt;&lt;/div&gt;Option explicit (&amp;lt;%Option Explicit%&amp;gt;) is used when we need to explicitly declare all variables in the page. That looks like as if we want to complicate our lives: not true. Forcing us to declare all variables, avoids variables misspelling errors. Let's say we create a complicated function that uses a variable called &lt;i&gt;XMLstring&lt;/i&gt;. We write our code and while taken by the sacred fire of programming we type the variable wrongly as &lt;i&gt;XLMstring &lt;/i&gt;at some point. Because the function is quite long, we will spend a lot of time finding that little mistake, while with option explicit the error is easily discovered.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Use subroutines&lt;/b&gt;&lt;/div&gt;This is very general, but often overlooked. Use subroutines whenever you can: we do not need to write the same things over and over. We can create a subroutine and then call it when we need it. (More info &lt;a href="http://thewebthought.blogspot.com/2011/09/asp-call-functions-and-subroutines.html" target=""&gt;here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Use response.flush&lt;/b&gt;&lt;/div&gt;We discussed this in the past. With response.flush we can show recordset results, for example, as soon as they start pouring from the server. Don't let the user wait while all the information is gathered from the server. (More on &lt;a href="http://thewebthought.blogspot.com/2010/12/asp-responseflush-method.html"&gt;response.flush&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Use response.IsClientConnected&lt;/b&gt;&lt;/div&gt;Before starting long and complicated tasks on the server, check if the client is still connected. That will avoid unneeded server workload. If we think of a situation where a user submits a server request and then goes away, being not interested in results, checking if the client is still connected will reduce unnecessary server requests.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Always close connections&lt;/b&gt;&lt;/div&gt;Remember to close connections. And we should do it as soon as possible; don't wait and close them at the end of the page. We should open connections near the place where we need to show results; and close them just when we finish showing results. That will decrease server workload.&lt;br /&gt;&lt;br /&gt;That's all folk for today. I hope you will still have the strength to share your thoughts about it all. If so, and I will be pleased, use the comments section below.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-4020201109590594748?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=itaYHo4BqKg:0Vabg3eX6x4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=itaYHo4BqKg:0Vabg3eX6x4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=itaYHo4BqKg:0Vabg3eX6x4:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/itaYHo4BqKg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/4020201109590594748/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/asp-some-general-tips.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4020201109590594748" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4020201109590594748" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/itaYHo4BqKg/asp-some-general-tips.html" title="ASP: some general tips" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/asp-some-general-tips.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1215877589203043903</id><published>2012-01-09T07:00:00.003+01:00</published><updated>2012-01-09T07:00:12.016+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="web design" /><category scheme="http://www.blogger.com/atom/ns#" term="menu" /><title type="text">Web Design: develop an effective navigation menu</title><content type="html">When developing a web site, one thing we should concentrate on is the &lt;b&gt;navigation menu&lt;/b&gt;. Considering that probably a menu is the most important part of our web development process, I would like to share some ideas about it, things to keep in mind while we start thinking about an effective navigation menu.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;What kind of menu we need&lt;/b&gt;&lt;/div&gt;The first thing we should consider - while our project is still a blank and white piece of paper - is: &lt;i&gt;what kind of menu we really need?&lt;/i&gt; It seems a dumb question, but we need to focus on what is the true purpose of our - yet to be born - navigation menu.&lt;br /&gt;Knowing what is the general purpose of our web site, lets us concentrate on the structure and content of the menu. For example: if our site is a marketplace, we need to focus on selling products, while if our site is just displaying our production range, we need to focus on products marketing.&lt;br /&gt;The concept is quite clear if we compare two well-known web sites: Apple and Amazon.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;Apple web site is mainly focused on displaying the products. Apple brand awareness is very strong, so they don't need to overstate on their trademark.&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-cMXyKD33SFA/Tu72fbe9UFI/AAAAAAAAAOQ/q7pAk6tweXA/s1600/apple.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="28" src="http://3.bp.blogspot.com/-cMXyKD33SFA/Tu72fbe9UFI/AAAAAAAAAOQ/q7pAk6tweXA/s640/apple.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Apple main menu&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;As you can see, the Apple logo is just a small icon on the left hand side of the main menu, and it functions as a link to the web site homepage. The rest of the menu is just displaying direct links to specific product ranges. Obviously the "Store" has its importance, however the visitor is inevitably attracted to products names (as a side note, in my opinion the visitor will be mainly pushed to select the "iPhone" button, which is nicely placed at the center of the menu).&lt;br /&gt;The overall look of Apple menu is simple and effective: no submenus, no incredible and flashy effects.&lt;br /&gt;In my opinion the main focus here is on products.&lt;br /&gt;&lt;br /&gt;Amazon menu is quite the opposite. Because the primary objective of the site is to sell stuff, the menu is aimed to help the visitor to find the right and desired product.&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-7vdCXcJSxP0/Tu75Ff0pMaI/AAAAAAAAAOY/2sl_NDijLF4/s1600/amazon.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-7vdCXcJSxP0/Tu75Ff0pMaI/AAAAAAAAAOY/2sl_NDijLF4/s400/amazon.jpg" width="161" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Amazon main menu&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;As you can see, the menu is more complex, compared to Apple's. It is divided on sections and subsections based on product ranges (Amazon calls them "Departments"). The visitor is pushed to select a range or a subrange of products, in order to find the desired product. All the menu structure is aimed to the selling of goods.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Choose your items&lt;/b&gt;&lt;/div&gt;The moment we know what is the main purpose of our navigation menu, we can start thinking about content. The number of items is quite important, because it can change an effective menu into a non-effective one. My opinion is that, the least number of items, the better. Sometimes it is not possible to have less than 10 items in a navigation menu. In those cases it is better to carefully consider a menu structured on levels and sub-levels.&lt;br /&gt;When we finally have our list of main items, we need to consider their importance. It is usually preferable to have the most important menu element as first choice and then all the other items in order of importance.&lt;br /&gt;As we saw for Apple web site, we can even consider other rules and try to lure visitors to select a specific item by placing it in strategic positions.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Vertical, horizontal or a circle&lt;/b&gt;&lt;/div&gt;As we discussed, at this point we have decided the main purpose of the menu and the items we need in it. Now we need to consider its shape. &lt;br /&gt;Usually, web developers use horizontal or vertical menus. The two above examples are quite explicative: Apple menu is horizontal, while Amazon's is vertical. The choice is made considering the web site overall structure, however might have considerable impacts to be considered. For example, an horizontal menu could be too "long" for lower screen resolutions. If we consider tablets and smartphones - for example - we should take care of necessary fallbacks in case of mobile visitors. Horizontal menus should be redesigned for mobile users.&lt;br /&gt;At the same time, vertical menus could be too invasive and they could take to much vertical and horizontal space, being a strong and disturbing element on the page.&lt;br /&gt;Lately, I've considered circular menus which can be a good solution in some situations. They can be used when the home page can be filled up only by the main menu, however we should absolutely consider fallback for mobile users, and we will surely have to design another menu for inside pages, because normally circular menus take up a lot of space.&lt;br /&gt;&lt;br /&gt;That ends my short essay on navigation menus. I hope you've found it inspirational and useful.&lt;br /&gt;Please share your thoughts as usual. see you next time!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-1215877589203043903?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=HZLrk-h1kfM:0HCuBb1TMKk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=HZLrk-h1kfM:0HCuBb1TMKk:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=HZLrk-h1kfM:0HCuBb1TMKk:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/HZLrk-h1kfM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/1215877589203043903/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/web-design-develop-effective-navigation.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1215877589203043903" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1215877589203043903" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/HZLrk-h1kfM/web-design-develop-effective-navigation.html" title="Web Design: develop an effective navigation menu" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-cMXyKD33SFA/Tu72fbe9UFI/AAAAAAAAAOQ/q7pAk6tweXA/s72-c/apple.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/web-design-develop-effective-navigation.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1635972440518765659</id><published>2012-01-06T07:00:00.000+01:00</published><updated>2012-01-06T07:00:01.665+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css3" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">CSS: iPhone 4 in pure CSS3</title><content type="html">Yesterday I've received an interesting link from a friend of mine. I won't comment it but I would like you to say what you think (in case you still have time and need to do it).&lt;br /&gt;Here's the link:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://tjrus.com/iphone" target="_blank"&gt;iPhone 4 in pure CSS3&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enjoy and see you next time...&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-1635972440518765659?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=czXdg_k7hO4:E529OlnI8zY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=czXdg_k7hO4:E529OlnI8zY:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=czXdg_k7hO4:E529OlnI8zY:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/czXdg_k7hO4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/1635972440518765659/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/css-iphone-4-in-pure-css3.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1635972440518765659" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1635972440518765659" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/czXdg_k7hO4/css-iphone-4-in-pure-css3.html" title="CSS: iPhone 4 in pure CSS3" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/css-iphone-4-in-pure-css3.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-3188449221434503795</id><published>2012-01-04T07:00:00.003+01:00</published><updated>2012-01-04T07:00:05.020+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="the web thought" /><title type="text">Top ten most followed posts</title><content type="html">Today I'm going to do a bit of self-promotion.&lt;br /&gt;The following is the top ten of the most viewed posts on &lt;b&gt;the web thought&lt;/b&gt;. It was taken from statistics near the end of December.&lt;br /&gt;Maybe you have missed some articles and this is the opportunity of rediscovering them...&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li value="10"&gt;&lt;a href="http://thewebthought.blogspot.com/2011/02/css-custom-fonts-with-css3-font-face.html" target="_blank"&gt;CSS: Custom fonts with CSS3 (@font-face)&lt;/a&gt; 28 Feb 2011&lt;/li&gt;&lt;li value="9"&gt;&lt;a href="http://thewebthought.blogspot.com/2010/09/vbscript-how-to-check-if-file-exists-on.html" target="_blank"&gt;VBScript: How to check if a file exists on a remote server&lt;/a&gt; 15 Sep 2010&lt;/li&gt;&lt;li value="8"&gt;&lt;a href="http://thewebthought.blogspot.com/2011/05/asp-fpdf-multicell-with-multiple-line.html" target="_blank"&gt;ASP: FPDF MultiCell with multiple lines and positioning&lt;/a&gt; 25 May 2011&lt;/li&gt;&lt;li value="7"&gt;&lt;a href="http://thewebthought.blogspot.com/2011/06/css-html-nested-lists-with-style.html" target="_blank"&gt;CSS &amp;amp; HTML: nested lists with style&lt;/a&gt; 1 Jun 2011&lt;/li&gt;&lt;li value="6"&gt;&lt;a href="http://thewebthought.blogspot.com/2011/11/jquery-javascript-christmas-effects.html" target="_blank"&gt;jQuery &amp;amp; JavaScript: Christmas effects&lt;/a&gt; 25 Nov 2011&lt;/li&gt;&lt;li value="5"&gt;&lt;a href="http://thewebthought.blogspot.com/2010/11/jquery-random-quotes-from-txt-file.html" target="_blank"&gt;jQuery: random quotes from a txt file&lt;/a&gt; 22 Nov 2010&lt;/li&gt;&lt;li value="4"&gt;&lt;a href="http://thewebthought.blogspot.com/2010/10/jquery-enhancing-html-tables-usage-with.html" target="_blank"&gt;jQuery: enhancing html tables' usage with DataTables plugin&lt;/a&gt; 20 Oct 2010&lt;/li&gt;&lt;li value="3"&gt;&lt;a href="http://thewebthought.blogspot.com/2011/01/jquery-javascript-analogue-clocks.html" target="_blank"&gt;jQuery &amp;amp; JavaScript: Analogue clocks&lt;/a&gt; 10 Jan 2011&lt;/li&gt;&lt;li value="2"&gt;&lt;a href="http://thewebthought.blogspot.com/2010/10/asp-create-pdf-files-with-fpdf.html" target="_blank"&gt;ASP: Create pdf files with FPDF&lt;/a&gt; 11 Oct 2010&lt;/li&gt;&lt;li value="1"&gt;&lt;a href="http://thewebthought.blogspot.com/2010/10/css-making-background-image-fit-any.html" target="_blank"&gt;CSS: Making background image fit any screen resolution&lt;/a&gt; 18 Oct 2010&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-3188449221434503795?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=Wf_zfW4Calc:gpC1kAgrBmw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=Wf_zfW4Calc:gpC1kAgrBmw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=Wf_zfW4Calc:gpC1kAgrBmw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/Wf_zfW4Calc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/3188449221434503795/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/top-ten-most-followed-posts.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/3188449221434503795" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/3188449221434503795" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/Wf_zfW4Calc/top-ten-most-followed-posts.html" title="Top ten most followed posts" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/top-ten-most-followed-posts.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1795027808496129671</id><published>2012-01-02T07:00:00.001+01:00</published><updated>2012-01-02T13:24:19.374+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2011" /><category scheme="http://www.blogger.com/atom/ns#" term="internet" /><title type="text">2011: what happened (internet related main facts)</title><content type="html">2011 has ended and we all truly hope that 2012 will be a better year.&lt;br /&gt;Just for fun, I've gathered some notable facts happened in &lt;b&gt;2011 &lt;/b&gt;that are related to &lt;b&gt;Internet&lt;/b&gt;, in some way or another.&lt;br /&gt;Here is the list and I hope you'll enjoy reading it, while we are still relaxing during Christmas holidays.&lt;br /&gt;&lt;br /&gt;The facts are presented in no particular order (and surely not by relevance), and they are included just because in some way they caught my attention.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Tsunami in Japan&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: right;"&gt;&lt;a href="http://2.bp.blogspot.com/-K3OO2C4Htjo/TvHgeojRFII/AAAAAAAAAOg/-rmu6Cjt2Ss/s1600/tsunami.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="132" src="http://2.bp.blogspot.com/-K3OO2C4Htjo/TvHgeojRFII/AAAAAAAAAOg/-rmu6Cjt2Ss/s200/tsunami.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;On March 11 a tsunami hit Japan. Apart from the tragic event and the high number of victims, what really amazed me was the fact that I could follow the movement of the tsunami wave almost in real time.&lt;br /&gt;&lt;br /&gt;Messages from social networks were constantly sent across the World Wide Web, and I could follow things when they were happening. Amazing.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;iPad2&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/--gRjaaPiVrQ/TvHgqHYnazI/AAAAAAAAAOo/Mrmwu1LQ9_s/s1600/applelogo.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="80" src="http://3.bp.blogspot.com/--gRjaaPiVrQ/TvHgqHYnazI/AAAAAAAAAOo/Mrmwu1LQ9_s/s200/applelogo.jpg" width="80" /&gt;&lt;/a&gt;&lt;/div&gt;iPad2 has been released in March. On the first weekend, 500.000 tablets were sold. Together with the incredible sales numbers of iPhone 4 and iPhone 4S, the event definitely marked the beginning of a mass use of handheld devices for Internet browsing.&lt;br /&gt;&lt;br /&gt;Now we need to seriously take into account those devices when we develop web sites and applications.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Osama Bin Laden&lt;/b&gt;&lt;/div&gt;On May 1, Osama Bin Laden has been killed. I don't want to discuss the fact on a political point of view. What amazed me was those messages sent on the Internet by people that were near the place. It was like a live coverage of the fact (as for the Tsunami in Japan).&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Google+&lt;/b&gt;&lt;/div&gt;&lt;a href="http://2.bp.blogspot.com/-E1kVE62a7Hg/TFLTBVDL12I/AAAAAAAAABk/vLEn1aOFiVU/s1600/images.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-E1kVE62a7Hg/TFLTBVDL12I/AAAAAAAAABk/vLEn1aOFiVU/s1600/images.jpg" /&gt;&lt;/a&gt;In June, Google introduced Google+. That marked the beginning of a big clash of titans: FaceBook, Twitter and Google. While FaceBook keeps on growing, new Social Networks start their activity every day. Google will be a tough competitor.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Steve Jobs is dead&lt;/b&gt;&lt;/div&gt;On October 5, Steve Jobs passed away. It's a sad thing. No doubt, the man was quite particular. Some hated him, some adored him. Apart from that, surely Steve Jobs, in his life, has given a lot to the Internet as we know it.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Internet Explorer&lt;/b&gt;&lt;/div&gt;&lt;a href="http://2.bp.blogspot.com/-OTynqWNrETU/TvHhFGOgb6I/AAAAAAAAAOw/kogTcAdIgL8/s1600/ie.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="80" src="http://2.bp.blogspot.com/-OTynqWNrETU/TvHhFGOgb6I/AAAAAAAAAOw/kogTcAdIgL8/s200/ie.jpg" width="80" /&gt;&lt;/a&gt;In October, Internet Explorer's share of global browser usage dropped below 50% for the first time in more than a decade. The battle between browsers is getting bigger and stronger every day. What the future will be, we only can guess...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I hope you liked the post. Please share which 2011 events you consider important or should be in any case remembered.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-1795027808496129671?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=W0trMuOrwaQ:Gpp9_K9vMuw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=W0trMuOrwaQ:Gpp9_K9vMuw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=W0trMuOrwaQ:Gpp9_K9vMuw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/W0trMuOrwaQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/1795027808496129671/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2012/01/2011-what-happened-internet-related.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1795027808496129671" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1795027808496129671" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/W0trMuOrwaQ/2011-what-happened-internet-related.html" title="2011: what happened (internet related main facts)" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-K3OO2C4Htjo/TvHgeojRFII/AAAAAAAAAOg/-rmu6Cjt2Ss/s72-c/tsunami.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2012/01/2011-what-happened-internet-related.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1933135981881303205</id><published>2012-01-01T00:00:00.002+01:00</published><updated>2012-01-01T00:00:06.150+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="offtopic" /><title type="text">HAPPY NEW YEAR!</title><content type="html">I hope that not many will see this message at exactly the time I scheduled it.&lt;br /&gt;In any case&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;HAPPY NEW 2012 TO ALL OF YOU&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Hoping it will be better than 2011.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-1933135981881303205?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=qImttXtpKWI:G3odUeA9rW0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=qImttXtpKWI:G3odUeA9rW0:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=qImttXtpKWI:G3odUeA9rW0:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/qImttXtpKWI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/1933135981881303205/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/happy-new-year.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1933135981881303205" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1933135981881303205" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/qImttXtpKWI/happy-new-year.html" title="HAPPY NEW YEAR!" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/happy-new-year.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-3019015842512898550</id><published>2011-12-30T07:00:00.004+01:00</published><updated>2011-12-30T07:00:08.797+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adjacent sibling" /><category scheme="http://www.blogger.com/atom/ns#" term="selectors" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">CSS: adjacent sibling selectors</title><content type="html">Who knows what &lt;b&gt;adjacent sibling selectors&lt;/b&gt; are? Hmmm... it looks like not many of us are aware of their existence... It is quite true that considering all possible &lt;b&gt;CSS selectors&lt;/b&gt;, adjacent sibling selectors are the most unknown and rarely used even by expert web developers. Why? Don't know... Nevertheless they are quite useful and efficient in applying CSS rules to specific elements.&lt;br /&gt;&lt;br /&gt;I will show you an example and we will explore adjacent sibling selectors use.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;What are adjacent sibling selectors?&lt;/b&gt;&lt;/div&gt;We can define adjacent sibling selectors as stated by the W3C site:&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"Adjacent sibling selectors have the following syntax: E1 + E2,where E2 is the subject of the selector. The selector matches if E1and E2 share the same parent in the document tree and E1 immediatelyprecedes E2,ignoring non-element nodes (such as text nodes and comments)." (quote from &lt;a href="http://www.w3.org/TR/CSS2/selector.html#adjacent-selectors" target="_blank"&gt;W3C&lt;/a&gt;)&lt;/blockquote&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;It is quite simple to understand how such selectors can became handy.&lt;br /&gt;A possible use is related to image captions. Let's say we use images all over our page and, at the same time, we have different div elements which contain image caption or other text. If we want to apply a CSS rule just to image captions, we can benefit from the adjacent sibling selector, because we will style only &amp;lt;div&amp;gt; tags that are preceded by &amp;lt;img&amp;gt; tags. Something like:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;img + div {&lt;br /&gt;&amp;nbsp;&amp;nbsp; color: #FF0000;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;With the above rule, all the image captions will have a red text.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;A live example&lt;/b&gt;&lt;/div&gt;We are going to style specific adjacent tags. We are going to have two headings (note: I am using &amp;lt;h5&amp;gt; heading tags because of the blogger platform; if I use &amp;lt;h1&amp;gt; all the page will be with red text!). The first is followed by a span element, while the second is followed by a div element. We want to make the text inside the div in red.&lt;br /&gt;&lt;style type="text/css"&gt;h5+div {color: #FF0000;}&lt;/style&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h5&gt;First heading&lt;/h5&gt;This is a span&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;Second heading&lt;/h5&gt;&lt;div&gt;This is a div&lt;/div&gt;&lt;/blockquote&gt;Let's see the code behind that.&lt;br /&gt;First of all the CSS rule:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;style type="text/css"&amp;gt;&lt;br /&gt;h5+div {&lt;br /&gt;&amp;nbsp; color: #FF0000;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;And then the HTML:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;h5&amp;gt;First heading&amp;lt;/h5&amp;gt;&lt;br /&gt;&amp;lt;span&amp;gt;This is a span&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;h5&amp;gt;Second heading&amp;lt;/h5&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;This is a div&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;Very simple isn't it?&lt;br /&gt;&lt;br /&gt;Now tell me you did know about it.&lt;br /&gt;Share your experience, please, using the comments section below.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-3019015842512898550?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=j2qjn047DI4:wawQH6fEH6w:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=j2qjn047DI4:wawQH6fEH6w:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=j2qjn047DI4:wawQH6fEH6w:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/j2qjn047DI4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/3019015842512898550/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/css-adjacent-sibling-selectors.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/3019015842512898550" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/3019015842512898550" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/j2qjn047DI4/css-adjacent-sibling-selectors.html" title="CSS: adjacent sibling selectors" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/css-adjacent-sibling-selectors.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-6026320134513785875</id><published>2011-12-28T07:00:00.004+01:00</published><updated>2011-12-28T07:00:01.864+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="unique identifier" /><category scheme="http://www.blogger.com/atom/ns#" term="VBScript" /><category scheme="http://www.blogger.com/atom/ns#" term="GUID" /><category scheme="http://www.blogger.com/atom/ns#" term="captha" /><category scheme="http://www.blogger.com/atom/ns#" term="replace" /><category scheme="http://www.blogger.com/atom/ns#" term="left" /><category scheme="http://www.blogger.com/atom/ns#" term="asp" /><title type="text">ASP: simple CAPTCHA method</title><content type="html">I'm sure you know what &lt;b&gt;CAPTCHA&lt;/b&gt;s are. They usually are not very welcomed when filling in a form, but the idea behind them is to at least reduce the possibility of automatic non-human procedures submitting the form itself. The main point is to recognise if who or what is submitting a request is really a human or not.&lt;br /&gt;&lt;br /&gt;The solution I'm presenting here is very simple and it is not unbreakable. Infact, today we surely need a highly sophisticated CAPTCHA procedure in order to be completely sure of its effectiveness.&lt;br /&gt;On the other hand, we can use the solution here presented whenever we need a little bit more security.&lt;br /&gt;We are going to use &lt;b&gt;ASP&lt;/b&gt; and &lt;b&gt;GUID&lt;/b&gt;s (Globally Unique Identifier).&lt;br /&gt;&lt;br /&gt;Follow me, please.&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;GUIDs&lt;/b&gt;&lt;/div&gt;A GUID is a 16-byte string which is unique. We have seen how to &lt;a href="http://thewebthought.blogspot.com/2011/06/sql-server-use-newid-function-to-create.html" target="_blank"&gt;create unique identifiers&lt;/a&gt; with SQL, and today we are basically doing the same without SQL.&lt;br /&gt;GUIDs are very useful and they can be used in various situations. For instance, we can&amp;nbsp; use them in order to create temporary folders on the server. Or maybe, when suggesting strong passwords in a registration form.&lt;br /&gt;In our example we are going to use GUID in order to create an 8 characters long string to be used in a CAPTCHA system.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The ASP part&lt;/b&gt;&lt;/div&gt;The asp part of the example is quite simple:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;Dim GUID&lt;br /&gt;GUID = Server.CreateObject("Scriptlet.Typelib").GUID&lt;br /&gt;GUID = Replace(GUID, "{", "")&lt;br /&gt;GUID = Left(GUID, 8)&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;We basically create a GUID using the Scriptlet.Typelib object.&lt;br /&gt;We then remove the { at the beginning of the resulting string.&lt;br /&gt;Finally we consider only the first 8 characters (we can obviously decide to use longer or shorter CAPTCHAs... it's up to you).&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The HTML&lt;/b&gt;&lt;/div&gt;In the form, we now need to show the CAPTCHA. In order to protect it a bit, we are going to show the GUID inside an input box which will be protected and disabled. That will prevent the possibility of selecting the text inside the input box.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;input name="guid" type="text" disabled id="guid" value="&amp;lt;%=GUID%&amp;gt;" size="8" maxlength="8" readonly="true"&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Further considerations&lt;/b&gt;&lt;/div&gt;It is clear that the above method can't be considered completely secure. It is no coincidence if advance CAPTCHA systems use images and not text. That is because, for example, text is easily readable from the code view of the page. Sophisticated (or not so much sophisticated) automated software can easily bypass such CAPTCHA systems, as you may understand.&lt;br /&gt;So, please, consider the above as a very simple implementation of CAPTCHAs, and not a completely secure one.&lt;br /&gt;&lt;br /&gt;If you've found other and possibly more secure CAPTCHA systems, please share your ideas using the comments section below.&lt;br /&gt;In the meantime, have a splendid day.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-6026320134513785875?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=CESx0ltqql0:dA1VQE2bfG8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=CESx0ltqql0:dA1VQE2bfG8:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=CESx0ltqql0:dA1VQE2bfG8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/CESx0ltqql0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/6026320134513785875/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/asp-simple-captcha-method.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/6026320134513785875" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/6026320134513785875" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/CESx0ltqql0/asp-simple-captcha-method.html" title="ASP: simple CAPTCHA method" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/asp-simple-captcha-method.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-2629097083119126012</id><published>2011-12-26T07:00:00.002+01:00</published><updated>2011-12-26T07:00:06.491+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="the web thought" /><category scheme="http://www.blogger.com/atom/ns#" term="offtopic" /><title type="text">Are you working today?</title><content type="html">Christmas day is always a great day to me: finally the period before it, is finished. I always had problems in finding the right present for friends and family. Now everything's gone and I'm out of the office... I can relax and spend some time with my two children and my wife...&lt;br /&gt;&lt;br /&gt;I hope you too had a great time. And I hope your holidays will be fantastic...&lt;br /&gt;&lt;br /&gt;Regular posting will resume on the 28th. In the meantime... just enjoy your family and friends!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-2629097083119126012?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=C-J0sIQ68zI:9bMEV46K-7k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=C-J0sIQ68zI:9bMEV46K-7k:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=C-J0sIQ68zI:9bMEV46K-7k:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/C-J0sIQ68zI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/2629097083119126012/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/are-you-working-today.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/2629097083119126012" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/2629097083119126012" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/C-J0sIQ68zI/are-you-working-today.html" title="Are you working today?" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/are-you-working-today.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4150645089244189465</id><published>2011-12-25T00:00:00.000+01:00</published><updated>2011-12-25T00:00:00.492+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="the web thought" /><category scheme="http://www.blogger.com/atom/ns#" term="offtopic" /><title type="text">Merry Christmas</title><content type="html">&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;MERRY CHRISTMAS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;from&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-EHVXdx2Jwqc/Ts3tMKV1nRI/AAAAAAAAAMc/LKEgcKqNqtY/s1600/twtc.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="92" src="http://2.bp.blogspot.com/-EHVXdx2Jwqc/Ts3tMKV1nRI/AAAAAAAAAMc/LKEgcKqNqtY/s400/twtc.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-4150645089244189465?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=iPayi_BvE1Y:opUTA6thIgM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=iPayi_BvE1Y:opUTA6thIgM:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=iPayi_BvE1Y:opUTA6thIgM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/iPayi_BvE1Y" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/4150645089244189465/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/merry-christmas.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4150645089244189465" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4150645089244189465" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/iPayi_BvE1Y/merry-christmas.html" title="Merry Christmas" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-EHVXdx2Jwqc/Ts3tMKV1nRI/AAAAAAAAAMc/LKEgcKqNqtY/s72-c/twtc.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/merry-christmas.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-5845688412526385013</id><published>2011-12-23T07:00:00.002+01:00</published><updated>2011-12-23T07:00:10.650+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="web design" /><category scheme="http://www.blogger.com/atom/ns#" term="mistakes" /><title type="text">Web Design: mistakes in big companies websites</title><content type="html">Christmas is near, and I know that we all need to rest a bit, without thinking about coding and programming.&lt;br /&gt;That is why, today, I publish a post which might raise our spirits: I'll show you small or big mistakes made by web developers in big companies websites.&lt;br /&gt;That will be fun! &lt;br /&gt;I browsed a lot of websites on November the 25th 2011... all done in one morning. I screen-captured the mistakes while using Firefox 8.0 with a 1280x1024 screen resolution.&lt;br /&gt;&lt;br /&gt;I will show you glitches in the following websites (strictly in alphabetical order):&lt;br /&gt;&lt;ol&gt;&lt;li&gt;cnn&lt;/li&gt;&lt;li&gt;coca-cola&lt;/li&gt;&lt;li&gt;eBay (Italy)&lt;/li&gt;&lt;li&gt;flickr&lt;/li&gt;&lt;li&gt;google (reader page)&lt;/li&gt;&lt;li&gt;hp&lt;/li&gt;&lt;li&gt;kaspersky&lt;/li&gt;&lt;li&gt;nintendo&lt;/li&gt;&lt;li&gt;philips&lt;/li&gt;&lt;li&gt;twitter&lt;/li&gt;&lt;/ol&gt;Ready? Enjoy yourself... with a bit of pride, because we know we do not make such mistakes!&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;CNN&lt;/b&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-pQATJrnxqCw/Ts-Ct3sErgI/AAAAAAAAAMw/TaxoLzSmd-g/s1600/cnn.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-pQATJrnxqCw/Ts-Ct3sErgI/AAAAAAAAAMw/TaxoLzSmd-g/s1600/cnn.jpg" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;http://edition.cnn.com/&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;The above is a part of the TV box on CNN homepage. Where is the text flowing?&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Coca-Cola&lt;/b&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Pco6KrNYRuQ/Ts-DHaipsgI/AAAAAAAAAM4/85EhqPz9KYE/s1600/cocacola.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="104" src="http://3.bp.blogspot.com/-Pco6KrNYRuQ/Ts-DHaipsgI/AAAAAAAAAM4/85EhqPz9KYE/s640/cocacola.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;http://www.coca-cola.com/index.jsp&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Look at the menu in Coca-Cola homepage... where is "Us" in "Contact Us" going?&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;eBay&lt;/b&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-jManyNgYDm8/Ts-Dedx0s3I/AAAAAAAAANA/EEB7N1VlyGo/s1600/eBay.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="131" src="http://3.bp.blogspot.com/-jManyNgYDm8/Ts-Dedx0s3I/AAAAAAAAANA/EEB7N1VlyGo/s320/eBay.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;http://www.ebay.it/&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;This is a bit specific: in eBay Italy homepage, at the bottom, on the left, the Italian flag is going where it shouldn't.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Flickr&lt;/b&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-1YOxgDkzC60/Ts-D-ZeipNI/AAAAAAAAANI/fMOZDSdyBBw/s1600/flickr.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="195" src="http://1.bp.blogspot.com/-1YOxgDkzC60/Ts-D-ZeipNI/AAAAAAAAANI/fMOZDSdyBBw/s320/flickr.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;http://www.flickr.com/&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;What are those two poor icons (Twitter and Facebook) doing there? They are not on the right, but they are not on the left as well... just there in middle of nowhere...&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Google Reader&lt;/b&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-OywiO-AAw2g/Ts-EZ_GPMCI/AAAAAAAAANQ/ksNqtGhkXYg/s1600/google-reader.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-OywiO-AAw2g/Ts-EZ_GPMCI/AAAAAAAAANQ/ksNqtGhkXYg/s1600/google-reader.jpg" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;http://www.google.it/reader&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;On the main toolbar of the Google Reader page there are some buttons. Look at the two shown in the picture: can you spot the difference? I bet you do - and it's not the text! It might even be that it was meant like that. One thing for sure: it doesn't look right.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Hp&lt;/b&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-26Pl-uldZsg/Ts-EzXpdxpI/AAAAAAAAANY/ypoWlo98X2o/s1600/hp.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="78" src="http://4.bp.blogspot.com/-26Pl-uldZsg/Ts-EzXpdxpI/AAAAAAAAANY/ypoWlo98X2o/s640/hp.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;http://www.shopping.hp.com/webapp/shopping/store_access.do?template_type=landing&amp;amp;landing=notebooks&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;This is the main toolbar, at the top of Hp notebooks page. This is very small and maybe we could forgive who haven't spotted it. Take a close look at the "in" in "Sign in"... why is it going on a new line? We have plenty of space on the right, don't we?&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Kaspersky&lt;/b&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-EaPkBcRWezw/Ts-Fh_y61MI/AAAAAAAAANg/eNBAFYrisjM/s1600/kaspersky.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="49" src="http://4.bp.blogspot.com/-EaPkBcRWezw/Ts-Fh_y61MI/AAAAAAAAANg/eNBAFYrisjM/s640/kaspersky.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;http://www.kaspersky.com/&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;What about the menu on the right hand side. Believe me, it could have been on one line...&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Nintendo&lt;/b&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-cORnaauFo4w/Ts-Gs0qLXOI/AAAAAAAAANw/etVsiChZ4nI/s1600/nintendo.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-cORnaauFo4w/Ts-Gs0qLXOI/AAAAAAAAANw/etVsiChZ4nI/s1600/nintendo.jpg" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;http://www.nintendo.com/games/&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;Why the new Tintin game has such a long name? Couldn't they choose a shorter title?&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Philips&lt;/b&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-TK916aZ-skc/Ts-G-Im8wpI/AAAAAAAAAN4/EyE8FcCyXrU/s1600/philips.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="136" src="http://3.bp.blogspot.com/-TK916aZ-skc/Ts-G-Im8wpI/AAAAAAAAAN4/EyE8FcCyXrU/s320/philips.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;http://www.philips.co.uk/c/televisions/33092/cat/#/overview&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Can you read what Philips wants us to know about their TV set?&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Twitter&lt;/b&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-8LqFHOIoWRM/Ts-HjqTpXoI/AAAAAAAAAOA/nsNTd-0lTRQ/s1600/twitter.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="56" src="http://3.bp.blogspot.com/-8LqFHOIoWRM/Ts-HjqTpXoI/AAAAAAAAAOA/nsNTd-0lTRQ/s640/twitter.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;http://twitter.com/&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Twitter has too many language options! They can't stay on one line, but surely could be styled better!&lt;br /&gt;&lt;br /&gt;Ok, folks, I hope you enjoyed the post and I hope you had the possibility of boosting your web developer ego a bit.&lt;br /&gt;Have a nice day!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-5845688412526385013?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=7pu7ihNiwQs:SPCn9_NBwjI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=7pu7ihNiwQs:SPCn9_NBwjI:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=7pu7ihNiwQs:SPCn9_NBwjI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/7pu7ihNiwQs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/5845688412526385013/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/web-design-mistakes-in-big-companies.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/5845688412526385013" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/5845688412526385013" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/7pu7ihNiwQs/web-design-mistakes-in-big-companies.html" title="Web Design: mistakes in big companies websites" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-pQATJrnxqCw/Ts-Ct3sErgI/AAAAAAAAAMw/TaxoLzSmd-g/s72-c/cnn.jpg" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/web-design-mistakes-in-big-companies.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-3275959567926043859</id><published>2011-12-21T07:00:00.004+01:00</published><updated>2011-12-21T07:00:11.252+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="at-import" /><category scheme="http://www.blogger.com/atom/ns#" term="media queries" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">CSS: @import at-rule</title><content type="html">Following my previous post about &lt;a href="http://thewebthought.blogspot.com/2011/12/web-development-what-i-think-about.html" target="_blank"&gt;progressive enhancement&lt;/a&gt;, today I would like to discuss the &lt;b&gt;CSS @import at-rule&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;The @import at-rule allows us to link external style rules. Basically, using it we can import rules from other stylesheets. The rule must be the first rule of a stylesheet (apart from the @charset at-rule). The @import rule can contain media queries (comma separated) in order to import specific media rules.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The syntax&lt;/b&gt;&lt;/div&gt;As I said before, the rule have to be placed at the beginning of a stylesheet. Its syntax is:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;@import url comma-separated-media-queries;&lt;/code&gt;&lt;/blockquote&gt;where:&lt;br /&gt;&lt;i&gt;url &lt;/i&gt;= the path of the stylesheet we want to import;&lt;br /&gt;&lt;i&gt;comma-separated-media-queries&lt;/i&gt; = the list of media to which the imported rules will be applied (screen, print, mobile etc). If the target browser doesn't support the related media, the rules won't be applied at all.&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Examples&lt;/b&gt;&lt;/div&gt;Examples of @import at-rule are:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;@import 'layout.css';&lt;br /&gt;@import url ('layout.css');&lt;br /&gt;@import url ("layout.css");&lt;br /&gt;@import url ('layout.css') print, mobile;&lt;/code&gt;&lt;/blockquote&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Link&lt;/b&gt;&lt;/div&gt;If we do not want to use the @import at-rule, we usually link the external stylesheet with the following code, placed in the head of the document:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;link href="layout.css" type="text/css"&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The above is the same as:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;style type="text/css"&amp;gt;&lt;br /&gt;&amp;nbsp; @import url("layout.css");&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;So, basically the two ways of linking an external stylesheet are the same.&amp;nbsp; Even media queries will work the same way. Using the link, we need to use something like:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;link href="layout.css" type"text/css" media="print"&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;While with @import, we use:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;style type="text/css"&amp;gt;&lt;br /&gt;&amp;nbsp; @import url("layout.css") print;&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The two methods are completely interchangeable, as you can see. So which one should we use?&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;So what?&lt;/b&gt;&lt;/div&gt;Well, it depends. Considering that the two methods are identical, I believe I can say that it's up to you. The only thing that seems to impact on the user experience, considering the two methods, is how style rules are applied. Infact it seems that rules are loaded following a different pattern with @import, and CSS rules are applied sometimes even after the page is already loaded and displayed.&lt;br /&gt;Many consider the two methods together: a link is used on the page to import a generic stylesheet which contains specific @import at-rules. For those using this solution, it gives them more flexibility in adding new specific stylesheet, without having to revise all the web site pages.&lt;br /&gt;On the compatibility side, we shouldn't worry because all recent browsers understand the @import at-rule (including IE6 and IE7). &lt;br /&gt;&lt;br /&gt;What do you use? @import or link? Share your experience, please.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-3275959567926043859?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=_nZrqaWgYSk:CihC3Rc_DGM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=_nZrqaWgYSk:CihC3Rc_DGM:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=_nZrqaWgYSk:CihC3Rc_DGM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/_nZrqaWgYSk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/3275959567926043859/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/css-import-at-rule.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/3275959567926043859" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/3275959567926043859" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/_nZrqaWgYSk/css-import-at-rule.html" title="CSS: @import at-rule" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/css-import-at-rule.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-9177348013512916950</id><published>2011-12-19T07:00:00.001+01:00</published><updated>2011-12-19T07:00:07.293+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="progressive enhancement" /><category scheme="http://www.blogger.com/atom/ns#" term="graceful degradation" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">Web Development: what I think about progressive enhancement</title><content type="html">Since the beginning of web development, programmers have had the duty to guarantee a correct and possibly full user experience to all the web site visitors, regardless the browser that they use.&lt;br /&gt;If we stop for a second and think about the above statement, we can probably understand how that is a very big problem. Allow me a strange similarity: it is as if we need to design a new shoe that fits all sizes. It surely can be done. It involves a lot of work and it won't probably satisfy all the users.&lt;br /&gt;&lt;br /&gt;&lt;b style="color: #6fa8dc;"&gt;Two methods to solve the problem &lt;/b&gt;&lt;br /&gt;Web developers normally use two different approaches in order to face the issue: the first and older one is &lt;b&gt;graceful degradation&lt;/b&gt;. A bit newer method is called &lt;b&gt;progressive enhancement&lt;/b&gt;.&lt;br /&gt;The two methods are easily confused, but they have a big difference: graceful degradation focuses on browsers capability, while progressive enhancement focuses on content.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;There are many documents discussing the two developing methods (and most notably &lt;a href="http://www.alistapart.com/articles/understandingprogressiveenhancement/" target="_blank"&gt;Understanding Progressive Enhancement&lt;/a&gt; by Aaron Gustafson) and I don't think I will explain all the concepts here. However I need to bring your attention on one thing. In progressive enhancement, it is quite common the use of multiple stylesheets, giving them a strict structure.&lt;br /&gt;&lt;br /&gt;&lt;b style="color: #6fa8dc;"&gt;Progressive enhancement and CSS &lt;/b&gt;&lt;br /&gt;As an example (taken from the aforementioned article), imagine we have one homepage, named &lt;i&gt;page.html&lt;/i&gt;. That page has three related stylesheets: &lt;i&gt;typography.css&lt;/i&gt;, &lt;i&gt;layout.css&lt;/i&gt; and &lt;i&gt;color.css&lt;/i&gt;. That is already an idea: according to the progressive enhancement theory, dividing CSS rules in different stylesheets according to their purposes, simplifies the web developer work (CSS rules creation and especially maintenance).&lt;br /&gt;A second level or group of stylesheets will be linked only to the &lt;i&gt;layout.css&lt;/i&gt; stylesheet: &lt;i&gt;screen.css&lt;/i&gt;, &lt;i&gt;print.css&lt;/i&gt; and &lt;i&gt;mobile.css&lt;/i&gt;. Those three new stylesheets will guarantee a correct web site display for different media (screen, print and mobile).&lt;br /&gt;The above structure could be all we need, but in many cases it could be not enough. Thus our stylesheets structure and the relationship between them can became more complex and difficult to maintain.&lt;br /&gt;&lt;br /&gt;&lt;b style="color: #6fa8dc;"&gt;What I think&lt;/b&gt; &lt;br /&gt;I can't say I'm a full supporter of the progressive enhancement method. And that because complex websites will easily have a very complex stylesheet structure. And since progressive enhancement should make things easier for us, I believe we will easily loose that advantage when trying to elaborate the stylesheets structure.&lt;br /&gt;It is clear that there's more behind the progressive enhancement method. But basically the more I read about it, the more I become skeptical about its usefulness. &lt;br /&gt;As an example, consider, for a moment, the above stylesheet structure and let's say we need to change a color rule. It could be that we end up opening and modifying more than one CSS file. In more complex situations, it could lead us to revise five or six files, while without the mentioned stylesheets structure, we might need to change one or two files.&lt;br /&gt;Applying the progressive enhancement theory to media makes more sense to me. Especially today, when we need to satisfy handheld devices users (tablets and smartphones). But again, it seems to me that a strict planning of the CSS structure is needed before starting to develop the web site. During the preliminary work, it is advisable to consider:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; if such a structure is needed,&amp;nbsp;&lt;/li&gt;&lt;li&gt;if it is useful and it gives us advantages,&amp;nbsp;&lt;/li&gt;&lt;li&gt;and what are the eventual drawbacks.&lt;/li&gt;&lt;/ul&gt;We probably conclude that progressive enhancement doesn't give us enough advantages compared to the overwork needed to implement it.&lt;br /&gt;&lt;br /&gt;I would really like to know your idea on the topic, so please leave a comment.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-9177348013512916950?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=sI8InooGOVQ:_8ukcQuUqxo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=sI8InooGOVQ:_8ukcQuUqxo:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=sI8InooGOVQ:_8ukcQuUqxo:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/sI8InooGOVQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/9177348013512916950/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/web-development-what-i-think-about.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/9177348013512916950" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/9177348013512916950" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/sI8InooGOVQ/web-development-what-i-think-about.html" title="Web Development: what I think about progressive enhancement" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/web-development-what-i-think-about.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-425220257225677478</id><published>2011-12-16T07:00:00.017+01:00</published><updated>2011-12-16T07:00:08.092+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VBScript" /><category scheme="http://www.blogger.com/atom/ns#" term="execute" /><category scheme="http://www.blogger.com/atom/ns#" term="sql query" /><category scheme="http://www.blogger.com/atom/ns#" term="functions" /><category scheme="http://www.blogger.com/atom/ns#" term="asp" /><title type="text">ASP: how to create a reusable function to query databases</title><content type="html">Today we are going to create something probably out of the ordinary. We will create two reusable &lt;b&gt;functions&lt;/b&gt; (with parameters) in order to &lt;b&gt;query &lt;/b&gt;a database.&lt;br /&gt;The first function will open a recordset and execute a query. It will accept 3 parameters: recordset name, connection and query string.&lt;br /&gt;The second function will close the recordset. It will accept 1 parameter: recordset name.&lt;br /&gt;&lt;br /&gt;In order to use the parametrised functions, we will benefit from the &lt;b&gt;Execute()&lt;/b&gt; &lt;b&gt;VBScript &lt;/b&gt;function.&lt;br /&gt;So, before building the two functions, let's try to understand Execute().&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;b style="color: #6fa8dc;"&gt;Execute()&lt;/b&gt;&lt;br /&gt;The Execute() function can execute anything that is passed as parameter. It is more complicate to explain than to see it in action. Let's see an example:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;Dim StringVar&lt;br /&gt;StringVar = "response.write 1"&lt;br /&gt;Execute(StringVar)&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The output of the above is 1. The Execute() function is actually executing our &lt;i&gt;response.write&lt;/i&gt;.&lt;br /&gt;As a side note, consider that Execute() works like Eval()... but that's another story.&lt;br /&gt;However, in order to have parameters for our two recordset functions, we are going to use Execute().&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Connex&lt;/b&gt;&lt;/div&gt;We are now building the &lt;i&gt;connex &lt;/i&gt;function, which will open a recordset and perform a query. I want to explain it step by step so that everything is clear.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;function connex(rsn, conn, query)&lt;/code&gt;&lt;/blockquote&gt;The function will accept three parameters, as said:&lt;br /&gt;1) &lt;i&gt;rsn &lt;/i&gt;= the recordset name;&lt;br /&gt;2) &lt;i&gt;conn &lt;/i&gt;= the connection string;&lt;br /&gt;3) &lt;i&gt;query &lt;/i&gt;= the query string.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;Dim openRS&lt;br /&gt;openRS = "openRS" &amp;amp; rsn&lt;/code&gt;&lt;/blockquote&gt;We set a variable called openRS which will be our recordset name.&lt;br /&gt;If we pass rsn as "Test", openRS will be "openRSTest" which will be a unique recordset name.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;execute "Set " &amp;amp; openRS &amp;amp; " = Server.CreateObject(""ADODB.Recordset"")"&lt;/code&gt;&lt;/blockquote&gt;We use the Execute() function in order to create the server object (our recordset).&lt;br /&gt;Please note the use of double quotes.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;execute openRS &amp;amp; ".ActiveConnection = """ &amp;amp; conn &amp;amp; """"&lt;/code&gt;&lt;/blockquote&gt;Here we set the active connection.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;execute openRS &amp;amp; ".Source = """ &amp;amp; query &amp;amp; """"&lt;/code&gt;&lt;/blockquote&gt;That is our query.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;execute openRS &amp;amp; ".CursorType = 0"&lt;br /&gt;execute openRS &amp;amp; ".CursorLocation = 2"&lt;br /&gt;execute openRS &amp;amp; ".LockType = 1"&lt;br /&gt;execute openRS &amp;amp; ".Open()"&lt;br /&gt;execute openRS &amp;amp; "_numRows = 0"&lt;/code&gt;&lt;/blockquote&gt;Finally we set the cursor type, the location, lock type and we open the recordset. And then we set the number of rows to 0, because we might need to paginate results.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;end function&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The above is the function end.&lt;br /&gt;The complete function will look like:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;function connex(rsn, conn, query)&lt;br /&gt;&amp;nbsp;&amp;nbsp;Dim openRS&lt;br /&gt;&amp;nbsp;&amp;nbsp;openRS = "openRS" &amp;amp; rsn&lt;br /&gt;&amp;nbsp;&amp;nbsp;execute "Set " &amp;amp; openRS &amp;amp; " = Server.CreateObject(""ADODB.Recordset"")"&lt;br /&gt;&amp;nbsp;&amp;nbsp;execute openRS &amp;amp; ".ActiveConnection = """ &amp;amp; conn &amp;amp; """"&lt;br /&gt;&amp;nbsp;&amp;nbsp;execute openRS &amp;amp; ".CursorType = 0"&lt;br /&gt;&amp;nbsp;&amp;nbsp;execute openRS &amp;amp; ".CursorLocation = 2"&lt;br /&gt;&amp;nbsp;&amp;nbsp;execute openRS &amp;amp; ".LockType = 1"&lt;br /&gt;&amp;nbsp;&amp;nbsp;execute openRS &amp;amp; ".Open()"&lt;br /&gt;&amp;nbsp;&amp;nbsp;execute openRS &amp;amp; "_numRows = 0"&lt;br /&gt;end function&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Connclose&lt;/b&gt;&lt;/div&gt;The second function (&lt;i&gt;connclose&lt;/i&gt;) is used to close the recordset. Again I will explain it step by step.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;function conclose(rsnc)&lt;/code&gt;&lt;/blockquote&gt;The function accepts one parameter: rsnc which is the name of the recordset to be closed.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;Dim closeRS&lt;br /&gt;closeRS = "openRS" &amp;amp; rsnc&lt;/code&gt;&lt;/blockquote&gt;In the above section we are going to build the closeRS variable which will be identical to the openRS variable seen in the &lt;i&gt;connex &lt;/i&gt;function. We need to be sure to close the same recordset we opened before.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;execute closeRS &amp;amp;".Close()"&lt;br /&gt;execute closeRS &amp;amp;".ActiveConnection.close()"&lt;br /&gt;execute "Set " &amp;amp; closeRS &amp;amp;".ActiveConnection = Nothing"&lt;br /&gt;execute "Set " &amp;amp; closeRS &amp;amp;"= Nothing"&lt;/code&gt;&lt;/blockquote&gt;With the above code we close the recordset and the active connection, then we set the active connection and the recordset to nothing. Job done!&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;end function&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;And that is the end of our function.&lt;br /&gt;The complete code:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;function conclose(rsnc)&lt;br /&gt;&amp;nbsp; Dim closeRS&lt;br /&gt;&amp;nbsp; closeRS = "openRS" &amp;amp; rsnc&lt;br /&gt;&amp;nbsp; execute closeRS &amp;amp;".Close()"&lt;br /&gt;&amp;nbsp; execute closeRS &amp;amp;".ActiveConnection.close()"&lt;br /&gt;&amp;nbsp; execute "Set " &amp;amp; closeRS &amp;amp;".ActiveConnection = Nothing"&lt;br /&gt;&amp;nbsp; execute "Set " &amp;amp; closeRS &amp;amp;"= Nothing"&lt;br /&gt;end function&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;How to use the functions&lt;/b&gt;&lt;/div&gt;The best way to implement the whole experiment is to use an inclusion. We put all the above code in an ASP page and call it connex.asp. Place the file where you prefer - in our example we will place it in a folder named "connections".&lt;br /&gt;In the page where we want to use the functions, in the head of the document, we include the connex.asp file:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;!--#include virtual="/Connections/connex.asp" --&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;At the beginning of the page, we set some variables:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;Dim rsn&lt;br /&gt;Dim conn&lt;br /&gt;Dim query&lt;br /&gt;Dim rsnc&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;Those are the functions parameters.&lt;br /&gt;Wherever we need to call the &lt;i&gt;connex&lt;/i&gt; function, we place the following snippet:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp;amp; Server.MapPath("/path-to/database.mdb") &lt;br /&gt;query = "SELECT *&amp;nbsp; FROM table"&lt;br /&gt;rsn = "table"&lt;br /&gt;call connex(rsn, conn, query)&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The above is just an example, as you can see.&lt;br /&gt;The result will be a recordset called "openRStable". So if we want to interact with the recordset, we need to use that name. For example when displaying results, we use:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;= openRStable.Fields.Item("TableField1").Value&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;When we need to close the connection, we use the &lt;i&gt;conclose &lt;/i&gt;function:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;rsnc = "table"&lt;br /&gt;call conclose(rsnc)&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;Easy, isn't it?&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Possible advantages&lt;/b&gt;&lt;/div&gt;With the use of parametrised functions, we do not need to write the same code more than once. If we create an asp file with the functions code, we can include it where we need it and call it when we need it.&lt;br /&gt;Because we pass parameters to the functions, we might decide to create global variables, so that we do not need to pass the connection string every time, for example. The same for the other variables.&lt;br /&gt;I think that the above exercise is quite a good starting point, but I'm sure it can be refined and improved. So, it's up to you!&lt;br /&gt;&lt;br /&gt;If you need more information on the functions or you want to share your experience, please use the comments section below.&lt;br /&gt;Happy coding.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-425220257225677478?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=M7pVcnFU9pc:rT_omptmk-k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=M7pVcnFU9pc:rT_omptmk-k:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=M7pVcnFU9pc:rT_omptmk-k:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/M7pVcnFU9pc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/425220257225677478/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/asp-how-to-create-reusable-function-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/425220257225677478" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/425220257225677478" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/M7pVcnFU9pc/asp-how-to-create-reusable-function-to.html" title="ASP: how to create a reusable function to query databases" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/asp-how-to-create-reusable-function-to.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-7452171551460399539</id><published>2011-12-14T07:00:00.007+01:00</published><updated>2011-12-14T07:00:06.958+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="collection" /><category scheme="http://www.blogger.com/atom/ns#" term="event" /><category scheme="http://www.blogger.com/atom/ns#" term="VBScript" /><category scheme="http://www.blogger.com/atom/ns#" term="object" /><category scheme="http://www.blogger.com/atom/ns#" term="IIS" /><category scheme="http://www.blogger.com/atom/ns#" term="property" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorial" /><category scheme="http://www.blogger.com/atom/ns#" term="method" /><category scheme="http://www.blogger.com/atom/ns#" term="asp" /><title type="text">ASP: a tutorial for beginners</title><content type="html">What is &lt;b&gt;ASP&lt;/b&gt;? Which is ASP basic &lt;b&gt;syntax&lt;/b&gt;? &lt;b&gt;Objects&lt;/b&gt;, &lt;b&gt;methods&lt;/b&gt;, &lt;b&gt;properties&lt;/b&gt;, &lt;b&gt;events &lt;/b&gt;and &lt;b&gt;collections&lt;/b&gt;?&lt;br /&gt;AH! Do we really know what we are talking about?&lt;br /&gt;&lt;br /&gt;The following post is just a quick reference guide for all those things. It is meant for beginners, but I believe that even experienced programmers might find it useful... just to check if everything we know is correct.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;What is ASP?&lt;/b&gt;&lt;/div&gt;ASP stands for &lt;i&gt;Active Server Page&lt;/i&gt;. In a previous &lt;a href="http://thewebthought.blogspot.com/2011/10/asp-why-am-i-still-using-it.html"&gt;post&lt;/a&gt; I've already defined it as a scripting engine. That is because we usually and wrongfully consider ASP as a programming language.&lt;br /&gt;We can use different programming languages in ASP pages, such as &lt;b&gt;VBScript &lt;/b&gt;or &lt;b&gt;JScript&lt;/b&gt;. Usually, web developers use VBScript, which is ASP default language.&lt;br /&gt;The ASP engine is managed by &lt;b&gt;IIS&lt;/b&gt; (Internet Information Services), working in a MS Windows environment. I know that it is possible to use ASP with other web server applications such as Apache.&lt;br /&gt;It is worth mentioning that ASP is working with PWS as well. PWS (Personal Web Server) is a small but fully functional version of IIS and it was available on older operating systems like WIN 95 and 98 (oh what a leap in the past!).&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Basic syntax&lt;/b&gt;&lt;/div&gt;The basic syntax of ASP commands is:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;...asp commands...&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;Inside the &amp;lt;% and %&amp;gt; we insert server scripts which are run on the server side. That is a great plus, because it is the server that is doing all the dirty jobs. If we try to see an ASP page code, all we will see is the HTML: the scripts will not be visible.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Objects, methods, properties, events, collections&lt;/b&gt;&lt;/div&gt;ASP commands use objects. Objects may have methods, properties, events and collections. Now this is getting complicated, isn't it? Let's try to understand it all.&lt;br /&gt;ASP objects are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Application;&lt;/li&gt;&lt;li&gt;Response;&lt;/li&gt;&lt;li&gt;ObjectContext;&lt;/li&gt;&lt;li&gt;Session;&lt;/li&gt;&lt;li&gt;ASPError;&lt;/li&gt;&lt;li&gt;Request;&lt;/li&gt;&lt;li&gt;Server.&lt;/li&gt;&lt;/ul&gt;Every object might use a method, have a property, might work on events or use a collection.&lt;br /&gt;I tried to summarise all the relation between objects and methods, properties, events or collections in the following table:&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div align="center"&gt;&lt;b&gt;Object&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div align="center"&gt;&lt;b&gt;Method&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div align="center"&gt;&lt;b&gt;Property&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div align="center"&gt;&lt;b&gt;Event&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div align="center"&gt;&lt;b&gt;Collection&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Application&lt;/td&gt;  &lt;td&gt;Contents.Remove&lt;br /&gt;Contents.removeAll&lt;br /&gt;Lock&lt;br /&gt;Unlock  &lt;/td&gt;  &lt;td&gt;&lt;/td&gt;  &lt;td&gt;OnEnd&lt;br /&gt;OnStart&lt;/td&gt;  &lt;td&gt;Contents&lt;br /&gt;StaticObjects&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Response&lt;/td&gt;  &lt;td&gt;AddHeader&lt;br /&gt;AppendToLog&lt;br /&gt;BinaryWrite&lt;br /&gt;Clear&lt;br /&gt;End&lt;br /&gt;Flush&lt;br /&gt;Redirect&lt;br /&gt;Write  &lt;/td&gt;  &lt;td&gt;Buffer&lt;br /&gt;CacheControl&lt;br /&gt;CharSet&lt;br /&gt;ContentType&lt;br /&gt;Expires&lt;br /&gt;ExpiresAbsolute&lt;br /&gt;IsClientConnected&lt;br /&gt;Status&lt;/td&gt;  &lt;td&gt;&lt;/td&gt;  &lt;td&gt;CodePage&lt;br /&gt;Cookies&lt;br /&gt;LCID&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;ObjectContext&lt;/td&gt;  &lt;td&gt;SetAbort&lt;br /&gt;SetComplete&lt;/td&gt;  &lt;td&gt;&lt;/td&gt;  &lt;td&gt;OnTransactionAbort&lt;br /&gt;OnTransactionCommit&lt;/td&gt;  &lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Session&lt;/td&gt;  &lt;td&gt;Abandon&lt;br /&gt;Contents.Remove&lt;br /&gt;Contents.removeAll&lt;/td&gt;  &lt;td&gt;CodePage&lt;br /&gt;LCID&lt;br /&gt;SessionID&lt;br /&gt;Timeout&lt;/td&gt;  &lt;td&gt;OnEnd&lt;br /&gt;OnStart&lt;/td&gt;  &lt;td&gt;Contents&lt;br /&gt;StaticObjects&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;ASPError&lt;/td&gt;  &lt;td&gt;&lt;/td&gt;  &lt;td&gt;ASPCode&lt;br /&gt;ASPDescription&lt;br /&gt;Category&lt;br /&gt;Column&lt;br /&gt;Description&lt;br /&gt;File&lt;br /&gt;Line&lt;br /&gt;Number&lt;br /&gt;Source&lt;/td&gt;  &lt;td&gt;&lt;/td&gt;  &lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Request&lt;/td&gt;  &lt;td&gt;BinaryRead&lt;/td&gt;  &lt;td&gt;TotalBytes&lt;/td&gt;  &lt;td&gt;&lt;/td&gt;  &lt;td&gt;ClientCertificate&lt;br /&gt;Cookies&lt;br /&gt;Form&lt;br /&gt;QueryString&lt;br /&gt;ServerVariables&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;Server&lt;/td&gt;  &lt;td&gt;CreateObject&lt;br /&gt;Execute&lt;br /&gt;GetLastError&lt;br /&gt;HTMLEncode&lt;br /&gt;MapPath&lt;br /&gt;Transefer&lt;br /&gt;URLEncode&lt;/td&gt;  &lt;td&gt;ScriptTimeout&lt;/td&gt;  &lt;td&gt;&lt;/td&gt;  &lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The above is just a part of the possible ASP commands. The Server.CreateObject command is a good example, because using it we can create other objects like the FileSystemObject which has properties and methods:&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div align="center"&gt;&lt;b&gt;Object&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div align="center"&gt;&lt;b&gt;Method&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div align="center"&gt;&lt;b&gt;Property&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;  &lt;td&gt;FileSystemObject&lt;/td&gt;  &lt;td&gt;BuildPath&lt;br /&gt;CopyFile&lt;br /&gt;CopyFolder&lt;br /&gt;CreateFolder&lt;br /&gt;CreateTextFile&lt;br /&gt;DeleteFile&lt;br /&gt;DeleteFolder&lt;br /&gt;DriveExists&lt;br /&gt;FileExists&lt;br /&gt;FolderExists&lt;br /&gt;GetAbsolutePathName&lt;br /&gt;GetBaseName&lt;br /&gt;GetDrive&lt;br /&gt;GetDriveName&lt;br /&gt;GetExtensionName&lt;br /&gt;GetFile&lt;br /&gt;GetFileName&lt;br /&gt;GetFolder&lt;br /&gt;GetParentFolderName&lt;br /&gt;GetSpecialFolder&lt;br /&gt;GetTempName&lt;br /&gt;MoveFile&lt;br /&gt;MoveFolder&lt;br /&gt;OpenTextFile&lt;/td&gt;  &lt;td&gt;Drives&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The &lt;i&gt;FileSystemObject &lt;/i&gt;has, for example a method called &lt;i&gt;CreateTextFile &lt;/i&gt;which has properties and methods. The same for the &lt;i&gt;GetDrive&lt;/i&gt;, or the &lt;i&gt;GetFile &lt;/i&gt;methods.&lt;br /&gt;&lt;br /&gt;The &lt;i&gt;Server.CreateObject&lt;/i&gt; can create ADO objects (with their properties, methods and collections) which we use to query databases. We use for example the &lt;i&gt;ADODB.Command&lt;/i&gt; in order to execute query against a database.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Simplify, please...&lt;/b&gt;&lt;/div&gt;Yes, I know. It seems there's no logic in it, but, believe me, there is. What we basically need to understand is that it is all related to objects which have properties, methods and collections. To simplify it a bit, we have ready-made objects, or we can "create" other objects. Ok, I already hear screams from experienced programmers. I know I'm trying to simplify the whole thing a little too much...&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Conclusions&lt;/b&gt;&lt;/div&gt;In order to understand ASP we can use different approaches. I believe that trying to squeeze all ASP concepts in a single post is almost impossibile. There are many books available that will guide a beginner step by step and that will explain everything about ASP. At the same time, we can browse many web sites that try to cover all the ASP related topics.&lt;br /&gt;So, the first possible approach is to look into those books or web sites.&lt;br /&gt;Another approach is to look for solutions when an issue arises. The usual path is something like: issue -&amp;gt; search solution -&amp;gt; find object, methods etc that will provide a solution -&amp;gt; understand in depth the specific solution (object, method etc) -&amp;gt; apply the solution.&lt;br /&gt;The second approach is the one that I've followed in the past. When we will get enough experience, we can try to organise mentally all the acquired knowledge. That's what I suggest.&lt;br /&gt;&lt;br /&gt;I hope that the above post will help you in starting to use ASP or in re-organising your thoughts about it. I would like you to share your ideas on the topic, so please use the comments section below.&lt;br /&gt;In the mean time, have a nice day and keep on reading.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-7452171551460399539?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=DOv8Ur_rQDg:1UCwVN_lpuQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=DOv8Ur_rQDg:1UCwVN_lpuQ:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=DOv8Ur_rQDg:1UCwVN_lpuQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/DOv8Ur_rQDg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/7452171551460399539/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/asp-tutorial-for-beginners.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7452171551460399539" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7452171551460399539" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/DOv8Ur_rQDg/asp-tutorial-for-beginners.html" title="ASP: a tutorial for beginners" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/asp-tutorial-for-beginners.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-2033074311293094717</id><published>2011-12-12T07:00:00.001+01:00</published><updated>2011-12-12T07:00:06.922+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="web design" /><category scheme="http://www.blogger.com/atom/ns#" term="re-design" /><category scheme="http://www.blogger.com/atom/ns#" term="topics" /><title type="text">Web Design: what to consider when re-designing a web site</title><content type="html">I've been recently asked to &lt;b&gt;re-design&lt;/b&gt; a web site. I had to meet some people and talk about it. The company wanted a completely new web site, while the engine behind (SQL database) should have stayed.&lt;br /&gt;As you may understand, that is a completely different situation compared to the development of a new web site. There are some things to be considered when approaching a totally new site that do not apply in a re-design. I'm talking about technical things like domain management, web site hosting and platform used; or marketing stuff like commercial targets, brand awareness program and other boring things.&lt;br /&gt;In our case the story is different: many of the above questions have been already asked and settled. For this reason, I have created a list of matters that needed to be discussed and that I think might be useful to all those developers in the same situation.&lt;br /&gt;&lt;br /&gt;So, here is my list of &lt;b&gt;practical things to consider&lt;/b&gt; (and ask) when &lt;b&gt;re-designing a web site&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;First of all, let me stress out that the following list hasn't got an order of importance, because a matter might have different significance and consequence according to which objective we want to achieve. I say "we", because I believe that the designer has to step into the decisions making process, even if the web site owner has a strong will and is a decision maker.&lt;br /&gt;At the same time, the following list is not to be considered complete. Different situations might require different topic to be explored.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Colour palette&lt;/b&gt;&lt;/div&gt;Because we need to re-design the web site, we need to know which colour palette we are going to use. The colours will have a deep impact on the overall web site design.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;General layout&lt;/b&gt;&lt;/div&gt;The web site structure is another big issue. Should we use a &lt;a href="http://thewebthought.blogspot.com/2011/05/web-design-fluid-fixed-or-mixed-layout.html"&gt;static, a fluid or a mixed layout&lt;/a&gt;? It's not a free choice and the chosen structure will determine not only the web site basic architecture, but the amount of coding work needed as well.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Border radius&lt;/b&gt;&lt;/div&gt;It seems trivial, but today it has its importance. Do we prefer rounded or sharp corners? This is probably an ongoing argument. Whatever we decide to use, it should be considered at the beginning, because for example, rounded corners will have a considerable effect on development time and cost. As a side note, here you should discuss box shadows as well. The discussion might lead to browser compatibility, but do not go astray, stick to the topic: we will discuss compatibility afterward.&lt;br /&gt;&lt;br /&gt;&lt;b style="color: #6fa8dc;"&gt;Sectioned layout or not&lt;/b&gt;&lt;br /&gt;The moment we decide the overall layout of the web site, we need to consider where we are going to insert content. It is difficult to pre-determine how we are going to display the content, but we should start to brainstorm on the way we are going to organize it. For example, we can propose a tabbed solution, or a columns layout, or, again, a not restrained layout. See what the other think about it and start imagining it as soon as you can.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Header and footer&lt;/b&gt;&lt;/div&gt;The issue comes directly from the previous point. We will probably focus more on footers than headers, however it is better to define what we need and start thinking about how to develop the chosen solution.&lt;br /&gt;&lt;br /&gt;&lt;b style="color: #6fa8dc;"&gt;Whitespace&lt;/b&gt;&lt;br /&gt;Whitespace might sound like a technical problem. The people we are talking to, probably will not understand what we are saying, however it is important to explain the whitespace concept to them. Why? A balanced whitespace encreases readability and improves the user experience. Considering that people tend to express some sort of "vacuum fear", we surely need to immediately stop them from filling every possibile blank space.&lt;br /&gt;That is because we need to explain the importance of whitespace.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Main menu elements&lt;/b&gt;&lt;/div&gt;Because the web site is already there, we can discuss menu elements. Should we keep them all or some elements are not necessary any more? Should we re-organise them?&lt;br /&gt;I think you got the point.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Menu elements order&lt;/b&gt;&lt;/div&gt;This is probably more a subsection of the above, however, we should consider re-ordering menu elements. The importance of one element might have been decreased in time and now we need to re-consider what was the first choice. Remember that elements should go from the most important to the less important.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Main menu style&lt;/b&gt;&lt;/div&gt;Again on menus! Yes, we need to decide how the menu will look like. Horizontal? Vertical? Structured? Circular? Well, here the choices are many. Discuss the menu style and its placement in your structure.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Icons&lt;/b&gt;&lt;/div&gt;Images are always important in a web site. Icons too. And we can use icons in menus as well. We should talk about the style of icons, how should they look like and (even if it seems trivial) how big or small they should be. In my experience, we end up trying to stop others from filling our homepage with icons (see "vacuum fear" again!).&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Languages&lt;/b&gt;&lt;/div&gt;Yes languages! We need to determine how many languages the web site will support. If originally, there was only one or two languages, the problem is not that big. However, we should consider how to deal with regional and language settings and changing. For example, we need to take into account how the user will be able to select a different language: from the main menu? Will there be a separate menu for that?&lt;br /&gt;Ok, you got the point, I believe.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Typography&lt;/b&gt;&lt;/div&gt;Now... this is big! Typography is a huge issue in web sites and web designers are well aware of that. When we talk to deciders, they probably do not understand what's behind font management. However, our main task is to minimize the number of proposed fonts and we should immediately try to eliminate non standard typography as much as we can. I know there are situations where we do need to use non stardard fonts, but keep in mind that it will make our work more complex and time consuming. Most of the times, with little benefit.&lt;br /&gt;Anyway, we should choose the right set of fonts, the style that we will apply to headings, text and so on. &lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Target devices&lt;/b&gt;&lt;/div&gt;Another big issue! We need to understand which are the target devices. They will probably answer: "All of them, including smartphones and tablets". Well, good luck! I think that a good explanation on the matter is needed. For example, it should be clear what a cross device compatibility means in term of time and cost. Because the old web site was surely not meant for new generation devices, we should explore the real need for a full compatibility. In this case a good web site statistics report can help us in determine if the site has visitors using such devices. If not, consider avoiding the - probably - unneeded overwork. Or, maybe, you really need to create such cross device compatibility, just because the company really wants to.&lt;br /&gt;In any case, we should discuss it, explain it and take a decision about it.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Required compatibility&lt;/b&gt;&lt;/div&gt;Again a big issue... and a technical one too. This will be difficult to explain, but we need to stress out the difficulties of a complete browser compatibility.&lt;br /&gt;First of all, remember that a web site won't look the same in any browser. We need to determine which browsers, which versions and which screen resolutions we will support. &lt;br /&gt;The company will probably ask for a full compatibility: it is your task to make them understand what that means in terms of cost and time. Believe me, this will be a very difficult task, however we should be clear on the issue from the beginning, because not considering compatibility will lead to complaints.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;RSS and social networks&lt;/b&gt;&lt;/div&gt;This topic is the new fashion, especially when talking about social networks. I believe you understand what I mean here. We need to decide if we need a connection to social networks or not. I am sure that in most of the cases we do need to create a bridge between the web site and places like Facebook, Twitter and so on.&lt;br /&gt;The work behind it could be huge, but we need to explore the issue at the beginning of our re-design plan.&lt;br /&gt;That could lead us to open a fan page on Facebook, or create a company account on Twitter, or not, however the issue should be fully explained to the company. I understand I could write a whole article on the matter, but it is not the topic of this post. However, keep it in mind: it is very important.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;/div&gt;The above topics are the ones I usually discuss with the company representatives.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Everyone will put ideas on the table.&amp;nbsp;&lt;/li&gt;&lt;li&gt;With someone we will talk easily, while someone will try to embarass us with - usually - stupid questions disguised as very geeky issues.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Stay calm and quietly explain your points.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Ask questions.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Provide strong answers.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Be prepare to stand for your ideas and to accept not-so-welcomed decisions.&lt;/li&gt;&lt;li&gt;Write down reports of meetings and distribute a copy of them to all participants. Ask them to provide insights, comments and questions.&lt;/li&gt;&lt;/ul&gt;It will be a fight, but you will win and a new shiny web site will born.&lt;br /&gt;&lt;br /&gt;Let me know your experience, as usual: I will deeply appreciate it.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-2033074311293094717?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=XD4XbGe-Eqo:eIPiqvxO6fM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=XD4XbGe-Eqo:eIPiqvxO6fM:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=XD4XbGe-Eqo:eIPiqvxO6fM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/XD4XbGe-Eqo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/2033074311293094717/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/web-design-what-to-consider-when-re.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/2033074311293094717" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/2033074311293094717" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/XD4XbGe-Eqo/web-design-what-to-consider-when-re.html" title="Web Design: what to consider when re-designing a web site" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/web-design-what-to-consider-when-re.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-2071871773470468065</id><published>2011-12-09T07:00:00.004+01:00</published><updated>2011-12-09T07:00:02.523+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="structure" /><category scheme="http://www.blogger.com/atom/ns#" term="terminology" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorial" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><category scheme="http://www.blogger.com/atom/ns#" term="syntax" /><title type="text">HTML: terms and syntax (a tutorial for beginners)</title><content type="html">At the end of October I published a post about &lt;a href="http://thewebthought.blogspot.com/2011/10/css-terms-and-syntax-tutorial-for.html"&gt;CSS terminology&lt;/a&gt; which explained the basic usage of Cascading Style Sheets and technical terms used to identify and explain code parts. &lt;br /&gt;Today we are going to do the same for &lt;b&gt;HTML&lt;/b&gt;, because I feel that sometimes terms are not properly used, and we surely need to make things clear.&lt;br /&gt;The following will be a short and undoubtedly not complete journey through the basic HTML programming. If you are a little bit experienced, you might find it boring... however, are we fully sure we use the correct &lt;b&gt;terminology&lt;/b&gt;?&lt;br /&gt;&lt;br /&gt;Follow me and see for yourself.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;b style="color: #6fa8dc;"&gt;HTML&lt;/b&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-wWXyAfUe3_g/TcONY_PrmbI/AAAAAAAAAG8/Kt19KCQXb30/s1600/HTML5_Badge_64.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-wWXyAfUe3_g/TcONY_PrmbI/AAAAAAAAAG8/Kt19KCQXb30/s1600/HTML5_Badge_64.png" /&gt;&lt;/a&gt;HTML stands for &lt;i&gt;H&lt;/i&gt;yper&lt;i&gt;T&lt;/i&gt;ext &lt;i&gt;M&lt;/i&gt;arkup &lt;i&gt;L&lt;/i&gt;anguage and it is the programming language used to build web pages. The first version of HTML was defined in 1991. Today we often talk, write and discuss HTML latest version: HTML5.&lt;br /&gt;&lt;br /&gt;The programming language is quite intuitive and it mainly consists of tags.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Tags&lt;/b&gt;&lt;/div&gt;To show content on a web page we need to use tags. Basically every element in web page is composed by tags. An element is usually made of tag pairs. So here we go with the first terms! Let's try to explain tags with an example:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;b&gt;&lt;span style="color: #cc0000;"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;span style="color: #93c47d;"&gt;Welcome to The Web Thought&lt;/span&gt;&lt;span style="color: #fff2cc;"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;span style="color: #cc0000;"&gt;&amp;lt;p&amp;gt;&lt;/span&gt; is the start tag;&lt;br /&gt;&lt;span style="color: #93c47d;"&gt;Welcome to the Web Thought&lt;/span&gt; is the content;&lt;br /&gt;&lt;span style="color: #fff2cc;"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt; is the end tag (made of a slash "/" and the tag name again);&lt;br /&gt;&amp;lt;p&amp;gt;Welcome to The Web Thought&amp;lt;/p&amp;gt; is an element. &lt;br /&gt;There are HTML elements that do not have a start tag and an end tag. Those elements consists in only one tag (for example the &amp;lt;br&amp;gt; element).&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Attributes&lt;/b&gt;&lt;/div&gt;Every element might have attributes to better define its meaning. Attributes go in the start tag of an element and usually they consist of a name and a value enclosed in quotes.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;tagname attribute="value"&amp;gt;content&amp;lt;/tagname&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;Now, something you might not know: quotes around values are not always needed, infact if the value has no space or any special characters like " ' ` = &amp;lt; and &amp;gt;, we can remove the quotes.&lt;br /&gt;Another thing: we can use double quotes or single quotes, it doesn't matter.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;HTML basic structure&lt;/b&gt;&lt;/div&gt;The basic structure of an HTML page is made of the following elements:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;doctype&lt;/li&gt;&lt;li&gt;html&lt;/li&gt;&lt;li&gt;head&lt;/li&gt;&lt;li&gt;body&lt;/li&gt;&lt;/ol&gt;So, we can create a simple HTML page like:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;!doctype html&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;head&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;head content&lt;/i&gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/head&lt;br /&gt;&amp;nbsp; &amp;lt;body&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;body content&lt;/i&gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The head content is different from the body content. The body content is where we want to insert our page elements, while in the head we are going to insert the document metadata.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Document metadata&lt;/b&gt;&lt;/div&gt;The document metadata consists in a collection of information for the HTML document. The head element usually contains the document title, the character settings, the document description, keywords, scripts and information on stylesheets.&lt;br /&gt;We shouldn't overlook the importance of the head element. First of all, it is to be noted that the document metadata will not be shown on the page (while the body content is). Secondly, in the head is where we insert references to JavaScript libraries such as jQuery, references to external stylesheets, we embed stylesheets and document related metadata such as title, keywords and so on.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Body content&lt;/b&gt;&lt;/div&gt;In the body we can insert all the HTML elements that will generate the document as displayed by the browser. The general HTML structure should always be clear and immediately recognisable while programming. Indentation, for example, should be used to preserve the flowing of page elements in code view while consistent closing tags should follow a nesting structure.&lt;br /&gt;An example:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;font color="#000000"&amp;gt;Welcome to The Web Thought &amp;lt;/font&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The above code represents a good way of creating a document structure. Or, being more strict:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;font color="#000000"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Welcome to The Web Thought&lt;br /&gt;&amp;nbsp; &amp;lt;/font&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;Remember that the more accurate is the coding process in terms of clarity, the easier it will be to understand and maintain the code itself. &lt;br /&gt;&lt;br /&gt;Ok folks!, I think that's enough for today. I believe you've been bored enough.&lt;br /&gt;Have a nice day and share your thoughts as usual!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-2071871773470468065?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=xsLzLtv3VUM:DSCVlM54pNQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=xsLzLtv3VUM:DSCVlM54pNQ:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=xsLzLtv3VUM:DSCVlM54pNQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/xsLzLtv3VUM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/2071871773470468065/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/html-terms-and-syntax-tutorial-for.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/2071871773470468065" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/2071871773470468065" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/xsLzLtv3VUM/html-terms-and-syntax-tutorial-for.html" title="HTML: terms and syntax (a tutorial for beginners)" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-wWXyAfUe3_g/TcONY_PrmbI/AAAAAAAAAG8/Kt19KCQXb30/s72-c/HTML5_Badge_64.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/html-terms-and-syntax-tutorial-for.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-9006620930475141367</id><published>2011-12-07T07:00:00.013+01:00</published><updated>2011-12-14T15:44:40.372+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="background" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">CSS: how to change an element style with JavaScript</title><content type="html">It is possible to manipulate a &lt;b&gt;CSS &lt;/b&gt;rule applied to a DOM element using &lt;b&gt;JavaScript&lt;/b&gt;. The solution can be quite effective, because we can change styles according to specific events in our page.&lt;br /&gt;&lt;br /&gt;For example, when a button is pressed, or an option is chosen, we can trigger an event that will change a CSS property's value.&lt;br /&gt;&lt;br /&gt;In the following post, we will change the background colour for a text, by pressing the text itself. Then we will create another trigger that will change the text colour back to default, again.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;JavaScript&lt;/b&gt;&lt;/div&gt;The JavaScript code is very simple and with just a few lines, we can control and change the applied style. In the head of our document, we will insert the following snippet:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;script type="text/javascript"&amp;gt;&amp;nbsp; &lt;br /&gt;function changeStyle(elem) {&amp;nbsp; &lt;br /&gt;&amp;nbsp; elem.style.background = 'blue';&amp;nbsp; &lt;br /&gt;}&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;function defaultStyle(elemId) {&amp;nbsp; &lt;br /&gt;&amp;nbsp; elem = document.getElementById(elemId);&amp;nbsp; &lt;br /&gt;&amp;nbsp; elem.style.background = 'white';&amp;nbsp; &lt;br /&gt;}&amp;nbsp; &lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The first function ("changeStyle") will turn the background of our element to blue.&lt;br /&gt;The second function ("defaultStyle") will turn the background colour of our element to the default white.&lt;br /&gt;The &lt;i&gt;style &lt;/i&gt;object is used to change a CSS property of an element. Its syntax is:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;element.style.CSS_property = value&lt;/code&gt;&lt;/blockquote&gt;where:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;element is what we want to alter, we can determine it using its id (getElementById);&lt;/li&gt;&lt;li&gt;CSS_property is the property we want to apply to the element (color, background etc);&lt;/li&gt;&lt;li&gt;value is the value for the above property.&lt;/li&gt;&lt;/ul&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;CSS&lt;/b&gt;&lt;/div&gt;We then need to style our element to the default value. To do so, we insert - again in the head of our document - the related style. In our example the element will have an id="changingColour".&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;style type="text/css"&amp;gt;&amp;nbsp; &lt;br /&gt;#changingColour {&amp;nbsp; &lt;br /&gt;&amp;nbsp;border: solid blue 2px;&amp;nbsp; &lt;br /&gt;}&amp;nbsp; &lt;br /&gt;&amp;lt;/style&amp;gt;&amp;nbsp; &lt;/code&gt;&lt;/blockquote&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;HTML&lt;/b&gt;&lt;/div&gt;Now we need to insert our element - the one that will change background colour when clicked- and a "reset" button - clicked when we need to reset the colour to default.&lt;br /&gt;To trigger the events, we will use the onClick event.&lt;br /&gt;Put the following code in the body section of your document:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;div id="changingColour" onclick="changeStyle(this)";&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;Click here to change background colour.&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;button onclick="defaultStyle('changingColour');"&amp;gt;Reset background colour&amp;lt;/button&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;And that is all. Very simple and effective.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Other things we might do...&lt;/b&gt;&lt;/div&gt;The above example is very basic. However we can use it to alter other styles like the text colour, borders and so on.&lt;br /&gt;Again, in the presented code, the user triggers the style changing by clicking on the text or on a button, however we can decide to trigger the functions on different events that better suit our needs.&lt;br /&gt;Just follow your fantasy and work on it.&lt;br /&gt;&lt;br /&gt;Oh, by the way, if you develop a more complex solution, please do share it with us by using the comment section.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-9006620930475141367?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=jyYT--nrUVg:xO8saz5PX4k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=jyYT--nrUVg:xO8saz5PX4k:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=jyYT--nrUVg:xO8saz5PX4k:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/jyYT--nrUVg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/9006620930475141367/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/css-how-to-change-element-style-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/9006620930475141367" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/9006620930475141367" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/jyYT--nrUVg/css-how-to-change-element-style-with.html" title="CSS: how to change an element style with JavaScript" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/css-how-to-change-element-style-with.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1062766794165731297</id><published>2011-12-05T07:00:00.002+01:00</published><updated>2011-12-05T07:00:00.638+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="search box" /><category scheme="http://www.blogger.com/atom/ns#" term="form" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">CSS: how to create a stylish search input box</title><content type="html">The search capability in modern web sites is an established feature. Visitors should always have the possibility to look for text or else, and search a whole site for specific things.&lt;br /&gt;A search form can stay anywhere, however, it seems that the best way is to insert the feature on every page, possibly in the top right corner. If we browse all major web sites, we will notice that the search box is always there, ready to be used when needed.&lt;br /&gt;&lt;br /&gt;In the following post, we will create a &lt;b&gt;search form&lt;/b&gt; and style it a bit. The resulting box will be:&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-kzEFzsr_KPA/TsNf--LEQxI/AAAAAAAAAL4/0U5hI2Cy_mg/s1600/search-box.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-kzEFzsr_KPA/TsNf--LEQxI/AAAAAAAAAL4/0U5hI2Cy_mg/s1600/search-box.jpg" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Search Box&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Note that the above is an image, so please do not try to use it.&lt;br /&gt;Ok! Now let's try to build it. We are going to use plain &lt;b&gt;HTML&lt;/b&gt; and &lt;b&gt;CSS&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;First of all the HTML&lt;/b&gt;&lt;/div&gt;The HTML behind the search box is plain and simple. We need an input box and a button. The image inside the button will be something like:&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-PL--ZlKx7fE/TsNguSKit3I/AAAAAAAAAMA/iWfEzFEDH4E/s1600/l.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-PL--ZlKx7fE/TsNguSKit3I/AAAAAAAAAMA/iWfEzFEDH4E/s1600/l.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Magnifying Glass&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;I know it is quite small, but it's all we need.(The above png is meant to be displayed on light background, that is why it won't look great on this page).&lt;br /&gt;&lt;br /&gt;The search box, as said, is an input box and a button, all wrapped inside a container div. Let's see the code:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;form&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input name="search" type="text" class="search" value="Search..."&amp;gt;&amp;lt;button name="button" title="Search" class="button"&amp;gt;&amp;lt;img src="l.png" alt="Search" class="mg"&amp;gt;&amp;lt;/button&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;In details, the div has a class="container".&lt;br /&gt;The form has no attribute in the example, you can add them according to your needs.&lt;br /&gt;The input tag has a class="search".&lt;br /&gt;The button tag has a class="button".&lt;br /&gt;And finally the image (l.png) has a class="mg".&lt;br /&gt;&lt;br /&gt;We are going to create rules for the container, the search box, the button and the image.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The CSS&lt;/b&gt;&lt;/div&gt;Let's start from the beginning: the container div:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;style type="text/css"&amp;gt;&lt;br /&gt;.container {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin: 0px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 0px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; display: inline;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;Nothing special here.&lt;br /&gt;The input box ("search" class):&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;.search {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-top-width: 1px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-right-width: 1px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-bottom-width: 1px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-left-width: 1px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-top-style: solid;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-right-style: none;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-bottom-style: solid;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-left-style: solid;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-top-color: #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-right-color: #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-bottom-color: #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-left-color: #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #EEEEEE;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 20px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin: 0px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 0px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 14px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; float: left;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; display: inline;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vertical-align: middle;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;Here we set the borders which are all the same except for the right hand side one. We then set the background color to a light grey (#EEEEEE).&lt;br /&gt;The height is set to 20px with no margin and no padding. Note that we float the box to the left.&lt;br /&gt;Now the button ("button" class):&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;.button {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-top-width: 1px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-right-width: 1px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-bottom-width: 1px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-left-width: 1px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-top-style: solid;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-right-style: solid;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-bottom-style: solid;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-left-style: none;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-top-color: #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-right-color: #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-bottom-color: #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-left-color: #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin: 0px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 0px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor: pointer;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 22px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 20px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vertical-align: middle;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 12px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #EEEEEE;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; float: left;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; display: inline;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;The button has styles very similar to the input box. This time, the only missing border is the left hand side one, so that our search box will look like as whole piece. Note that the height is set to 22px: it is important that the button height is greater than the input box height. The button height value should always be the input box value + the top and bottom border heights (in our example is 20+1+1).&lt;br /&gt;Now the image ("mg" class):&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;.mg {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin: 0px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 0px;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;As you can see, the CSS is not that complicated. The final result will work in FireFox, IE 6+, Opera, Safari and Chrome.&lt;br /&gt;&lt;br /&gt;Hope you enjoyed the above. Let me know what you think about it.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-1062766794165731297?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=RUqzU9VMvsk:Skbu_0JZEqw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=RUqzU9VMvsk:Skbu_0JZEqw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=RUqzU9VMvsk:Skbu_0JZEqw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/RUqzU9VMvsk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/1062766794165731297/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/css-how-to-create-stylish-search-input.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1062766794165731297" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/1062766794165731297" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/RUqzU9VMvsk/css-how-to-create-stylish-search-input.html" title="CSS: how to create a stylish search input box" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-kzEFzsr_KPA/TsNf--LEQxI/AAAAAAAAAL4/0U5hI2Cy_mg/s72-c/search-box.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/css-how-to-create-stylish-search-input.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-7012298651216765557</id><published>2011-12-02T07:00:00.009+01:00</published><updated>2011-12-02T07:00:07.656+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="regular expression" /><category scheme="http://www.blogger.com/atom/ns#" term="RegEx" /><category scheme="http://www.blogger.com/atom/ns#" term="email" /><category scheme="http://www.blogger.com/atom/ns#" term="validation" /><category scheme="http://www.blogger.com/atom/ns#" term="form validation" /><title type="text">JavaScript: validate forms with Regular Expressions (RegEx)</title><content type="html">I know I've been posting a lot on forms and validation recently, however we should all agree on the fact that &lt;b&gt;form validation&lt;/b&gt; is really a serious problem for programmers.&lt;br /&gt;&lt;br /&gt;When a user submit data to our database, the first thing we should consider is to protect the destination. Our database is waiting for specific data and, for example, a text string must not be submitted to a smalldate field.&lt;br /&gt;On the other hand, we should provide a complete and efficient way to help the user in filling in the form. Specifically in commercial situations, if we want the visitors to conclude painlessly a commercial transaction, we should make things the easiest possible way for him/her.&lt;br /&gt;&lt;br /&gt;When we check what the user is submitting, we can be sure that the birth date or the credit card expiration date is truly a valid date - for the user protection and security and for the web site owner who needs to be sure that everything works smoothly.&lt;br /&gt;&lt;br /&gt;In the following example, we are going to validate emails, however, by changing the regular expression, we can check almost anything.&lt;br /&gt;In the following example we use &lt;b&gt;RegEx &lt;/b&gt;in a short &lt;b&gt;JavaScript &lt;/b&gt;function.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;What we need is just submit the email address to the function, and we will receive a true or false response.&lt;br /&gt;Let's see the function:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;function validate(email){&lt;br /&gt;&amp;nbsp;&amp;nbsp; var filter = /^[a-zA-Z0-9]+[a-zA-Z0-9_.-]+[a-zA-Z0-9_-]+@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{2,4}$/;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(filter.test(email)){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;Just a few side notes on the above function:&lt;br /&gt;1) the target browser must be JavaScript enabled (and that's obvious);&lt;br /&gt;2) if you can use HTML5... well, use it with type="email" (see &lt;a href="http://thewebthought.blogspot.com/2011/11/html-html5-new-input-types.html"&gt;here&lt;/a&gt;);&lt;br /&gt;3) the RegEx used is just a simple one. A RFC 2822 compliant expression is much more complicated.&lt;br /&gt;&lt;br /&gt;If you want to explore more, see the &lt;a href="http://www.regular-expressions.info/examples.html" target="_blank"&gt;Regular Expression&lt;/a&gt; site where you can find expressions for:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;numeric ranges;&lt;/li&gt;&lt;li&gt;floating point numbers;&lt;/li&gt;&lt;li&gt;email addresses;&lt;/li&gt;&lt;li&gt;dates;&lt;/li&gt;&lt;li&gt;credit card numbers;&lt;/li&gt;&lt;li&gt;matching complete line;&lt;/li&gt;&lt;li&gt;deleting duplicate lines;&lt;/li&gt;&lt;li&gt;programming;&lt;/li&gt;&lt;li&gt;two near words.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Use the above code wisely and enjoy!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-7012298651216765557?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=4gIrmScySRo:m_6cQ1eYCgc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=4gIrmScySRo:m_6cQ1eYCgc:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=4gIrmScySRo:m_6cQ1eYCgc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/4gIrmScySRo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/7012298651216765557/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/12/javascript-validate-forms-with-regular.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7012298651216765557" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7012298651216765557" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/4gIrmScySRo/javascript-validate-forms-with-regular.html" title="JavaScript: validate forms with Regular Expressions (RegEx)" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/12/javascript-validate-forms-with-regular.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4506346625566907178</id><published>2011-11-30T07:00:00.000+01:00</published><updated>2011-11-30T07:00:04.331+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="plug-in" /><category scheme="http://www.blogger.com/atom/ns#" term="preloaders" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title type="text">jQuery: preloaders!</title><content type="html">Do we need &lt;b&gt;preloaders&lt;/b&gt;? Maybe... maybe not. It's up to you.&lt;br /&gt;&lt;br /&gt;Here is a short list of &lt;b&gt;jQuery &lt;/b&gt;solutions for you.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gayadesign.com/diy/queryloader2-preload-your-images-with-ease/" target="_blank"&gt;QueryLoader2&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"What QueryLoader2 does is simply scanning the given elements for images (and background images) and preloading them before the website is visible.&lt;br /&gt;This version has been modified to make it easier for users to implement (especially those who are already into jQuery.)&lt;br /&gt;QueryLoader currently works with jQuery v1.6.4 and in IE version &amp;gt; 7, Chrome, Safari and Firefox."&lt;/blockquote&gt;&lt;a href="http://www.jqueryin.com/projects/spinner-jquery-preloader-plugin/#about" target="_blank"&gt;Spinner – A jQuery Preloader Plugin&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"Spinner provides a simple approach for adding and removing a preloader for your web applications. Usage is as simple as calling &lt;b&gt;$(‘elem’).spinner()&lt;/b&gt; and subsequently &lt;b&gt;$(‘elem’).spinner(‘remove’)&lt;/b&gt;. You may create your own custom preloaders at http://www.ajaxload.info. Please note that if you use a custom preloader, you must pass in the new height and width as options."&lt;/blockquote&gt;&lt;a href="http://code.google.com/p/jquery-preloader/" target="_blank"&gt;jQuery - Preloader&lt;/a&gt; &lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"This jQuery plugin preloads css, js, html and images with visual loader, fast and very small (~3Kb)."&lt;/blockquote&gt;&lt;a href="http://flesler.blogspot.com/2008/01/jquerypreload.html" target="_blank"&gt;jQuery.Preload&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"This is an advanced multi-functional preloader, that has 4 modes integrated.Each mode suits a different, common situation."&lt;/blockquote&gt;&lt;a href="http://atomicrobotdesign.com/blog/web-development/seriously-easy-jquery-preloader/" target="_blank"&gt;Seriously easy jQuery preloader&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"[...] We aren’t actually going to build a preloader in the way that a Flash preloader works. Essentially, what we’re going to do is hide everything until the site is loaded. You do this by creating a div that covers the entire window, so you can’t see the site loading behind it and then when the site is completely loaded, you remove the div. We aren’t technically preloading anything, but we’re faking it and mimicking what people are used to with Flash preloaders."&lt;/blockquote&gt;&lt;a href="http://ambulu.org/jquery-preloader-js/" target="_blank"&gt;jquery preloader.js&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&lt;b&gt;"jquery preloader.js&lt;/b&gt; is an advanced multi-functional preloader, that has 4(actually 5) modes integrated.&lt;br /&gt;Each mode suits a different, common situation."&lt;/blockquote&gt;&lt;a href="http://www.stevenmcmillan.co.uk/blog/2011/simple-jquery-preloader-plugin/" target="_blank"&gt;Simple jQuery Preloader Plugin&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"After several searches for a pre-loading plugin for jQuery I came up short – they either did too much and had hundreds of options I didn’t want, or they were packaged with something else had a lot of code I didn’t need. The following plugin will allow you to pass in a selector (div, body, any other element) and pre-load all images within it, the plugin is very lightweight with only 17 lines from start to finish."&lt;/blockquote&gt;&lt;a href="http://igorfrolov.info/lab/jquery-preloader/" target="_blank"&gt;jQuery UI Preloader plugin&lt;/a&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;"The main purpose of this plugin is to show indicator that some operation is in progress. As usually, it's rotating image or something like this."&amp;nbsp;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-4506346625566907178?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=2s7RQL2c0Mc:baXyapg3eMw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=2s7RQL2c0Mc:baXyapg3eMw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=2s7RQL2c0Mc:baXyapg3eMw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/2s7RQL2c0Mc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/4506346625566907178/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/11/jquery-preloaders.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4506346625566907178" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/4506346625566907178" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/2s7RQL2c0Mc/jquery-preloaders.html" title="jQuery: preloaders!" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/11/jquery-preloaders.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-7644367394914127333</id><published>2011-11-28T07:00:00.002+01:00</published><updated>2011-11-28T08:28:10.469+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="analogue clock" /><category scheme="http://www.blogger.com/atom/ns#" term="canvas" /><category scheme="http://www.blogger.com/atom/ns#" term="analog clock" /><category scheme="http://www.blogger.com/atom/ns#" term="Mozilla Developer Network" /><title type="text">JavaScript: create an analogue clock with canvas</title><content type="html">There's an interesting example buried in the MDM &lt;b&gt;HTML5&lt;/b&gt; pages, where we can create an analogue clock with &lt;b&gt;JavaScript &lt;/b&gt;and &lt;b&gt;&amp;lt;canvas&amp;gt;&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;There's not much to say about it. What is interesting for us, is the way the clock is actually drawn.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-KZ2mhxq3hBE/TsDYUCAF7MI/AAAAAAAAALw/UhkFWYLotI8/s1600/clock.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-KZ2mhxq3hBE/TsDYUCAF7MI/AAAAAAAAALw/UhkFWYLotI8/s1600/clock.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;The blue circle, hours and minutes marks are created using JavaScript, and the same logic is used to draw the hours, minutes and seconds arms.&lt;br /&gt;&lt;br /&gt;All the static and moving parts of the clock are inserted into a &amp;lt;canvas&amp;gt; tag using getElementById. If the browser is not recognizing the HTML5 tag, it will only show a warning.&lt;br /&gt;&lt;br /&gt;You can get the code from the &lt;a href="https://developer.mozilla.org/en/Canvas_tutorial%3ABasic_animations" target="_blank"&gt;MDM &lt;/a&gt;page, or copy it from here:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function init(){&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clock();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setInterval(clock,1000);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function clock(){&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var now = new Date();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var ctx = document.getElementById('canvas').getContext('2d');&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.save();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.clearRect(0,0,150,150);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.translate(75,75);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.scale(0.4,0.4);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.rotate(-Math.PI/2);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.strokeStyle = "black";&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.fillStyle = "white";&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.lineWidth = 8;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.lineCap = "round";&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Hour marks&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.save();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i=0;i&amp;lt;12;i++){&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.beginPath();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.rotate(Math.PI/6);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.moveTo(100,0);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.lineTo(120,0);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.stroke();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.restore();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Minute marks&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.save();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.lineWidth = 5;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (i=0;i&amp;lt;60;i++){&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (i%5!=0) {&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.beginPath();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.moveTo(117,0);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.lineTo(120,0);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.stroke();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.rotate(Math.PI/30);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.restore();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var sec = now.getSeconds();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var min = now.getMinutes();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var hr&amp;nbsp; = now.getHours();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hr = hr&amp;gt;=12 ? hr-12 : hr;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.fillStyle = "black";&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // write Hours&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.save();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.rotate( hr*(Math.PI/6) + (Math.PI/360)*min + (Math.PI/21600)*sec )&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.lineWidth = 14;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.beginPath();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.moveTo(-20,0);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.lineTo(80,0);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.stroke();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.restore();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // write Minutes&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.save();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.rotate( (Math.PI/30)*min + (Math.PI/1800)*sec )&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.lineWidth = 10;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.beginPath();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.moveTo(-28,0);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.lineTo(112,0);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.stroke();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.restore();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Write seconds&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.save();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.rotate(sec * Math.PI/30);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.strokeStyle = "#D40000";&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.fillStyle = "#D40000";&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.lineWidth = 6;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.beginPath();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.moveTo(-30,0);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.lineTo(83,0);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.stroke();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.beginPath();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.arc(0,0,10,0,Math.PI*2,true);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.fill();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.beginPath();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.arc(95,0,10,0,Math.PI*2,true);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.stroke();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.fillStyle = "#555";&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.arc(0,0,3,0,Math.PI*2,true);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.fill();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.restore();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.beginPath();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.lineWidth = 14;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.strokeStyle = '#325FA2';&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.arc(0,0,142,0,Math.PI*2,true);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.stroke();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx.restore();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;The above goes into the head of your page.&lt;br /&gt;The &amp;lt;body&amp;gt; tag should be changed to:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;body onload="init();"&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;And finally, just insert the canvas where we want to show the clock:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;canvas id="canvas"&amp;gt;The canvas is not supported by your browser&amp;lt;/canvas&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;And that's all.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-7644367394914127333?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=6UGzD14_1wE:g1KGVCrdMdM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=6UGzD14_1wE:g1KGVCrdMdM:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=6UGzD14_1wE:g1KGVCrdMdM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/6UGzD14_1wE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/7644367394914127333/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/11/javascript-create-analogue-clock-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7644367394914127333" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/7644367394914127333" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/6UGzD14_1wE/javascript-create-analogue-clock-with.html" title="JavaScript: create an analogue clock with canvas" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-KZ2mhxq3hBE/TsDYUCAF7MI/AAAAAAAAALw/UhkFWYLotI8/s72-c/clock.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/11/javascript-create-analogue-clock-with.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-320694434908998871</id><published>2011-11-25T07:00:00.002+01:00</published><updated>2011-11-30T08:59:08.495+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="Christmas" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title type="text">jQuery &amp; JavaScript: Christmas effects</title><content type="html">&lt;b&gt;Christmas &lt;/b&gt;is coming and you might want to put some effects on your web page.&lt;br /&gt;I have thought a lot about saying this or not, but I couldn't pass over in silence: I really hate those kind of things, but I know that some of you might be interested anyway. &lt;br /&gt;If so, please look into this short list of possible &lt;b&gt;JavaScript &lt;/b&gt;and &lt;b&gt;jQuery &lt;/b&gt;solutions.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://tester2.synthasite.com/christmas-lights-top.php" target="_blank"&gt;Flashing lights&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.xfunda.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=112:javascript-christmas-countdown-digital-clock&amp;amp;catid=40:javascript&amp;amp;Itemid=75" target="_blank"&gt;JavaScript Christmas Countdown digital clock&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://tutorialzine.com/2010/12/google-christmas-doodle/" target="_blank"&gt;Google's Christmas Doodle&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dynamicdrive.com/dynamicindex3/snow.htm" target="_blank"&gt;Snow Effect&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.schillmania.com/projects/snowstorm/" target="_blank"&gt;Snowstorm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;30/11/2011 Update: Following a kind&amp;nbsp; comment from Jason, I decided to add his jQuery plugin page:&lt;br /&gt;&lt;a href="http://www.somethinghitme.com/2011/10/05/jquery-snowfall-1-5-update-now-with-snow-buildup/%20" target="_blank"&gt;jQuery Snowfall&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-320694434908998871?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=xbehxNevwnE:0ZAuIPKlw8Q:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=xbehxNevwnE:0ZAuIPKlw8Q:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=xbehxNevwnE:0ZAuIPKlw8Q:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/xbehxNevwnE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/320694434908998871/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/11/jquery-javascript-christmas-effects.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/320694434908998871" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/320694434908998871" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/xbehxNevwnE/jquery-javascript-christmas-effects.html" title="jQuery &amp; JavaScript: Christmas effects" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/11/jquery-javascript-christmas-effects.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-2264338062717531732</id><published>2011-11-23T07:00:00.005+01:00</published><updated>2011-11-23T07:00:08.837+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="web development" /><category scheme="http://www.blogger.com/atom/ns#" term="compatibility" /><category scheme="http://www.blogger.com/atom/ns#" term="ie7" /><title type="text">Compatibility: do we need to consider IE7 support?</title><content type="html">I recently had a interesting conversation with a friend of mine. He develops web sites and we were talking about &lt;b&gt;compatibility&lt;/b&gt;. Or, to better put it, how many situations a developer should consider when testing a new site. We started counting browser versions, and then we considered all the possible screen resolutions. After that, we added tablets and smartphones with related browser mobile versions.&lt;br /&gt;We ended up with a long list and we were quite bewildered. If you stop for a moment and think about it, developing a new site, ensuring full compatibility, is a complete and utter madness.&lt;br /&gt;I tried to shorten the long list of possible situation and the first thing that came to my mind was Internet Explorer, which, we know, is the most problematic browser. My friend said that we could remove &lt;b&gt;IE7 &lt;/b&gt;from the list. I was not so sure. Then we made a bet: let's see how many 'major' web site do support IE7.&lt;br /&gt;&lt;br /&gt;It has been a dirty job, but someone had to do it. And I did.&lt;br /&gt;I tested a lot of corporate web sites using Internet Explorer 7 in a Windows Xp environment with a 1280x1024 screen resolution. However I would like to show only the following sites, that might be worth mentioning:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;BBC;&lt;/li&gt;&lt;li&gt;Facebook;&lt;/li&gt;&lt;li&gt;Google;&lt;/li&gt;&lt;li&gt;HP;&lt;/li&gt;&lt;li&gt;Sony;&lt;/li&gt;&lt;li&gt;Nokia; &lt;/li&gt;&lt;li&gt;Twitter.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Would you like to see the results? Ok! Follow me.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;I will explain the findings, following a strict alphabetical order because this is not a worst web site compatibility list.&lt;br /&gt;Please note that the test has been carried out on a specific pc in the mentioned environment. The results are therefore not to be taken as absolute, but as a statistic. Other environments might behave in a completely different way. &lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;BBC&lt;/b&gt;&lt;/div&gt;www.BBC.co.uk is a news web site. Mainly the site has a good compatibility, except the bottom menu, which in some pages doesn't show correctly:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-I_PSYp47whg/Trzva3l9-WI/AAAAAAAAALg/lqO0VmwNruU/s1600/BBC-ie7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="78" src="http://3.bp.blogspot.com/-I_PSYp47whg/Trzva3l9-WI/AAAAAAAAALg/lqO0VmwNruU/s320/BBC-ie7.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;As you can see in the text flow something's wrong. Not much eh? Yes it is, however... if your client or boss see something like that, will he/she accept it?&lt;br /&gt;Moreover, content in some news boxes is cut and unreadable.&lt;br /&gt;Oh, by the way, do not try to use the main menu, otherwise you will see lots of JavaScript errors. &lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Facebook&lt;/b&gt;&lt;/div&gt;Well, this is big. I mean, it seems that everyone is on Facebook. But look at what happened to me!&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-PvMW46KVtjg/TrzPvPNxnFI/AAAAAAAAAKg/NAlXZ9FOhOE/s1600/Facebook-ie7.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="252" src="http://1.bp.blogspot.com/-PvMW46KVtjg/TrzPvPNxnFI/AAAAAAAAAKg/NAlXZ9FOhOE/s320/Facebook-ie7.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Facebook&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;I should not say that JavaScript was actually enabled on the test browser. The assumption that JavaScript was not enabled, made the whole site almost unusable. After reloading the main page, the problem went away. And then reappeared. I'm not sure if that was a browser problem or else, anyway that's what I got.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Google&lt;/b&gt;&lt;/div&gt;Google has a working fallback when browsed with IE7. The left hand side menu changes and adapt to new situation.&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-SB82KEWqgoc/TrzQaMQqkqI/AAAAAAAAAKo/sf-7hnrppfo/s1600/Google-ie7.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-SB82KEWqgoc/TrzQaMQqkqI/AAAAAAAAAKo/sf-7hnrppfo/s320/Google-ie7.jpg" width="295" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Google&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;The rest is working, even if some features are obviously missing. But that's ok, isn't it?&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;HP&lt;/b&gt;&lt;/div&gt;HP site has a nice centered stage where products are displayed like in many other commercial site. But, just after that, towards the bottom of the page...&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-r-Ub4ozFE7Q/TrzYQ8F5vKI/AAAAAAAAALY/Ef0fdv4LqsU/s1600/HP-ie7.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="202" src="http://2.bp.blogspot.com/-r-Ub4ozFE7Q/TrzYQ8F5vKI/AAAAAAAAALY/Ef0fdv4LqsU/s320/HP-ie7.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;HP Home page&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Just a big black hole... what a waste of space...&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Sony&lt;/b&gt;&lt;/div&gt;Sony web site has been a disaster. When viewed with IE7, everything was pushed on the left hand side, with the following effect:&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-IJ_8CFN_e5w/TrzSX0Kup2I/AAAAAAAAALA/_6JEvYE08Oo/s1600/Sony.ie7.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-IJ_8CFN_e5w/TrzSX0Kup2I/AAAAAAAAALA/_6JEvYE08Oo/s320/Sony.ie7.jpg" width="208" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Sony&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;If we scrolled the page down, we saw that everything was compressed in a long and narrow column, making the web site almost impossible to browse. After a few reload, the browser was probably recognized and the page was displayed as expected.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Nokia&lt;/b&gt;&lt;/div&gt;Nokia site is quite good. Unfortunately in the support home page, a bottom menu is cut:&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-1I6RD36vGK8/Tr0itkwEfeI/AAAAAAAAALo/aQNDWGt6-f4/s1600/Nokia-ie7.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="42" src="http://2.bp.blogspot.com/-1I6RD36vGK8/Tr0itkwEfeI/AAAAAAAAALo/aQNDWGt6-f4/s320/Nokia-ie7.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Nokia bottom menu&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Twitter&lt;/b&gt;&lt;/div&gt;Together with Facebook, Twitter is one of the most used web site, today. &lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-T5gGO-nvqpk/TrzS_aWuqfI/AAAAAAAAALI/KhzKmyAyvl4/s1600/Twitter-ie7.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="92" src="http://1.bp.blogspot.com/-T5gGO-nvqpk/TrzS_aWuqfI/AAAAAAAAALI/KhzKmyAyvl4/s320/Twitter-ie7.jpg" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Twitter&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;As you can see from the image above, the first time I tried to access Twitter, I couldn't do anything: log-in and search were not working and the page was somehow cut. After pressing refresh a few times, the page finally displayed correctly... after a few JavaScript error pop ups. I can't explain why...&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Conclusions&lt;/b&gt;&lt;/div&gt;I must say that generally speaking, most web sites have a quite good IE7 compatibility. The main problems I encountered were related to JavaScript which threw errors sometimes (in many cases a site has started a chain of multiple scripting errors).&lt;br /&gt;The overall rendering of the pages is good and most of the sites I tested are fully browsable.&lt;br /&gt;The above is true especially for big companies. Smaller firms have more problems, but I believe that it is quite understandable.&lt;br /&gt;&lt;br /&gt;However, the results are not very encouraging. When we deal with web site development, we apparently still need to consider IE7 full compatibility. We can decide to charge more for that, or include it in our first offer. In any case, we need to consider the extra costs for all the needed fallbacks, and we should be ready for a lot more work.&lt;br /&gt;&lt;br /&gt;What is your experience on the matter is a great deal to me. Please share your thoughts and experience!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-2264338062717531732?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=NO25a15aP6c:jW5rE1PmbVA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=NO25a15aP6c:jW5rE1PmbVA:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=NO25a15aP6c:jW5rE1PmbVA:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/NO25a15aP6c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/2264338062717531732/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/11/compatibility-do-we-need-to-consider.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/2264338062717531732" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/2264338062717531732" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/NO25a15aP6c/compatibility-do-we-need-to-consider.html" title="Compatibility: do we need to consider IE7 support?" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-I_PSYp47whg/Trzva3l9-WI/AAAAAAAAALg/lqO0VmwNruU/s72-c/BBC-ie7.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/11/compatibility-do-we-need-to-consider.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-3666249380715745960</id><published>2011-11-22T14:00:00.000+01:00</published><updated>2011-11-22T14:10:00.116+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google+" /><category scheme="http://www.blogger.com/atom/ns#" term="the web thought" /><category scheme="http://www.blogger.com/atom/ns#" term="offtopic" /><title type="text">Google+ Page</title><content type="html">This short post just to inform you that I decided to create a &lt;b&gt;Google+ Page&lt;/b&gt; for The Web Thought.&lt;br /&gt;&lt;br /&gt;Please visit the page by clicking on the red G+ on the right pane and add it to your circles.&lt;br /&gt;&lt;br /&gt;Have a nice day and keep on reading!&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-3666249380715745960?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=VAo5G4DsOZM:j6VVLVCagqg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=VAo5G4DsOZM:j6VVLVCagqg:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=VAo5G4DsOZM:j6VVLVCagqg:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/VAo5G4DsOZM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/3666249380715745960/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/11/google-page.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/3666249380715745960" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/3666249380715745960" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/VAo5G4DsOZM/google-page.html" title="Google+ Page" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/11/google-page.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-3979753010285658320</id><published>2011-11-21T07:00:00.004+01:00</published><updated>2011-11-21T07:00:02.478+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSS3 pie" /><category scheme="http://www.blogger.com/atom/ns#" term="form" /><category scheme="http://www.blogger.com/atom/ns#" term="border-radius" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><category scheme="http://www.blogger.com/atom/ns#" term="css" /><title type="text">CSS: style your form elements</title><content type="html">When talking about how to style an &lt;b&gt;HTML&lt;/b&gt; element, it is always difficult to meet everyone's tastes.&lt;br /&gt;Keep that in mind when reading the following post, because we are going to show how to style &lt;b&gt;form elements&lt;/b&gt; with &lt;b&gt;CSS&lt;/b&gt;, considering two possible extreme situation: with a white background and with a black background. &lt;br /&gt;&lt;br /&gt;We are going to work on the input, text area, select and button elements. We are going to use CSS and specifically the following properties:&lt;br /&gt;1) background color;&lt;br /&gt;2) font family, size and color;&lt;br /&gt;3) text alignment;&lt;br /&gt;4) width and height;&lt;br /&gt;5) padding;&lt;br /&gt;6) border radius;&lt;br /&gt;7) border;&lt;br /&gt;&lt;br /&gt;Let's see what we can do.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;I don't think I should explain every single line of code presented in this post. The best way to understand the logic behind the code is to show the result and the CSS rules. Then we can concentrate on changing some values in order to obtain &lt;u&gt;your&lt;/u&gt; desired effect.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The white background&lt;/b&gt;&lt;/div&gt;The resulting form will be:&lt;br /&gt;&lt;style type="text/css"&gt;.labelWhite { font-family: Geneva, Arial, Helvetica, sans-serif; color: #000000; font-size: 14px;}.inputWhite { background-color:#CCCCCC; font-family: Geneva, Arial, Helvetica, sans-serif; color: #333333; font-size: 14px; text-align: left; width: 180px; height: 1.5em; padding: 2px; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border: 2px solid #666666;}.textareaWhite { background-color:#CCCCCC; font-family: Geneva, Arial, Helvetica, sans-serif; color: #333333; font-size: 14px; text-align: left; width: 380px; padding: 5px; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border: 2px solid #666666;}.selectWhite { background-color:#CCCCCC; font-family: Geneva, Arial, Helvetica, sans-serif; color: #333333; font-size: 14px; text-align: left; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border: 2px solid #666666;}.buttonWhite { background-color:#CCCCCC; font-family: Geneva, Arial, Helvetica, sans-serif; color: #333333; font-size: 14px; text-align: center; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border: 2px solid #666666;}.labelBlack { font-family: Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 14px;}.inputBlack { background-color:#FFFFFF; font-family: Geneva, Arial, Helvetica, sans-serif; color: #333333; font-size: 14px; text-align: left; width: 180px; height: 1.5em; padding: 2px; height: auto; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border: 2px solid #CCCCCC;}.textareaBlack { background-color:#FFFFFF; font-family: Geneva, Arial, Helvetica, sans-serif; color: #333333; font-size: 14px; text-align: left; width: 380px; padding: 5px; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border: 2px solid #CCCCCC;}.selectBlack { background-color:#FFFFFF; font-family: Geneva, Arial, Helvetica, sans-serif; color: #333333; font-size: 14px; text-align: left; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border: 2px solid #CCCCCC;}.buttonBlack { background-color:#FFFFFF; font-family: Geneva, Arial, Helvetica, sans-serif; color: #333333; font-size: 14px; text-align: center; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border: 2px solid #CCCCCC;}&lt;/style&gt;&lt;br /&gt;&lt;div style="background-color: white; padding: 10px;"&gt;&lt;label class="labelWhite"&gt;Input&lt;br /&gt;&lt;input class="inputWhite" name="textfield" type="text" /&gt;&lt;/label&gt;&lt;br /&gt;&lt;br /&gt;&lt;label class="labelWhite"&gt;TextArea&lt;br /&gt;&lt;textarea class="textareaWhite" name="textarea" rows="5"&gt;&lt;/textarea&gt;&lt;/label&gt;&lt;br /&gt;&lt;br /&gt;&lt;label class="labelWhite"&gt;List Menu&lt;br /&gt;&lt;select class="selectWhite" name="select"&gt;  &lt;option value="Value 1"&gt;Value 1&lt;/option&gt;  &lt;option value="Value 2"&gt;Value 2&lt;/option&gt;&lt;/select&gt;&lt;/label&gt;&lt;br /&gt;&lt;br /&gt;&lt;label class="labelWhite"&gt;Button&lt;br /&gt;&lt;input class="buttonWhite" name="Submit" type="submit" value="Submit" /&gt;&lt;/label&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The code behind it, is the following. For the CSS (to be inserted into the head of your document):&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;style type="text/css"&amp;gt;&lt;br /&gt;.labelWhite {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-family: Geneva, Arial, Helvetica, sans-serif;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #000000;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 14px;&lt;br /&gt;}&lt;br /&gt;.inputWhite {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color:#CCCCCC;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-family: Geneva, Arial, Helvetica, sans-serif;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #333333;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 14px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align: left;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 180px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 1.5em;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 2px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -moz-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -webkit-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 2px solid #666666;&lt;br /&gt;}&lt;br /&gt;.textareaWhite {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color:#CCCCCC;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-family: Geneva, Arial, Helvetica, sans-serif;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #333333;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 14px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align: left;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 380px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 5px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -moz-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -webkit-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 2px solid #666666;&lt;br /&gt;}&lt;br /&gt;.selectWhite {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color:#CCCCCC;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-family: Geneva, Arial, Helvetica, sans-serif;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #333333;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 14px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align: left;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -moz-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -webkit-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 2px solid #666666;&lt;br /&gt;}&lt;br /&gt;.buttonWhite {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color:#CCCCCC;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-family: Geneva, Arial, Helvetica, sans-serif;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #333333;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 14px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align: center;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -moz-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -webkit-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 2px solid #666666;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;And the HTML is:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;div style="background-color:#FFFFFF;padding:10px;"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;form&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;label class="labelWhite"&amp;gt;Input&amp;lt;br&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type="text" name="textfield" class="inputWhite"&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/label&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;br&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;br&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;label class="labelWhite"&amp;gt;TextArea&amp;lt;br&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;textarea name="textarea" rows="5" class="textareaWhite"&amp;gt;&amp;lt;/textarea&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/label&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;br&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;br&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;label class="labelWhite"&amp;gt;List Menu&amp;lt;br&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;select name="select" class="selectWhite"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;option value="Value 1"&amp;gt;Value 1&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;option value="Value 2"&amp;gt;Value 2&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/select&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/label&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;br&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;br&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;label class="labelWhite"&amp;gt;Button&amp;lt;br&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type="submit" name="Submit" value="Submit" class="buttonWhite"&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/label&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;Now... let's see what we can do to change things a bit...&lt;br /&gt;&lt;br /&gt;&lt;b style="color: #6fa8dc;"&gt;How it works &lt;/b&gt;&lt;br /&gt;As you can see, I decided to apply different classes to every form element. That is because we need to have full control on styling applied to every single element avoiding the possibile overlap of CSS rules.&lt;br /&gt;&lt;br /&gt;Every form element's font - starting from labels - has been styled, choosing a font family (Geneva), color (#000000 and #333333) and size (14px). The background color of elements is a light grey (#CCCCCC)&lt;br /&gt;&lt;br /&gt;We then aligned the text on the left hand side, except for the button which has a centered text.&lt;br /&gt;&lt;br /&gt;The input box and the text area have some additional rules (width, height and padding). The resulting effect is to give "more space" to the inside text, so that, when the user insert values, the font is clear and easy to read. - Please note that the height of the input box is in ems and not pixels.&lt;br /&gt;&lt;br /&gt;After that, every element has rounded corners: we use the border-radius property to achieve that. I decided to use a quite small value, because I personally don't like it too much rounded (!).&lt;br /&gt;&lt;br /&gt;And finally, we style the border which is solid, with a width of 2px and dark grey color (#666666).&lt;br /&gt;&lt;br /&gt;Said that, you can understand that we can change all those CSS rules to meet our desired effect.&lt;br /&gt;I believe that the rules I have used are the most important and that working on them is enough. It is clear that we could insert, for instance, a box shadow; however I am sure it would too much in most cases.&lt;br /&gt;Stick to those simple rules, changing values according to the overall theme of your web site, and do not make things too much complicated.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;The black background&lt;/b&gt;&lt;/div&gt;Just for completeness, I will show a similiar work on a black background.&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: black; padding: 10px;"&gt;&lt;br /&gt;&lt;label class="labelBlack"&gt;Input&lt;br /&gt;&lt;input class="inputBlack" name="textfield" type="text" /&gt;&lt;/label&gt;&lt;br /&gt;&lt;br /&gt;&lt;label class="labelBlack"&gt;TextArea&lt;br /&gt;&lt;textarea class="textareaBlack" name="textarea" rows="5"&gt;&lt;/textarea&gt;&lt;/label&gt;&lt;br /&gt;&lt;br /&gt;&lt;label class="labelBlack"&gt;List Menu&lt;br /&gt;&lt;select class="selectBlack" name="select"&gt;  &lt;option value="Value 1"&gt;Value 1&lt;/option&gt;  &lt;option value="Value 2"&gt;Value 2&lt;/option&gt;&lt;/select&gt;&lt;/label&gt;&lt;br /&gt;&lt;br /&gt;&lt;label class="labelBlack"&gt;Button&lt;br /&gt;&lt;input class="buttonBlack" name="Submit" type="submit" value="Submit" /&gt;&lt;/label&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I believe you can guess the CSS rules behind it, don't you?Anyway, here they are:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;.labelBlack {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-family: Geneva, Arial, Helvetica, sans-serif;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #FFFFFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 14px;&lt;br /&gt;}&lt;br /&gt;.inputBlack {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color:#FFFFFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-family: Geneva, Arial, Helvetica, sans-serif;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #333333;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 14px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align: left;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 180px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 1.5em;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 2px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: auto;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -moz-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -webkit-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 2px solid #CCCCCC;&lt;br /&gt;}&lt;br /&gt;.textareaBlack {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color:#FFFFFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-family: Geneva, Arial, Helvetica, sans-serif;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #333333;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 14px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align: left;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 380px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding: 5px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -moz-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -webkit-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 2px solid #CCCCCC;&lt;br /&gt;}&lt;br /&gt;.selectBlack {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color:#FFFFFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-family: Geneva, Arial, Helvetica, sans-serif;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #333333;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 14px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align: left;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -moz-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -webkit-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 2px solid #CCCCCC;&lt;br /&gt;}&lt;br /&gt;.buttonBlack {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color:#FFFFFF;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-family: Geneva, Arial, Helvetica, sans-serif;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #333333;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; font-size: 14px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align: center;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -moz-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -webkit-border-radius: 4px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: 2px solid #CCCCCC;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;/div&gt;Working on a group of rules like the one above, will surely give you full control on how form elements can be effectively displayed.&lt;br /&gt;I repeat: I don't believe you need anything more.&lt;br /&gt;Just one last note: border radius is not working on Internet Explorer 7 &amp;amp; 8. In those case you might want to use &lt;a href="http://thewebthought.blogspot.com/2011/07/css3-use-css3-in-ie-6-8-with-pie.html"&gt;CSS Pie&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;That's all for today. Let me know your thoughts.&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-3979753010285658320?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=wT3DM67LlCY:vMJA9a0lYxo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=wT3DM67LlCY:vMJA9a0lYxo:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=wT3DM67LlCY:vMJA9a0lYxo:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/wT3DM67LlCY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/3979753010285658320/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/11/css-style-your-form-elements.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/3979753010285658320" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/3979753010285658320" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/wT3DM67LlCY/css-style-your-form-elements.html" title="CSS: style your form elements" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/11/css-style-your-form-elements.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-6007436692741412641</id><published>2011-11-18T07:00:00.004+01:00</published><updated>2011-11-18T07:00:02.054+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="compatibility" /><category scheme="http://www.blogger.com/atom/ns#" term="input type" /><category scheme="http://www.blogger.com/atom/ns#" term="HTML5" /><category scheme="http://www.blogger.com/atom/ns#" term="form" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><category scheme="http://www.blogger.com/atom/ns#" term="form validation" /><title type="text">HTML: HTML5 new input types</title><content type="html">&lt;b&gt;HTML5 &lt;/b&gt;introduced some new&lt;b&gt; input types&lt;/b&gt; with better control and validation. When the features will be completely supported by all main browsers, creating forms will surely be easier and faster.&lt;br /&gt;The new types are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;email;&lt;/li&gt;&lt;li&gt;url;&lt;/li&gt;&lt;li&gt;number;&lt;/li&gt;&lt;li&gt;range;&lt;/li&gt;&lt;li&gt;dates;&lt;/li&gt;&lt;li&gt;color.&lt;/li&gt;&lt;/ul&gt;As you can see they are quite interesting. Let's take a tour and see how they work.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Email&lt;/b&gt;&lt;/div&gt;The email input type is meant to receive a valid email address and has automatic validation:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;input type="email"&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;When a non-valid email address is entered, and submit button pressed, a tooltip will ask to insert a valid email address.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;URL&lt;/b&gt;&lt;/div&gt;This input type is used for URLs. The value is again validated upon submission.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;input type="url"&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Number&lt;/b&gt;&lt;/div&gt;In this case, the accepted value will only be numeric. Validation works when the value is submitted.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;input type="number"&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;There are some attributes we can use for the input tag:&lt;br /&gt;&lt;i&gt;max &lt;/i&gt;= the maximum number accepted;&lt;br /&gt;&lt;i&gt;min &lt;/i&gt;= the minimum number accepted;&lt;br /&gt;&lt;i&gt;step &lt;/i&gt;= the accepted step between numbers (e.g. step="3" means that only numbers with a step of 3 will be accepted - -6, -3, 0, 3, 6 etc.);&lt;br /&gt;&lt;i&gt;value &lt;/i&gt;= the default value.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Range&lt;/b&gt;&lt;/div&gt;Range type accepts only a range of numbers. It seems absolutely identical to the number type, however it is not. Infact it will appear as a slider bar&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;input type="range"&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;Range has the same attributes as number (max, min, step, value).&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Dates&lt;/b&gt;&lt;/div&gt;Dates are quite interesting. It is infact possible to automatically create date pickers for input boxes. The actual different types are:&lt;br /&gt;1) date = for complete dates (day, month, year);&lt;br /&gt;2) month = for month and year;&lt;br /&gt;3) week = for week and year;&lt;br /&gt;4) time = for time (hour and minutes);&lt;br /&gt;5) datetime = for time and date (hour, minutes, day, month, year) - UTC time;&lt;br /&gt;6) datetime-local = the same as datetime but local time.&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;input type="date"&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Color&lt;/b&gt;&lt;/div&gt;Color type should be used when picking colors:&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&amp;lt;input type="color"&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;div style="color: #6fa8dc;"&gt;&lt;b&gt;Compatibility&lt;/b&gt;&lt;/div&gt;As usual, the only problem is compatibility. When will we be able to use the new input types? I don't know.&lt;br /&gt;What we know is that some new types are already available on some browsers. Others have been totally ignored, as of now.&lt;br /&gt;&lt;i&gt;Email &lt;/i&gt;and &lt;i&gt;URL &lt;/i&gt;work on FF 6.0+, Chrome 13+, Opera 11.5+ and IE10.&lt;br /&gt;&lt;i&gt;Color &lt;/i&gt;works only on Opera 11.5+.&lt;br /&gt;&lt;i&gt;Number &lt;/i&gt;is implemented on Safari 5.1+, Chrome 13+, Opera 11.5+ and IE10, while &lt;i&gt;range &lt;/i&gt;is ok on Safari 5.1+ and Opera 11.5+.&lt;br /&gt;&lt;i&gt;Dates &lt;/i&gt;work only on Opera 11.5+ and partially on Chrome 13+ and Safari 5.1+.&lt;br /&gt;&lt;br /&gt;As you can see, it is the usual mess.&lt;br /&gt;Again, when will we be able to use them?&lt;div class="blogger-post-footer"&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6718406939865222936-6007436692741412641?l=thewebthought.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=_Z6IuERRTgs:PKNZTo58qoI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=_Z6IuERRTgs:PKNZTo58qoI:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheWebThought?a=_Z6IuERRTgs:PKNZTo58qoI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheWebThought?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheWebThought/~4/_Z6IuERRTgs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://thewebthought.blogspot.com/feeds/6007436692741412641/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://thewebthought.blogspot.com/2011/11/html-html5-new-input-types.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/6007436692741412641" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6718406939865222936/posts/default/6007436692741412641" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheWebThought/~3/_Z6IuERRTgs/html-html5-new-input-types.html" title="HTML: HTML5 new input types" /><author><name>Marco Del Corno</name><uri>https://profiles.google.com/102057952973039562634</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-L3gewV1Ulmw/AAAAAAAAAAI/AAAAAAAAAF0/wmwN1qd_vyI/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://thewebthought.blogspot.com/2011/11/html-html5-new-input-types.html</feedburner:origLink></entry></feed>

