John Cox

Blogs · @wyome · Now · Shelf

Tagged tutorial · everything

Interesting

Font sizing with rem - Snook.ca

The article compares three CSS font-sizing approaches: pixels (px), which offer consistency but prevent text resizing in older IE versions; ems, which allow resizing but create compounding issues in nested elements; and rem units (new in CSS3), which size relative to the root element rather than the parent, eliminating the compounding problem while maintaining resizability in modern browsers. The author recommends rem with px fallbacks as the optimal solution, allowing both accessibility and cross-browser compatibility.

Permalink

Dan Rodney's List of Mac OS X Keyboard Shortcuts & Keystrokes

This is a comprehensive reference guide to keyboard shortcuts for macOS, organized by function (Finder actions, window management, text editing, screenshots, Spotlight, Safari, Mail, and more) and covering versions from Big Sur through Sequoia. It includes both common shortcuts and lesser-known power-user tricks, such as using Command-drag to customize toolbars, Option-click to access hidden Dock menus, and Emacs key bindings that work in certain applications. The guide is designed as a living document that the author continues to update for the latest macOS versions.

Permalink

CodeIgniter Language File Translator

Owen Christian and the author developed a CodeIgniter administration tool that lets translators manage language files through a web interface rather than editing them manually. The tool synchronizes translation keys across multiple language files, supports UTF-8 and embedded PHP code, and includes syntax checking to catch errors before they break the application. It requires setting up a master language file and corresponding empty slave files, then making them writable so the web interface can manage translations.

Permalink

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