Jul
21st

CSS3 Compliance for IE 6-8 at all Cost.

CSS3 is cool and all web developers would love to use it’s tasty features.  The announced support for CSS3 by such browsers as Opera, Firefox, Safari, Chrome and even IE 9 heats up the interest for this protocol quite a bit, but there’s still an issue of IE 6, 7 and 8.  The fact that IE 9 is not intended to run on XP will probably keep the number of IE 6-8 users high for quite a while.  This is where our discussion of CSS3 could end.  And yet there are efforts to make IE6-8 CSS3 compliant.  Let’s take a look at some of them, many are rather odd.

Continue Reading

Jul
21st

Cross-browser box-shadow for a fixed size block.

In a recent article we’ve discussed creating the box-shadow effect viewable in all browsers with the use of filters.  The method has a number of drawbacks of which the biggest is performance.  Here’s another method that’s aimed at efficiency and performance, though it can only be used on blocks with fixed width and height.

As usual, it’s quite simple for the compliant browsers:

Continue Reading

Jul
16th

Creating a Cross-Browser Box-Shadow.

Creating a Cross-Browser Box-Shadow

Here’s a very simple way to implement the box-shadow in css. Perhaps the idea is too simple and obvious for the esteemed writers of the Internet to ever want to publish it.

First, the compliant browsers:

div {
background: green; /* required for IE */
-webkit-box-shadow: 0px 0px 15px #222;
-moz-box-shadow: 0px 0px 15px #222;
box-shadow: 0px 0px 15px #222;
}

The idea really boils down to applying the shadow filter four times with different directions. This way the shadow wraps around the edges of the container.

Continue Reading

May
5th

CSS. Cross-browser layouts of formatted code.

First, what the article is about. The Internet is full of articles on layouts and programming. Many authors choose to include code snippets on top of text and images. The code in those snippets is formatted one way or another. To make their life easier the authors use various tools like Source Code Highlighter or alike. Everything seems good – the syntax is highlighted, the tabulation is in place, lines are numbered. Yet all such utilities have one bid disadvantage that makes life difficult: tabulation replaces all symbols in the code with spaces. And since most layout editors and programmers use tabs for indentation – copying the snippet into the source code requires additional effort to fix the code hierarchy.

Noting the above, the topic of this article can be rephrased: how to format code in such a manner that copy-pasting it would keep the tab-ed indentation that most people are used to.

Continue Reading