Simple PHP Templates

This is a simple PHP based template where the variable fields in the template are enclosed in double parenthesis and the actual values are passed in a single array. The entire substitution happens in one step using preg_replace. If your template string is long, you can either put that in a separate PHP file (and… continue reading

AngularJS Form Validation

Today we’ll be looking at at the ways that Angular helps us do form validations. We’ll be talking more on forms using Angular. Don’t worry though, that article is not required. We’ll focus on client side validation and using the built in Angular form properties.

Drop Caps by CSS3 and cross-browser ways

Drop Caps Cross-browser way (extra markup) Just wrap the first character of the paragraph in a span, then target the span with CSS and style away. <p> <span class=”firstcharacter”>L</span> orem ipsum dolor sit amet, consectetur adipiscing elit. Mauris tristique lobortis orci ac lacinia. Fusce eu purus eget diam vehicula auctor nec eu elit. Morbi consequat… continue reading

CSS Counters drag-and-drop demonstration

CSS counters allow you to number items in CSS using dynamic numbering, similar to how an ordered list works. But CSS counters are quite different. This feature uses a pseudo-element combined with some counter-specific CSS to append/prepend a dynamic “count” to a specified set of elements.