Border Colors - see Information below

Pre 2007

Information

You would have thought that all browsers would be the same when it comes to 'border colors' wouldn't you?

If you specify the following CSS :

border-top:1px solid #f00;
border-right:1px solid #0f0;
border-bottom:1px solid #00f;
border-left:1px solid #000;

Then all browsers would look the same.

But not a bit of it. They would all be different.

Let me explain. When does the top border stop being the top and become the right border and similarly the right border become the bottom border and the bottom border become the left border and so on?

Well the answer is it depends which browser you are using.

Just to demonstrate, if I set up a div with the following CSS

#bord {
display:block;
width:1px;
height:1px;
background:#fff;
border-top:1px solid #f00;
border-right:1px solid #0f0;
border-bottom:1px solid #00f;
border-left:1px solid #000;
overflow:hidden;
}

and I magnifiy the result, I would get the results opposite:

Internet Explorer 6

Mozilla 1.5 and Netscape 7

Opera 7.23

Whereas I would have expected all of them to produce something like this

So there you have it, browsers cannot even agree on how to deal with basic 'border colors', and I had hoped to use this method to produce images based on a grid of four pixels (2x2) using the above css but with a height and width of 0px
I had hoped that this would produce a grid like this ~

FAT CHANCE :)



Copyright

You may use this method on your personal 'non-profit' web site without seeking my permission. A link back to CSSplay is always appreciated.

Commercial usage is also permitted without seeking approval, but I would ask that a donation is considered to support my work on CSSPlay.

If you are having problems integrating any of my demonstrations into your website then I now offer a service to fault find and correct any errors that you may have introduced. Please email me for more information.



Please Support CSS play

Please note that if your donation is for a demo/menu then you will need to email me with the url of the demo/menu after making the donation

For more CSS demonstrations I recommend that you visit the Dynamic Drive CSS Library.


Free, practical CSS menus, layouts, and examples

Follow CSS play


Facebook   Twitter   Facebook Fan Page