I recently came across a problem while obtaining the text from an HTML label element, based on the fact that I knew the form element that related to the label. This came about because there are two valid ways to use a label. The first way is to use the “for” attribute on the labelContinue reading “jQuery Get Text While Excluding Children”
HTML5 Page Layout
HTML5 is now just around the corner. I have already tested HTML 5 on a myriad of browsers and with a tiny JavaScript and CSS fix, it works in every major player – so if you are a web developer you need to start thinking about your HTML in a subtly different way. The bigContinue reading “HTML5 Page Layout”
Hayfever Allergy Relief Test
With the onset of what has so far been a rather fantastic bit of Summer weather, hay-fever victims everywhere are locking their doors and windows to prevent pollen infestation. Surely, though, we don’t all need to hide indoors every time the weather perks up a bit? The answer, of course, comes courtesy of the equallyContinue reading “Hayfever Allergy Relief Test”
CSS3 Gradients and Corners
CSS3 is going to bring some awesome new stuff that will combine excellently with HTML5 to give us an absolutely smashing Internet experience. Thing is, it isn’t here quite yet. Despite this, I just can’t wait for all the new features that HTML5 and CSS3 are going to bring. That’s why I converted this websiteContinue reading “CSS3 Gradients and Corners”
Supercharge Your PHP Pages
While working on the Swift Point Content Mangement System project I had the chance to delve deep into the fantastic world of PHP. One aspect of PHP we worked a lot on was optimisation. This went to low level details, such as the difference between single and double quotes, right through to making you webContinue reading “Supercharge Your PHP Pages”
Using CSS Selectors
It has been said about CSS that you can learn it in a day, but it takes years to master. Actually, it isn’t that hard to master if you have the right information to hand. Today I’m just going to dump a load of information on CSS selectors, which is the most common CSS questionContinue reading “Using CSS Selectors”
HTML5 and Skip to Content Links
If you’ve done web development with any focus on accessibility, you will have found yourself creating “skip to” links on your web page. You may have noticed that I have these very links on this website and wondered what they are! The two links, “skip to navigation” and “skip to content” are of little useContinue reading “HTML5 and Skip to Content Links”
JavaScript Short Tags and XHTML
Here is another JavaScript question I was asked yesterday, which was catching out a developer using XHTML and an external JavaScript file. Users of XHTML will be highly familiar with the use of the “short tag” (this isn’t when you sell a load of tags you don’t yet have, speculating that the value of theContinue reading “JavaScript Short Tags and XHTML”
JavaScript Includes and Rewritten URLs
I recently answered a question on a forum about JavaScript includes in ASP.NET MVC and as the question came up again today, I thought I’d share the answer with the world. The issue that people are coming up against is that they have a script include with a relative path to their script file. BecauseContinue reading “JavaScript Includes and Rewritten URLs”
Always Use Those Curly Braces
I write a lot of code in a lot of different languages – but there is one common rule I apply to all of them… when you use an “if” block, always put in the curly braces even if you don’t need them. Many errors are related to violations of this simple style rule. IContinue reading “Always Use Those Curly Braces”