Internet Explorer 8 (IE8) web-browser does not support the
getElementsByClassName() DOM-method, but supports
querySelectorAll() that allows to solve the same task without using any JS libraries.
Marat Tanalin on web-development and IT
Internet Explorer 8 (IE8) web-browser does not support the
CSS Cascading and Inheritance Level 3 specification that has recently reached the CR (Candidate Recommendation) status contains two important new features.
unsetvalue allows to reset value of a CSS property.
- Shorthand property
allallows to set a value to all CSS properties supported by browser without need to list them explicitly.
Using both features in conjunction should allow to easily and gracefully reach the result currently reached via multiline “reset” stylesheets.
Gaps in sprites (+)
To speed up downloading small images like icons, they are often united into one image called sprite. This minimizes delays caused by waiting for server response for each of image files.
However using sprites is connected with some nuances. One of most common errors is placing images in sprite without gaps between them.
For nearly 15 years, I’ve called myself a web developer.
In those 15 years I’ve had job titles like Technical Architect, Project Manager, Lead Designer, and even Director of Technology. Underneath it all, though, I just built web sites. Ask me what I did and I’d tell you that I was a web developer.
Over a month ago, I took a new title: Product Manager.
I’m not coding anymore. And I’m feeling a little uneasy about it.
Why does this make me uneasy? Because I’ve always shared my experience as a web developer and I suddenly find myself wondering how long I can continue to do that.Jonathan Snook
Sometimes there is a need to style a link as a standard button. This is typically undesirable; however, if we have the task anyway, then it makes sense at least to do this properly.
People of Mozilla — company developing Firefox web-browser — on switching Opera to WebKit (Chromium) layout engine and dropping development of Opera’s own engine — Presto.
matchesSelector(). It allows to determine if an element matches specified CSS selector. It is one of key features allowing to go without libraries like jQuery to bind live event-handlers conveniently.
Internet Explorer supports
msprefix) as of version 9 only. But what to do with IE8 which we are still forced to support in many cases? Fortunately, there is a compact solution that does not need any third-party libraries.
But if advanced features of jQuery are unneeded for a specific task or project, Sizzle can be used as a standalone library, resulting in 5-6-x faster loading compared with jQuery.
If you have the misfortune to work on a huge, poorly developed site where you will never have permission to refactor the templates and CSS according to common sense and best practices, you may have to rely on class names and avoid descendant selectors and ids.
But under almost any other circumstance, properly used ids with descendant selectors are preferable because more semantic and lighter in bandwidth.
As for descendant selectors, in a site not designed by 100 monkeys, it is safe to assume that elements within an id’d div or HTML5 element will be visually styled in ways that are compatible, and that those same elements may be styled differently within a differently id’d div or HTML5 element.
There is nothing wrong with id when it is used appropriately (semantically, structurally, sparingly). There is plenty wrong with the notion that class is always preferable to descendant selectors and semantic, structural ids.L. Jeffrey Zeldman
IE10 sends a “Do Not Track” signal to Web sites by default.
The Sixth IE10 Platform Preview
…thus making Do Not Track (DNT) request header in fact useless. Entire point of DNT is exactly that it is informed choice of user, and noway a default setting that most users do not know of at all.
Consequently, DNT will stop perform a function of informing website about intent of user, and web developers will almost certainly stop taking DNT into account.
From a learning perspective, a validator is like the pedantic teacher who loves their red pen: some of its feedback is quite useful, but the remainder is likely to confuse and intimidate a newcomer.
Atul Varma (Mozilla)
In Firefox 4, statusbar has started to show at the right instead of at the left of browser window if search bar is opened. (Statusbar is used, for example, to display URL address of a currently hovered link.)
As a result, statusbar is shown now at the left, now at the right, and fundamental usability rule has become violated: specific element of interface should always be placed on one and the same place.
Those annoyed by this Firefox bug can manually add following CSS rules to
chrome/userChrome.cssfile in Firefox profile directory or with Stylish extension to fix the issue.
A modern method to deny loading pages of your site into frame (
IFRAMEHTML-element) on another site is using of
X-Frame-OptionsHTTP-server response header.
The feature is supported by all modern browsers including IE8+.
HTML5 spec editor Ian Hickson has removed the
TIMEelement from the HTML5 spec. This element allowed to markup dates (e.g. article publication date) usably and intuitively and was one of a few really semantic new features of HTML5:
As a “replacement”, he offers new common
DATAelement intended to markup any abstract data and having much more cluttered syntax based on microdata.
Next step of Ian will probably be dropping all semantic elements (headers, paragraphs, lists, etc.) and their replacement to the great unified
On republication of materials from other sites, it’s a rule to specify clickable link to source.
Link to home page of source site is generally useless for user and makes sense only from the viewpoint of search engine optimization of source site.
On the contrary, full direct link to exact page containing source material itself is useful and usable for user.
Dynamic programming languages in general and PHP in particular allow specifying default values for parameters of functions and methods.
The values can be specified directly in parameter list, but then, to skip a parameter when calling function, programmer is forced to recall what is default value for skipped parameter, or open documentation for the specific function. This is not enough usable in practice, so we can act in a different way.
Formerly, to position background with an offset from right or bottom edge of an HTML element, we has been forced to embed empty space into image itself since CSS had no native support for such feature.
Situation is changing thanks to CSS3 “Backgrounds and Borders” module providing updated syntax for
background-positionthat allows specify arbitrary offsets from right and/or bottom edges of element.
border-radius generator is author’s online tool to automatedly generate CSS-code for rounded corners of HTML-blocks via CSS3-properties of
- generating minimal sufficient CSS-code with identical radiuses taken into account;
- ability to specify radius for each corner separately from common radius for all corners;
- choosing exact set of needed vendor prefixes;
- disableable aligning of properties by colon;
- built-in workaround for issues related to rendering rounded corners.
In browsers other than Firefox, there are issues related to rendering elements that have
border-radius. But there is a workaround applicable in most cases.
Though IE7 formally supports both
:first-childCSS-selector and sibling combinator (
+), there is a limitation: if HTML code has a comment in place where browser expects to see an element according to CSS selector, IE7 will not apply styles to actual element located next to the comment.
display: tablefamily in IE6 and IE7 that do not support them natively.
It’s possible to encounter naming conflicts when using CSS classes. This is most probable as for classes intended to be used exactly in certain context.
Coincidence of names of local classes with names of global ones leads to potentially undesired inheriting of styles of global classes by local classes that have same names. However there is an easy way to avoid this.
Author’s article “Vertical reordering of blocks with CSS” tells about a technique thats allows to vertically reorder blocks with same result as if their order in HTML-code was exactly the same as visual order.
Canonical form of DOCTYPE declaration in HTML5 documents is following:
DOCTYPEis in uppercase, and
htmlis in lowercase.