John Cox

Blogs · @wyome

Tagged tutorial · everything

What is Vertical Align? | CSS-Tricks

The CSS `vertical-align` property aligns inline and inline-block elements vertically, with common values like baseline (default), middle, top, bottom, and text-top/text-bottom determining alignment relative to text or line content. A major source of confusion is that `vertical-align` only works on inline or inline-block elements—it has no effect on block-level elements, making it unsuitable for centering a small div inside a larger one. For table cells specifically, `vertical-align` defaults to middle alignment and works reliably with top, bottom, and middle values, though other values produce unpredictable cross-browser results.

Permalink

Stylish Borders using Quick Mask Mode » Pixelmatortutorials.net

PixelmatorTutorials.net is a resource site offering video and text tutorials for the image editing software Pixelmator, covering techniques ranging from basic collage-making to advanced effects like dodge and burn. The site hosts tutorials for both beginners and experienced editors, with popular video lessons demonstrating practical projects such as placing map imagery onto a hand or combining multiple images into textured collages using layers and blend modes.

Permalink

CSS3 Please! The Cross-Browser CSS3 Rule Generator

This page is a CSS3 reference tool that demonstrates how to implement modern CSS features with proper vendor prefixes for cross-browser compatibility. It provides editable code examples for common effects like rounded corners, shadows, gradients, transitions, and animations, allowing developers to see live previews while experimenting with values. The tool notes that Autoprefixer is now the recommended approach for handling prefixes, making this resource primarily valuable as a historical reference or learning tool for understanding which browsers required specific prefixes.

Permalink

HTML5 Apps: Positioning with Geolocation

This tutorial explains how to implement HTML5 geolocation in web applications, covering the navigator.geolocation API and its two main methods: getCurrentPosition() for one-time location queries and watchPosition() for continuous location tracking. It demonstrates practical implementations including error handling, fallback to IP-based geolocation for unsupported browsers using the YQL library, and displaying results on Google Maps, with code examples throughout showing how to request user permission and access coordinate data like latitude, longitude, and accuracy.

Permalink

CSS Buttons with Pseudo-elements | Codrops

This tutorial demonstrates how to create visually sophisticated buttons using only a single anchor tag by leveraging CSS pseudo-elements (::before) to generate additional visual layers without cluttering the HTML markup. The author presents five progressively complex button examples—from simple beveled effects to divided buttons and buttons with embedded icons—all achieved through creative positioning, gradients, and box-shadows applied to pseudo-elements that respond to the :active state. While acknowledging browser compatibility limitations at the time, the article shows how pseudo-elements can replace old sprite-based techniques for creating polished button effects in CSS alone.

Permalink

10 of the coolest CSS3 and CSS effects | Webdesigner Depot

This article surveys practical CSS3 techniques for creating visual effects and improving web design, demonstrating how CSS3 eliminates the need for image-heavy implementations by offering solutions like gradients, text shadows, and transitions for effects previously requiring Photoshop or jQuery. It covers specific applications including anaglyphic 3D text, text gradients, dripping text effects, stitched borders, CSS sprites, layered elements, and responsive design through media queries, with code examples and explanations for each technique. The piece emphasizes experimentation and community learning while cautioning developers to test techniques across browsers using appropriate vendor prefixes.

Permalink

Regex Tester – RegexPal

This is a regex cheat sheet covering the core syntax for pattern matching: character classes like `\w` for words and `[a-z]` for ranges, anchors like `^` and `\b` for positions, quantifiers like `*` and `{2,}` for repetition, and groups with lookahead/lookbehind for complex matching logic. It's a quick reference for constructing regular expressions across most programming languages.

Permalink

CSS Social Buttons

This resource provides a reusable CSS framework for creating social media icon buttons using background images and combinable CSS classes. It offers multiple customization options including 14 color choices, 7 style variations (flat, circle, glossy, embossed, etc.), and 3 size options that can be mixed and matched, along with instructions for adding custom icons, gradients, and overriding default styles. The solution is cross-browser compatible with CSS3 effects supported in modern browsers and includes a downloadable stylesheet and demo files.

Permalink

CSS3 Pseudo-Classes and HTML5 Forms | HTML5 Doctor

This article explains how to use new CSS3 pseudo-classes to style HTML5 form validation states without JavaScript. It covers styling required versus optional fields, valid versus invalid inputs, number ranges, and read-only versus read-write elements, with practical examples of how to apply visual indicators like asterisks and checkmarks. The piece includes a browser support table showing which browsers (Chrome, Opera, and Safari being the most complete) support these validation pseudo-classes at the time of writing.

Permalink

Automated Deployment of PHP Applications using git | saintsjd

This article provides a step-by-step guide to set up a Heroku-style git-based deployment workflow for PHP applications, specifically WordPress, allowing developers to push code changes from their local machine to a live server with a single git command. The process involves creating a bare git repository on the webserver, cloning it locally for development, and using a git post-receive hook to automatically deploy changes when code is pushed to the server's repository. The author emphasizes security measures like passwordless SSH key authentication and protecting the `.git` directory from public access.

Permalink

C. Gerard Gallant: An Introduction to HTML 5 Web Workers

Web Workers allow JavaScript code to run in separate threads from the browser's UI, preventing long-running scripts from freezing the interface while maintaining DOM access restrictions through message-passing communication. There are two types: Dedicated Workers (linked to their creator, simpler to use) and Shared Workers (accessible by any script from the same origin, more resource-efficient when multiple windows need background processing). The article explains how to detect browser support, create worker instances, and implement two-way communication using postMessage() and onmessage event handlers, with Shared Workers requiring additional port-based connection setup.

Permalink

Interpreted Languages: PHP, Perl, Python, Ruby (Sheet One) - Hyperpolyglot

This reference sheet provides a side-by-side comparison of JavaScript, Python, PHP, and Ruby across multiple programming domains—from basic grammar and variables through advanced features like threads and databases. It covers syntax differences (like how each language defines functions, handles string interpolation, and structures control flow), built-in data types and operations (arrays, dictionaries, mathematical functions), and practical facilities (regular expressions, date/time handling, exception management). The second sheet extends the comparison into areas like file I/O, web functionality, object-oriented programming, reflection, and testing, making it a comprehensive quick-reference guide for developers working across these four languages or learning a new one by comparison.

Permalink