While the contents of expr() is processed by javascript, the CSS definition of expr() is very simplistic. It really only allows for the form "NAME = VALUE OPER VALUE", where VALUE is a string or number and OPER is one of '+', '-', '*', or '/'. The '?' is not legal in that context.
Since this is an ie workaround, I'd be inclined to put it into its own CSS file and conditionally include that. Then you should be able to validate everything but that file and hopeful it will be small enough to check manually. See here for conditionally including CSS files: http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx dcm On Oct 24, 10:28 am, fduppa <[EMAIL PROTECTED]> wrote: > Hi, I'm trying to validate my CSS layout sheet against the W3C > validator. > > I didn't make the CSS file by myself, i'm just trying to get the page > ready to start with my project. > > When I run the validator i receive this error message: > > URI :http://skuld.sourceforge.net/css/layout.css > > 25 #content, #width Value Error : width Lexical error at line 25, > column 54. Encountered: "?" (63), after : "" ? "1000px" : "94%"); > 26 max-width Value Error : width Parse Error max-width: 1000px; > 27 margin Value Error : width Parse Error margin: 0 auto; > 28 margin Value Error : width Parse error - Unrecognized } > > and it's mentioning this part of my css file > > 23 #width { > > 24 /* max-width hack for IE since it doesn't understand the valid > css property */ > > 25 width: expression(document.body.clientWidth > 1000 ? "1000px" : > "94%"); > > 26 max-width: 1000px; > > 27 margin: 0 auto; > > 28 } > > As it is a "hack" so that the page displays properly in IE, I decided > to comment entirely from line 22 up to line 29, so that piece of code > does not execute. As a result, the page doesn't look "centered" but it > looks stick to the left side of the screen (ugly!). I'm only intersted > in getting the page working under Firefox, not IE, because the project > is software for the GNU/Linux platform and IE is a windows only app, > so it is really rare to get a windows user checking that. > > What modifications should i do to the code in order to get it working > properly? Thanks in advance :) --~--~---------~--~----~------------~-------~--~----~ -- You received this because you are subscribed to the "Design the Web with CSS" at Google groups. To post: [email protected] To unsubscribe: [EMAIL PROTECTED] -~----------~----~----~----~------~----~------~--~---
