PDA

View Full Version : Validating CSS from Wordpress


Jason
2005-11-10, 14:50
I've been using Wordpress for some months now and while the W3C validates the XHTML, I have never been able to get it to give me the thumbs up regarding the CSS. In case I had somehow tinkered with the CSS, I uploaded a fresh copy from Wordpress to no avail.
I know there maybe one or two others on here using Wordpress (looks at Chucker) and I just wondered what everyone thinks about this.
In light of the fact that Wordpress have gone to great lengths to make sure the XHTML works correctly, it comes as somewhat of a surprise to find the CSS is a little off the mark.

Regards

Majost
2005-11-10, 23:32
I use wordpress and both my default theme and my custom themes validate without any trouble. Some of them pull up many, many errors, but they are valid code.

I don't know what to say about your .css file. If you want to compare, my default one is at: http://shoup.dyndns.org/wp-content/themes/default/style.css

What errors are coming up?

chucker
2005-11-10, 23:42
I've been using Wordpress for some months now and while the W3C validates the XHTML, I have never been able to get it to give me the thumbs up regarding the CSS. In case I had somehow tinkered with the CSS, I uploaded a fresh copy from Wordpress to no avail.

A URL would help. Also, presumably, you are using the default theme, Kubrick?

I know there maybe one or two others on here using Wordpress (looks at Chucker)

Hi there. ;)

Majost
2005-11-15, 16:36
I use wordpress and both my default theme and my custom themes validate without any trouble. Some of them pull up many, many errors, but they are valid code.

I don't know what to say about your .css file. If you want to compare, my default one is at: http://shoup.dyndns.org/wp-content/themes/default/style.css

What errors are coming up?
Well, would you look at that. I see this thread now that it's at the top of the Programmer's Forum, and realize I made a terrible typo. I meant to say: "Some of them pull up many, many warnings, but they are valid code." Makes a bit of a difference, no?

Oops. :o

Anyhow, like chucker said, if you give us a link to your site, we'd be able to look through it for errors.

Jason
2005-11-17, 18:29
Sorry for the delay, guys. I'm also using the Kubrick CSS.
My CSS validates but it throws up a lot of warnings - I didn't realise this meant the code was still valid.

Nothing to worry about then.

Regards

drewprops
2005-11-21, 09:55
Since when are warnings issued for "not having a background-color with your color"? I had a ton of those that popped up when trying to validate a recent website... obviously I'm ignorant of the specs for CSS validation :(

chucker
2005-11-21, 19:08
Since when are warnings issued for "not having a background-color with your color"? I had a ton of those that popped up when trying to validate a recent website... obviously I'm ignorant of the specs for CSS validation :(

They're warnings, not errors. The rationale is as follows: some people like to use custom stylesheets (Safari offers this under Advanced Preferences), overriding various settings, most notably colors and font sizes. If a color is overwritten, but a background color is not, a part of your page may become unreadable.

Example: you define a color of black. Some user, however, likes reading text white on black, and ends up overriding the color to "white". Since you didn't define a background color, however, the browser inherits something, which could be something bright, even white. White on white is, well, not legible.

Therefore, defining colors in pairs with background colors is strongly encouraged, but not required.

drewprops
2005-11-21, 21:13
Thanks Chucker.
Dan Cederholm can get me to buy his book but he can't force me to remember every lesson. He does an entire exercise on this very subject. I hadn't realized that the validation system delves into that level of detailed consideration. So MUCH to learn....