Is it possible to apply CSS to half of a character?

Now on GitHub as a Plugin! Feel free to fork and improve. Demo | Download Zip | Half-Style.com (Redirects to GitHub) Pure CSS for a Single Character JavaScript used for automation across text or multiple characters Preserves Text Accessibility for screen readers for the blind or visually impaired Part 1: Basic Solution Demo: http://jsfiddle.net/arbel/pd9yB/1694/ This … Read more

How do I disable the resizable property of a textarea?

The following CSS rule disables resizing behavior for textarea elements: textarea { resize: none; } To disable it for some (but not all) textareas, there are a couple of options. You can use class attribute in your tag(<textarea class=”textarea1″>): .textarea1 { resize: none; } To disable a specific textarea with the name attribute set to … Read more

How do you disable browser autocomplete on web form field / input tags?

Firefox 30 ignores autocomplete=”off” for passwords, opting to prompt the user instead whether the password should be stored on the client. Note the following commentary from May 5, 2014: The password manager always prompts if it wants to save a password. Passwords are not saved without permission from the user. We are the third browser … Read more

How can I change an element’s class with JavaScript?

Modern HTML5 Techniques for changing classes Modern browsers have added classList which provides methods to make it easier to manipulate classes without needing a library: document.getElementById(“MyElement”).classList.add(‘MyClass’); document.getElementById(“MyElement”).classList.remove(‘MyClass’); if ( document.getElementById(“MyElement”).classList.contains(‘MyClass’) ) document.getElementById(“MyElement”).classList.toggle(‘MyClass’); Unfortunately, these do not work in Internet Explorer prior to v10, though there is a shim to add support for it to IE8 … Read more

Set cellpadding and cellspacing in CSS?

Basics For controlling “cellpadding” in CSS, you can simply use padding on table cells. E.g. for 10px of “cellpadding”: td { padding: 10px; } For “cellspacing”, you can apply the border-spacing CSS property to your table. E.g. for 10px of “cellspacing”: table { border-spacing: 10px; border-collapse: separate; } This property will even allow separate horizontal … Read more

tech