css validation faulty?

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
Homy
Posts: 5
Joined: Thu Sep 21, 2006 3:30 pm

css validation faulty?

Post by Homy »

Hi, thank You for making a very good software.

I ran in to a problem using the inbuilt CSS (2) validator.

Code: Select all



/* Conditional list look, each first #statement to be repeated in BODY tag of relevant page as ID. */
/* Second #statement to be implemented in to link as link=ID */
#services #services_on,
#copyright #copyright_on,
#index #index_on,
#articles #articles_on,
#information #information_on ,
#contact #contact_on
{
background-image: url(eye.gif);
padding-left: 1.6em;
}
That gives me a parsing error, despite being correct and despite running it through the online css validator with no warnings.

Any ideas as to why?
Last edited by Homy on Fri Sep 22, 2006 9:21 am, edited 1 time in total.
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

I've just pasted that into a new CSS document, and checked it, and it returns 0 errors, and 0 warnings.

What application / version are you using?

Also, shouldn't there be an ID or class identifier before the opening curly bracket?


PS: It should be 'faulty', not 'fawlty' - have you been watching too much 'Fawlty Towers' ?! :wink:
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Post by syrupcore »

chris, that whole string of IDs are the IDs before the opening bracket. you can legally leave 100231 lines between the two if you want. it would be damn ugly code though. :D

I also get 0 errors and 0 warnings with any of the built in CSS validators. Honestly, I didn't even know that thing was there until this post so thank you Homy. I'm on 7.1.0.67.
Homy
Posts: 5
Joined: Thu Sep 21, 2006 3:30 pm

Post by Homy »

I better paste the entire sheet...
I based it on the three-column layout template available in Webuilder.

Code: Select all

body {
background-color: transparent;
}


img {
   border-width: 0px;
   padding: 1px;

}

#frame {
  width: 750px;
  margin-top:0px;
}

/* default navigation list look */
ul.nav {
list-style-type: none;
padding: 0;
margin: 0;
}
/* default list look */
li.nav {
background-image: url(bullet_go.gif);
background-repeat: no-repeat;
background-position: 0 .5em;
padding-left: 1.2em;
padding-top: .5em;
}

/* Conditional list look, each first #statement to be repeated in BODY tag of relevant page as ID. */
/* Second #statement to be implemented in to link as link=ID */
#services #services_on,
#copyright #copyright_on,
#index #index_on,
#articles #articles_on,
#information #information_on ,
#contact #contact_on
{
background-image: url(eye.gif);
padding-left: 1.6em;
}

#maincontent {
  position: absolute;
  left: 145px;
  top: 90px;
  text-align: justify;
  width: 480px;
  background-color: #f5f5f5;
  padding-top: 1px;
  padding-left: 3px;
  padding-bottom: 3px;
  padding-right: 3px;
  border-right-color: #00CCFF;
  border-right-width: 1px;
  border-right-style: solid;

  margin: 0px;
  font-family: Verdana;
  font-size: smaller;
}

#topcontent {
  width: 750px;
  background-color: transparent;
  border-width: 0px;
  border-style: dashed;
  border-color:  #FFCC66;
  padding: 0px;
  margin: 0px;
}

#leftcontent {
  position: absolute;
  left: 5px;
  top: 90px;
  width: 130px;
  background-color: #ffffff;
  border-width: 1px;
  border-style: dashed;
  border-color: #CCCCCC;
  padding-top: 1px;
  padding-left: 3px;
  padding-bottom: 3px;
  padding-right: 3px;
  font-family: Verdana, Tahoma;
  font-size: .7em;
}

#rightcontent {
  position: absolute;
  top: 90px;
  left: 640px;
  width: 90px;
  background-color:#ffffff;
  border-width: 1px;
  border-style: solid;
  border-color: orange;
  padding-top: 1px;
  padding-left: 3px;
  padding-bottom: 3px;
  padding-right: 3px;
  margin: 0px;
  font-size: .75em;
  font-family: Verdana, Tahoma;
}
#international {
  position: absolute;
  background-color: transparent;
  border-width: 0px;
  padding: 0px;
  margin: 0px;
  left: 640px;
  top: 60px;
  width: 100px;
  font-family: Arial, Verdana, sans-serif;
  font-size: x-small;
  }
h1 {font-size:16px;font-family: sans-serif, Verdana, Tahoma;}
h2 {font-size:15px;}
h3 {font-size:14px;}
h4 {font-size:13px;}

/* End of Stylesheet  */
My boss got this for me recently and its version 7.2.0.68.
There are still a couple of warnings in it but its all very alpha for a new site. Still it bugs me that Webuilder gives this error.

:D You are welcome syrup...

OMG! :shock:

I just ran that through my regular CSS editor on another PC and that gave:
Image

Thats Topstyle 3.10

...and the online W3C checker only gave a few warnings...
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

This could be a bug, or an issue with the CSS parsing - will have to wait back till Karlis can cast his eye over it.

Its essentially moaning about the background image. Remove this line, and it'll be fine:
background-image: url(eye.gif);

I don't know if its because eye.gif doesn't exist, or thats invalid or what, but remove it, and you don't get that parsing error. However, it then moans about orange not being a proper colour. Change that, and you get 0 errors, and 0 warnings.


Hope that helps.
Homy
Posts: 5
Joined: Thu Sep 21, 2006 3:30 pm

Post by Homy »

Well of course the warning about eye.gif are there. The file is not present.
And orange as well, should be hex of course. Disregard them.
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Post by syrupcore »

I'm not sure anything is wrong here. The only error I'm getting is the border-color 'orange'. There are warnings when checking against css level 1 (which didn't really support positioning) but even there, there is only the one actual error.

I'm now using 7.3.0.69.

font-family: sans-serif, Verdana, Tahoma; will let the browser choose it's default sans-serif first. you really want: font-family: Verdana, Tahoma, sans-serif; So it will pick verdana first, if available, then tahoma then it's default. if you don't include the sans-serif at all (like in most of the other font declarations) it will choose it's default font if the one you list is not available and it's default font is usually a pretty ugly serifed font. ick.

and, you didn't ask about this and might already know but you can reduce your code a lot with some simple short hand.

Code: Select all

  border-width: 1px;
  border-style: dashed;
  border-color: #CCCCCC;
  padding-top: 1px;
  padding-left: 3px;
  padding-bottom: 3px;
  padding-right: 3px;

Becomes

  border: 1px dashed #CCCCCC;
  padding: 1px 3px 3px 3px; /*(top right bottom left... clockwise from top)*/
Will
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

Homy wrote:Well of course the warning about eye.gif are there. The file is not present.
And orange as well, should be hex of course. Disregard them.
You forgot 'thanks', so I'll forget the 'you're welcome'. :roll:
Syrupcore wrote:I'm not sure anything is wrong here.
If you paste the second lump of CSS, do you get an error? (see parsing error at bottom...)
Image

Something is weird, as a simple test throws up a bizarre error:
Image

but swop those around, and it parses fine:
Image

Fweaky...
Homy
Posts: 5
Joined: Thu Sep 21, 2006 3:30 pm

Post by Homy »

Hmmm, strange stuff...

...and THANKS!
I did not mean to be rude...:wink:

Well, I am still rewriting that css, sorting things out and adding stuff.
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

Will fix this in one of the next updates...
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Post by syrupcore »

chris, that is fweaky. I pasted that second snippet in (all of the code from Homy's second post) and still only get an error on #rightcontent because orange is not a valid color. that's it. totally wierd. poor Karlis.

:)

Will
Gatis
Blumentals Software Developer
Posts: 545
Joined: Sun Mar 05, 2006 12:30 am
Location: Latvia

Post by Gatis »

I have tried to reproduce this bug but no luck.
It might have been fixed in one of the last updates as there were some fixes regarding this functionality.
Please, if anyone still has problems, let me know.
Thanks!
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

Me too could not reproduce this. Maybe it depends on editor settings or is already fixed.
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Post by syrupcore »

I was never able to reproduce it.
Post Reply