paul bennett

Archive for the ‘CSS’ Category

Safari / Google Chrome / webkit CSS filter

Posted by: Paul on: May 27, 2009

Firefox, Opera, and webkit based browsers (Safari, Chrome) are all purported to be the shizzle when it comes to standards support, but that doesn’t mean they all render the same. This following CSS chestnut will allow you to address any tweaks you need to make for webkit based browsers without affecting any others: @media screen [...]

Opera 9.5 CSS filter

Posted by: Paul on: June 27, 2008

Opera 9.5 is a nice upgrade, but I found that it’s rendering left a few things on one of the sites I look after a little out of whack. Off I went looking for a CSS filter for Opera 9.5 and came up with this gem: @media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0) { [...]

Tags: , ,

CSS2 and CSS3 selectors in jQuery

Posted by: Paul on: April 29, 2008

Along with dom traversal (ala CSS2), you can also use CSS2 and CSS3 selectors in jQuery. For example: lb = $(‘a[rel="lightbox"]‘); will get you all the anchor elements in the dom which have the rel=”lightbox” attribute. This, however: lb = $(‘a[rel*="light"]‘); will get you all the anchor elements in the dom which have the substring [...]

Tags: ,

Opera 8 & 9 CSS filter

Posted by: Paul on: April 28, 2008

Unfortunately, things don’t always render the same across all browsers (never have, likely never will). If, for some reason, you need to tweak things only in Opera 8 and 9, this CSS will do the trick: Not my genius, but I can’t recall where I first found this so I can’t quote the source unfortunately. [...]

test early, test often

Posted by: Paul on: May 10, 2007

wrong: write 100 lines of code, test, spend an hour undoing your typo’s and logic bugs right: write 5-10 lines of code, test, make easy fixes, repeat as often as needed until component is complete.

Develop in more than one browser

Posted by: Paul on: February 1, 2007

One rule I’ve learnt and relearnt over the last 5 years is the need to develop xhtml and css code in more then one browser from the very beginning of a project. Often the temptation for me has been to stick with my development browser (Firefox with the ‘Web Developer Toolbar’ and ‘Firebug’ extensions) and [...]

Internet Explorer 7 CSS filter

Posted by: Paul on: January 31, 2007

CSS improvements in IE7 are a great step forward, but the box model calculation still seems a little wonky. If you do need a filter for IE7 only, use: * + html { } For example, if you wanted a red border on your div, but a blue one in IE7 (for whatever tenuous reason), [...]


Archives

Follow

Get every new post delivered to your Inbox.