Thickbox Validation Error
11th September 2009
WordPress ships with the Thickbox webpage UI dialog widget which I used in a recent post to showcase a website design. When I validated the blog I got errors for markup & CSS. When this kind of thing happens it’s both irritating & interestingly challenging at the same time.
There are some fixes that I came across but they either didn’t initially work or required me to install a WordPress plugin.
The markup was failing on:
?keepThis=true&TB_iframe=true&height=400&width=600
in an href attribute on the end of the URL.
The WordPress Manage Theme page in the admin panel uses ThickBox to preview themes. I validated that page and it passed. Examining the code I saw that instead of the ampersand a semi-colon was used. After making the change in my code the blog passed the markup validator.
The CSS was failing in two areas. The Thickbox CSS file contains IE6 specific CSS hacks and valid -moz rules that are CSS3 (W3C only validates CSS2.1). I put the IE6 specific CSS into a separate stylesheet and decided to leave in the -moz rules.
For the time being I’ve removed the W3C CSS validator link at the bottom of my website to avoid any possible confusion as I do like to create websites that have valid markup and CSS.
