Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why doesn't this validate?

Status
Not open for further replies.

soniclnd

Technical User
Jan 6, 2005
51
US
i'm doing a css template but when i check it, it doesn't validate.... here's my code:

Code:
* {
margin: 0px;
padding: 0px;
border: 0px;
}

body {
font-family: arial, sans-serif;
text-size: 12px;
}

.center {
margin: auto auto;
}

.logo {
width: 741px;
height: 248px;
position: absolute;
top: 0px;
left: 0px;
background: url(botballlogo.gif);
float: right;
}

.nav {
position: absolute;
top: 250px;
}

.content {
position: absolute;
top: 220px;
left: 200px;
}

when i check it the validator gives me these errors:

Errors
URI : file://localhost/TextArea

* Line: 9 Context : .logo

Parse Error - -moz-background-clip: initial;
* Line: 9 Context : .logo

Parse error - Unrecognized : -moz-background-origin: initial;
* Line: 9 Context : .logo

Parse error - Unrecognized : -moz-background-inline-policy: initial;
* Line: 11

Parse Error - : right; } .nav

can any of you help me?
 
soniclnd-

As far as I know, browser specific style specs such as IE's scrollbar colors and the moz- effects dont validate with w3c.

Robert

Robert Carpenter
"You and I have need of the strongest spell that can be found to wake us from the evil enchantment of worldliness." - C.S. Lewis (The Weight of Glory)

robert (at) robertcarpenter (dot) net
 
That * isn't making any sense to the validator either. Additionally, when you supply a background style, it is good (proper) form to supply a color style as well.

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Umm,

I changed ".logo" to ".blah" and "text-size" to "font-size" and it validated with the W3C validator.

Looky here!

Code:
No error or warning found

To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML.
Valid CSS information

    * * {
          o margin : 0;
          o padding : 0;
          o border : 0 none inherit;
      }
    * body {
          o font-family : arial, sans-serif;
          o font-size : 12px;
      }
    * .center {
          o margin : auto;
      }
    * .blah {
          o width : 741px;
          o height : 248px;
          o position : absolute;
          o top : 0;
          o left : 0;
          o background : url(botballlogo.gif) repeat;
          o float : right;
      }
    * .nav {
          o position : absolute;
          o top : 250px;
      }
    * .content {
          o position : absolute;
          o top : 220px;
          o left : 200px;
      }

No problems with * or not supplying background styles.


Foamcow Heavy Industries - Web design and ranting
Toccoa Games - Day of Defeat gaming community
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
"I'm making time
 
it works now... i did so by specifiying more attributes to the background
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top