John Cox

Blogs · @wyome

Tagged css-tricks · everything

Textarea Tricks | CSS-Tricks

This article collects nine practical tips for styling and enhancing textarea elements with CSS and jQuery, ranging from visual tweaks like background images and removing the focus glow to functional improvements like auto-resizing textareas to fit their content and adding cross-browser placeholder text. It demonstrates solutions to common textarea quirks across different browsers, such as removing unwanted scrollbars in Internet Explorer or the resize handle in WebKit browsers, along with code examples for each technique.

Permalink

Relevant Dropdowns: Polyfill for Datalist | CSS-Tricks

This post explains how to use HTML5's `datalist` element to create autocomplete text inputs with optional values, then provides a polyfill for browsers lacking support at the time (Chrome, Safari, and older IE). The polyfill uses Modernizr and jQuery to simulate the dropdown behavior with keyboard navigation and proper positioning across older browsers, including a special workaround for Safari's false positive support detection.

Permalink