Forum Moderators: open

Message Too Old, No Replies

FireFox and CSS

When is this junk browser ever going to parse CSS?

         

texasjim

5:50 pm on May 17, 2009 (gmt 0)

10+ Year Member



I'm tired of having to scale back to FireFox's limited CSS ability. I hope more folks will do what I'm doing: encourge my customs and Web site visitors to download IE, a more intuitive browser by orders of magnitude.

Baruch Menachem

6:12 pm on May 17, 2009 (gmt 0)

10+ Year Member



I find the opposite to be true. Or you missed the date of your post by 47 days.

I really like the help firefox gives in showing parse errors on CSS and everything else. My site works better everywhere because of Firefox's really helpful tools

texasjim

6:39 pm on May 17, 2009 (gmt 0)

10+ Year Member



I'm adhering to strict W3C/CSS2 standards. Namely TD style atributes:

TD.list a {
text-transform: uppercase; font-size: 11px;
line-height: 22px;
font-weight: bold;
text-decoration: none;
font-family: verdana;
color: #FF5B00;
border-bottom: 1px solid #ACA899;
border-left: 3px solid #ACA899;
padding-left: 5px;
height: 18px;
width: 195px;
}

TD.list a:hover {
background: #ACA899 ;
color: #2F2F2F ;
text-decoration: none;
border-bottom: 1px solid #000000;
border-left: 3px solid #3c3c3c;

IE gets it; Moz doesn't.

Easiest solution: a link on "Use FireFox?" and take them to an IE download page. I think the sooner that the FF-faithful stop being apologists for Moz browsers and demand some performance on their claims, the better FF will get as well as the experience FF browser users enjoy.

For now, I'm calling a turd and turd.

My $0.02,

Jim

tedster

7:14 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just tested that set of rules in Firefox 3.0.10 and IE 8.0.6 with this code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
<title>Test Case</title>
<style type="text/css">TD.list a {
text-transform: uppercase; font-size: 11px;
line-height: 22px;
font-weight: bold;
text-decoration: none;
font-family: verdana;
color: #FF5B00;
border-bottom: 1px solid #ACA899;
border-left: 3px solid #ACA899;
padding-left: 5px;
height: 18px;
width: 195px;
}
TD.list a:hover {
background: #ACA899 ;
color: #2F2F2F ;
text-decoration: none;
border-bottom: 1px solid #000000;
border-left: 3px solid #3c3c3c;</style>
</head>
<body>
<table>
<tr>
<td class="list">
<a href="#">Go Home</a>
<br><a href="#">Stay Here</a>
<br><a href="#">Third Option</a>
</td></tr></table>
</body>
</html>

The two page renderings look identical to me and the hover behavior seems to be the same. Are other style rules in your case that are adding to the situation?

What is it that Firefox doesn't "get"?

texasjim

7:27 pm on May 17, 2009 (gmt 0)

10+ Year Member



You queried:

What is it that Firefox doesn't "get"?

Width and height. It only applies it to the 'a' tag, not the 'TD.' Perhaps IE8 not getting it, either, if you're seeing the identical thing in both IE and FF. I have IE7 since I prefer XP to Vista.

<url removed> in IE7 looks as I intend it to look.

Thanks,

Jim

[edited by: tedster at 7:31 pm (utc) on May 17, 2009]

swa66

7:27 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld!

Let's hear you out first: name instances of where Firefox is not compliant with the CSS2.1 standard, where IE6 and IE7 are.

As a matter of experience, whenever legacy IE versions and FireFox disagree on how to render something it's virtually always IE that's in defiance of the standard, and other standard compliant browsers such as Safari, Opera etc will agree to that.

Also Microsoft has seen the error of their ways of the past and made IE8 far more standards complaint that any of its predecessors.

Finally know that most of your visitors avoiding IE do so consciously, pushing them to is is like pushing them away from your site.

So my position is fully opposite of yours: It's the legacy IE versions that are the problem for it's non-adherence to established standards.

swa66

7:33 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



crossed posts above,
It only applies it to the 'a' tag, not the 'TD.'

Your sample code doesn't tell the <td> to have width or height and your <a> is an inline element.

Moreover tables get a lot of freedom from the standard, better not use them for layout purposes.

swa66

7:36 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have IE7 since I prefer XP to Vista.

Regardless of your preference for XP vs. Vista, you can upgrade to IE8.

texasjim

7:43 pm on May 17, 2009 (gmt 0)

10+ Year Member



You wrote:

Your sample code doesn't tell the TD to have ...

It does in fact:

height: 18px;
width: 195px;

If FF can't parse tables, then "turd" is an understatement. They're used in about every e-commerce app of which I'm aware.

Anyway ...

IE7, looks as it should.

FF3 looks like junk.

Another fix would be to open in IE7, do captures and then have mouseover images ... but if you gotta add a bunch of everhead so a "faster" browser can handle it, what good is the "faster" part?

Sorry, gang. Moz is junk until it can do some pretty simple stuff, IMO.

Jim

[edited by: tedster at 7:45 pm (utc) on May 17, 2009]
[edit reason] personal urls removed [/edit]

tedster

7:46 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does your mark-up validate?

W3C Validator - HTML [validator.w3.org]
W3C Validator - CSS [jigsaw.w3.org]

swa66

8:06 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your sample code doesn't tell the TD to have ...

It does in fact:

height: 18px;
width: 195px;

if you refer to:


TD.list a {
[...]
height: 18px;
width: 195px;
}

well then no: it tells the <a> inside the <td> to have a certain size.

Anyway ...

IE7, looks as it should.

FF3 looks like junk.

Ah intend.
- It's not cause your code validates that it is saying what you think it is saying.
- It's not cause legacy IE versions render your code as intended that your code is saying what you think it is saying.

I'm not sure you're going to be convinced here, but once you cool down, hopefully you'll reread what's below and reconsider.

Do try to this approach next time:
- Do not look at what you create in IE at all
- Make it in your choice of browsers that are standards compliant (Opera, Safari, -yes= Firefox, ...)
- when it's done in one of them, test it in the others of that list, just to meake sure you're not abusing a feature in the one of your choice.
- now declare your code finished, don't change it anymore.
- test it in IE8: you'll see it render it properly in virtually all cases
- test it in IE7: you'll see some minor problems if you're lucky, some major ones all too often. Correct them using a conditional comment (so you don't have to worry messing it up again in the other browsers)
- test it in IE6: you'll see mostly the same issues as in IE7 and a bunch more. If it's holding you back by it's lack of support for e.g. selectors that you used, consider IE7.js as a solution to a bunch of it's issues, and add the rest in conditional comments.

This is the fastest way I know of making CSS backwards compatible with legacy IE versions.

texasjim

8:25 pm on May 17, 2009 (gmt 0)

10+ Year Member



You wrote:

... well then no: it tells the <a> inside the <td> to have a certain size.

Yep; already tried breaking them up. Still good in IE7, not FF3. So that should address the other request: an example of where CSS2 works in IE but not FF. Plus, I've even gone in and added additional W/H attributes in the TD tags as well. If the fix were that easy, I'd never have taken time to vent here. (read: still nada in FF/Moz; AOK in IE7).

I think I'll add "This site best viewed in Internet Explorer." And then move on.

Meanwhile, I'll query: is the CSS, inline or separated, 2 compliant? Follow on: does it work in FF?

My quick-capsule review stands. FF is a turd.

Jim

swa66

9:05 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



to vent here

And that's going to solve your problem how ?

I fully agree dealing with differences in browsers is one of the most frustrating aspects, but you're pointing your finger at the wrong target.

First look at your own code.
tedser gave you a few URLs above, I strongly suggest you let it loose on your code. (I got 45 HTML errors and 29 CSS errors when I checked it, the CSS included some parsing errors.)

Next reread what it means -according to the standard- to assign width and height on an inline element.
Then read what tables should do when faces with content too large to fit according to the standard.

BTW: the standard is CSS2.1 not CSS2, that one is replaced long ago.

You can find the standard here:
[w3.org...]
E.g.: width is here:
[w3.org...]
note it says:

Applies to: all elements but non-replaced inline elements, table rows, and row groups

If a width (if you would set the <a> to display: block), is applied to the content area, the padding goes around that, hence setting your table cell to the same width will yield a content that's too wide for the cell.

Take a look at how tables are supposed to get width according to the standard:
[w3.org...]
Note there are two modes, which are you using ?

Proving that a browser does something wrong involves:
- reference to the standard
- code that proves it
and then review by others ...
It's pretty easy to do that for IE6 and IE7, and it's been done hundreds of times already. Many of the bugs even got names assigned to them. There are few instances against all other still in use browsers that remain unfixed.

To state something -that's not even valid code- renders as intended in legacy IE versions and not in other browsers means that the other browsers are wrong, is plainly absurd to me.

But I'm more than happy to let you disagree with me.

tangor

9:18 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The vast majority feel the opposite... that IE7 (and 6) created too many problems by being non-compliant with standards. Passion, however, is understood.

texasjim

9:58 pm on May 17, 2009 (gmt 0)

10+ Year Member



Hi swa66,

Venting, I'll admit solves nothing; albeit my home town is Seattle, serial murder capital of the world, I think. So we consider venting a healthy exercise :^)

Griping, however, can affect change. (companies are not deaf to the vox populi; very-mcu the contrary)

But I followed your steps and have about a 90% fix .. FF still has some alignment issues ... and IE7 is still perfect, as it has been, in every solution I've tried. I will further follow your advice and whack the TD in lieu of DIVs or whatever. Eventually, I'll get it (note: I wouldn't have without your superb help. MANY THANKS.)

But am I alone in thinking that what's seemingly obvious is IE works better? Is that truly counter to what most think as Tangor noted? Essentially I'm being told, 'Don't view in IE 'cause it's just too dang intuitive?' If the others only work in a VERY TIGHT box, would that not make them lesser solutions? I'm no Redmondinsta, but I gotta tip my hat to the kids at the Microsoft campus when it comes to browsers. IE interprets what the others do not, in spades.

Just my opinion,

Jim

PS (Tangor): the majority opinion can be flawed. Most believe in a creation theory of some sort; most voted for GW Bush, twice; and most use IE. One can agree with all or any part of those majority-held choices/beliefs/feelings. I prefer more indepence in my thinking ;^) Cheers, Jim.

tangor

10:42 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



texasjim... I do not pull your leg, but do check, should be no change in length! IE has been flawed for some time. Majorly flawed with 6, some corrections in 7, and finally getting close to Standards in 8. Google IE (Internet Explorer) RENDERING PAGES elsewhere instead of just webmasterworld. No smoke wafted up the old skirt. When a thing is wrong, it is just wrong, and IE has been wrong for too many years.

Also see threads for "browser corrections" wherein ALL the browser companies are equally guilty of interpreting what the page should look like rather than returning errors for non-compliant code in the interest of "user experience". That's what keeps tag soup in business.

Me? I use the KISS method. Tables if necessary, though rarely these days, CSS for appearance of FONTS (very minimal layout). My sitewide CSS is pretty short compared to many.

(added) I'm ignoring religion and politics... neither of which can be found in the WC3 Standards. :)

(added again) The EU is unhappy with MSIE already and seeks to kill it, so you'll be looking at Opera, Safari and Firefox as your browser of choice... just a different kind of politics.

texasjim

10:53 pm on May 17, 2009 (gmt 0)

10+ Year Member



Sorry, buddy. I'm a fan of going hog wild ... they got bandwidth baby -- use it! :^)

KISS I save for fans of oddly-dressed rockers ... and of course for when the girlfriend appears to be in a generous mood. ;^)

OK; now I've added sex to the religion and politics :^)

Cheers, y'all ... now a Texan ... too many serial killers in Seattle:^)

Jim

tangor

11:13 pm on May 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Not sure where you're going, but as a Real Life Texan go for it. If you're happy, I'm happy.

texasjim

11:32 pm on May 17, 2009 (gmt 0)

10+ Year Member



Hi, T. I'm going to the local cantina ... maybe pick some fights (Hey buddy; what browser to you use.)

Kidding, no hard feelings. To the contrary. With help from folks here 90% is now closer to 99%.

But if sloppy code looks great in IE, I gotta say, it's more intuitive than Moz-stuff by a long shot. In my book, that's better. To heck with compliance standards (now I'm really sounding Texan. Rules?).

Best,

Jim ... time to hog hog wild on Shiner Bocks, the best beer ever put in a keg. That's beyond debate :^)

tedster

2:06 am on May 18, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ah, you're going to be so frustrated by IE8 - the development team at Microsoft owned up to the fact that their browser was non-standard in many ways, and the new version they developed changes that in major ways.

In fact, if you code according how ANY browser renders your maqrk-up but you ignore validation, then you can often tie yourself into knots that cannot easily be resolved. That's because each browser has its own unique set of error-recovery routines.

The motive of the browser developer in doing that is to be user-friendly - but those error recovery routines do not align with each other cross-browser. To get a sense of just how far browsers go in trying to accomodate non-valid code, see the thread Modern Browsers Actively Patch Broken Website Code [webmasterworld.com].

So you can have non-valid code that looks great in your preferred browser and is hopeless in other browsers.

Swa gave you good advice. for lower frustration levels, develop your pages with validated code and monitor their look frequently during development, using one of the more standards compliant browsers. Then patching up any oddities for other browsers at the end of development is usually straightforward. And the most common problems are also well documented around the web if you need to do research. But if you start by assuming that standard behavior is actually a bug, then help will not be easy to find.

texasjim

2:29 am on May 18, 2009 (gmt 0)

10+ Year Member



Sorry to part with group-think, Tedster. But it seems to me that a browser that doesn't recognize a style command that popular style editors write (read: offer as options; btw, mine came with an Adobe product, thus none too esoteric), it's a turd, in my opinion.

I can't speak to IE8, but I'll take your word for it that it too is opting to follow the path others are setting: we adapt; they do not. I don't see that as evolutionary by any stretch of logic.

Sorry. But it's what I believe.

Best,

Jim

tangor

3:20 am on May 18, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Every lick of my code renders the same in all browsers. I don't code for one, I code for all... which means you test it in all.

Or, as I really do, code compliant, code simple and clean, and let the content rule the roost. Life is too short to swim upstream. And that stream is getting muddied these days as IE slips closer to 50% market. Nose cutting to spite face just doesn't make sense. Attempting to get code to do something it is not designed to do will only result in heartburn.

Us Texas boys know there's only so many kinds of ponies and they all ride a bit different, but we have to ride any of the broncs in the remuda if we're gettin' the herd to market.

texasjim

3:36 am on May 18, 2009 (gmt 0)

10+ Year Member



True that my Texas brother. But then again, some are fillies while others are nags. When it comes to horses, one looks to foster the best qualities ... not descend to the lowest common denominator. Yeah?

texasjim

3:44 am on May 18, 2009 (gmt 0)

10+ Year Member



PS: UNCLE! And sure; I get it. And I'll do it. But I ain't gotta like it ... especially when I've seen for myself that better is possible.

And hopefully I'm not alone in seeing the irony that while I'm told the problems are more intrinsic to IE I'm at the same time told to never develop for it first insofar as it's too forgiving. Huh? *Too* forgiving?