No, you misunderstand... Cascading is from one defined element/class/id to another. When you define a property that has already been declared in the
same element/class/id, you're redeclaring it. Since the
border attribute is a short-hand method for using border-width, border-style, and border-color, specifying any of those again is redeclaring it --- not using the cascade.
Since you made me double check myself to be sure I was right, here's the code:
CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>test</title>
<style>
body{
border: 2px solid #000;
border-top: 0;
border-bottom: 0;
}
</style>
</head>
<body>
Test the border problem thingy.
</body>
</html>
...and the resulting W3C's CSS Validator results:
QUOTE
Warnings
URI : file://localhost/webdeveloper__1154982860829.css
* Line : 5 (Level : 2) Redefinition of border-top-width : body
* Line : 6 (Level : 2) Redefinition of border-bottom-width : body
Valid CSS information
* body {
o border : 2px solid #000;
o border-top : 0;
o border-bottom : 0;
}
...so, although it's valid, it does throw an error (ok, a warning, I still think a warning IS an error). The 'o' before the CSS properties, it was a bulleted list from the validator.