Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Validating the core CSS

Quote Reply
Validating the core CSS
Hi,

I was wondering whether it was possible to know in which pages (and with which elements the) following code was used. At the moment I'm getting validation errors :

Line: 644 Context : .clear

Invalid number : display inline-block is not a display value : inline-block

ref : http://demo.gossamer-threads.com/linkssql/static/luna/luna.css
(this gives the same errors as luna_core.css on vers. 3.0.4)

I'm not sure whether I'm using this and if not I can just delete it.

Thanks,

John
Significant Media
Quote Reply
Re: [Jag] Validating the core CSS In reply to
It's from the luna_core CSS (globals elements)

The
display: inline-block;
is a browser-fix, I think. I'm sure it serves a purpose :-)

See: http://www.quirksmode.org/css/display.html

John
Quote Reply
Re: [gotze] Validating the core CSS In reply to
Hi,

Yes I can understand that there is a 'hack' type reason for using it but the issue is that it is not valid CSS, and thus does not validate through the W3C validation process...

John
Significant Media
Quote Reply
Re: [Jag] Validating the core CSS In reply to
That particular line IS valid CSS (although it's CSS 2.1: http://www.w3.org/TR/CSS21/visuren.html#display-prop). Would you rather have 'w3c validation' or browser compatibility?

Adrian
Quote Reply
Re: [brewt] Validating the core CSS In reply to
Adrian,

I'm not really sure that is the most appropriate answer, especially when I asked you where this code was used, to check I'm actually using it.

The W3C validation system is regarded by many as a testing point. It is true that using other validation systems may have your CSS file passing validation. However it's pretty obvious in view of the fact that CSS 2.0 was basically nuked and that they have gone back to the drawing board on CSS 2.1 that putting forward code that is part of 2.1 as a high browser compatibility point isn't the best argument to come up with.
For the sake of the discussion however I agree that real browser compatibility is more important than theoretical validation of CSS code. The W3C provide recommendations not rules and sites like csszengarden do stress in their requirements :
"We would like to see as much CSS1 as possible. CSS2 should be limited to widely-supported elements only."
So I suppose that your CSS 2.1 code widely-supported by browsers for you to ask the question you did ?

Anyway, if you could please let me know which template(s)/page(s) .clear is used on so that I can see if it is even something I use ?

Thanks,

John
Significant Media
Quote Reply
Re: [Jag] Validating the core CSS In reply to
The clear class is used in all of the templates as it is used to clear floats (which is required for the core design). The purpose of that line is for compatibility with IE/mac. This is a very popular/common chunk of CSS: http://www.positioniseverything.net/easyclearing.html and doesn't cause any issues with other browsers.

Adrian
Quote Reply
Re: [brewt] Validating the core CSS In reply to
Thanks for your response Adrian and Sorry.

I'd like to say I'm sorry here since I have, through your reference url here, been able to fix an issue that was driving me mad on IE for Mac that seems to account for less than 0.5% of users at the most from what I've seen.

There .clear code (hack) that you refer to has got me fixing code for IE5 for Mac. BTW I don't have a mac with either OS 9 or above, I've been using a great site that gives you full page screenshots of how Mac and several other platforms render my pages in different browsers (check it out here http://www.sitevista.com/demo.asp flash video), resolutions, sizes etc.

I'll post a message in chit chat about why I chose them (not just because they're the cheapest).

So once again thanks for taking your time to explain this to me because it sure helped me out without me realizing Cool

Just another indication of how thorough GT is without many of us realizing !

Cheers,

John
Significant Media
Quote Reply
Re: [Jag] Validating the core CSS In reply to
There's quite a few other resources that positioniseverything.net has that are really useful. Check out the Explorer Exposed link for a list of some of the common IE CSS bugs. Luckily most of them have some sort of hack to get around them.

Adrian
Quote Reply
Re: [brewt] Validating the core CSS In reply to
Hi Adrian,

I'll take a look, have you given some thought to creating a CSS forum yet BTW. I'm sure that this and other resources would sit happily together in a specific forum. I know that I have some interesting experience with CSS and I know others do to, without gearing solely towards providing answers to Links users it would be interesting to provide links to useful sites and examples, especially in view of the fact that other GT products will be moving towards CSS versions...

Thanks, John
Significant Media
Quote Reply
Re: [brewt] Validating the core CSS In reply to
I recently read that IE7 will fix a lot of CSS bugs and will break a lot of the presently used hacks.
Quote Reply
Re: [Hargreaves] Validating the core CSS In reply to
Yes I had read similar indications that IE7 might be a nightmare for CSS coders around the globe.
I'm not really sure even when reading articles from guys who are called CSS gurus which is the best way to deal with differences in browsers whether it's a) to have hacks in one file or b) to have separate files per buggy browser.
I have chosen the later (and there are most probably more than a) and b) solutions) but I'm hoping that this approach will protect me a bit if the sky falls in on us with IE7 Blush...

Time will tell !

I suspect that microsoft will have some other unwanted surprises for us... I hope for their sake that it doesn't turn out to be a complete fiasco like with Netscape, where it was so bad that people turned to other browsers...

John
Significant Media
Quote Reply
Re: [Jag] Validating the core CSS In reply to
if you want to be able to see 'This document validates as CSS!', just change the validator url to validate 2.1 :

http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=2&uri=http://www.someurl.com

nobody will notice... Wink
Quote Reply
Re: [booyah] Validating the core CSS In reply to
Hi Booyah,

Nice trick, thanks for the heads up ! Smile

John
Significant Media
Quote Reply
Re: [Jag] Validating the core CSS In reply to
Hi Jag:

A solution to many of the 'problems' with ie6 etc and their non-conformance to standards can be found here:-

http://dean.edwards.name/IE7/

This actually argues against using hacks/fixes etc as it will create additional problems with ie7 is finally released. One drawback of course is the above is a JavaScript solution, but I have tested it extensively and it solves almost all of the problems with ie6 (and below) and non-compliance with standards.


Regards,


Clint.

--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] Validating the core CSS In reply to
Hi Clint,

Thanks, just had a read, interesting stuff there. I always find the whole hack / filters versus 'what other solution ???' very amusing. I often seem to come across purists that say you should only use valid code etc and never use hacks and when you look at their web sites (if they ever create web sites) the just never seem to be very pretty. Which obviously makes the whole argument on don't use hacks easier since many critics never innovate in the designs, staying simple and boring.

As you can see in this post I was stuck on getting my CSS validated but as Adrian pointed out the main idea is to get your pages displaying properly in browsers as opposed to them not displaying properly in all browsers but you've got a nice seal of validation from W3C...

But most of all I'm just wondering how well IE7 will do compared to FireFox in following W3C recommendations. If they decide to do it their own way disregarding present common practice in web design then I'd love to see more an more designers deciding to take the same position with regards to IE7 and say well I'm not re-designing all my site just for you !

John
Significant Media
Quote Reply
Re: [Jag] Validating the core CSS In reply to
Note that that dean edwards ie7 is just some javascript that fixes various ie bugs, the microsoft ie7 release will fix various bugs, but it's important to note that they aren't the same thing.

Adrian
Quote Reply
Re: [brewt] Validating the core CSS In reply to
Hi Adrian,

Yes hopefully it will fix bugs as you say and not create more bugs in the process !

John
Significant Media
Quote Reply
Re: [Jag] Validating the core CSS In reply to
Some nice info here:

http://blogs.msdn.com/ie/