Need access to Wikipedia? Add this Wikipedia Lights On Bookmarklet to your browsers bookmark bar, visit a Wikipedia page and then click the bookmark. Oh and you should probably sign this.
- Richard Scarrott1 noun [rich-erd sca-ret]
- 1. A London based Frontend Developer
Whilst I’ve become aware that YUI and others prefer to exploit CSS parser bugs to target specific versions of IE I prefer the use of IE conditional comments. I recognise the former offers the maintenance benefit of having IE declarations within the same rule as standard declarations but it still feels too hacky to me.
I also like the idea, should the day come, that IE support might be dropped; having separate stylesheets would make this satisfyingly easy and wouldn’t result in a handful of redundant declarations interspersed with standard declarations.
With this being said I wanted to sha...
It's all too easy too find CSS builds that don’t adapt to changing font sizes or accommodate varying lengths of textual content. As an example of what I mean try increasing your font size on any of these sites:
As you can see the content quickly spills out of the design. This is a bad practice for two reasons:
- Accessibility - users who are hard of sight and browse the web at larger font sizes are going to have trouble reading the content as it breaks the design.
- Adaptability - even if a build is deve...
JavaScript's onmouseover/onmouseenter event can often be too eager in that it'll fire even if your cursor just incidentally enters an element whilst moving to another area of the page. This is acceptable in the case of button rollover effects or any other unobtrusive actions but when it comes to more consequential actions it can, in some cases, be disruptive to the UX.
I've therefore written a mousestop event using jQuery's relatively un-touted special event API.
I've recently been working on a jQuery carousel script and I've finally found the time to package it up as a plugin for your consumption. It's been used on a number of live projects so it's battle tested and will run in all major browsers including IE6.
UPDATE 09/03/2011: This plugin has now been rewritten using jQuery UI's Widget Factory with a few extra features including autoScroll - https://github.com/richardscarrott/jquery-ui-carousel
It seems almost every project I work on uses 'in-field' form labels where, to conserve space or offer suggestions, the input acts as a label holding a default value which is consequently removed on focus.
I've seen this implemented in a number of different ways, however it's often done so with little thought -- I guess because it seems like a rather trivial task on the face of it.
Some pitfalls I've seen include:
- Writing the focus and blur events for each individual input, often inline *shudder*, where the label string is explicitly declared for each input – this doesn't exactly follow...
IE8 doesn't support the :last-child pseudo selector which is fine -- we’re going to be faffing about with last-child classes in our mark-up for a number of years yet. I’ve just discovered, however, that IE8 fails to honour a supported selector if it is grouped with a second selector containing :last-child. Here’s an example.
Take this HTML:
<ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> <li class="last-child">item 5</li> </ul>
And this CSS:
li {
background:red;
}
li:last-child, li.last-child {
background:blue;
}
You’d expect all list items ...