Click to See Complete Forum and Search --> : [Resolved] Mozilla Firefox & CSS


Jason Batten
06-05-2005, 01:41 AM
<rant>
Oh my golly gosh! fiddle sticks!

Another reason to choose IE over FF. I have been testing my latest creation in Firefox and almost every piece of CSS I write in IE does not work in FireFox. Not even a paragraph tag with CSS wrapped around two input tags will work.

I could have two CSS files for both browsers, but why should I when browsers should be helping webmasters not making our job more difficult.

HTML & CSS should be kept loosey goosey and not strict because they shouldn't have to be IMO.
</rant>

planetsim
06-05-2005, 02:34 AM
hate to tell you but its actually the other way around. CSS in Firefox is done correctly, there are a tonne of hacks to get things working in IE why? because CSS in IE stinks. The box model hack is probably the most well known.

Also if it works in Firefox it will 98% of the time work in every other browser other than IE so code for Firefox, make hacks to get it to work in IE.

Jason Batten
06-05-2005, 03:52 AM
I knew you'd say that :P

The CSS I write always works in IE without using too much effort. I don't use CSS for 'design' just text formatting really.<rant> Since 65% of users use IE, I will continue to code for it. I will have to find myself a coding slave to do the dirty jobs like deal with firefox :glare:

Compatibility is a pain. I'm still iffy about submitting to the user or making the user submit to the site. Is it our fault the site won't work because they are fools who are scared of cookies and javascript. Damn firewalls.

As long as you don't visit porn & warez sites you won't get a virus. I mean, if you're stupid enough to receive a virus by email then you should be shot.</rant>

planetsim
06-05-2005, 04:37 AM
You must be the only IE lover on this board or only one that admits it. Im sure goldbug if he sees this thread will give more than just his $0.02

vaaaska
06-05-2005, 06:00 AM
Originally posted by NetNerd85
Since 65% of users use IE, I will continue to code for it. I will have to find myself a coding slave to do the dirty jobs like deal with firefox :glare:

MOST STUPID COMMENT I'VE EVER READ ON THIS SUBJECT.

Go buy some more books and read them. Perhaps you will understand what standards are, why they exist, and why in a couple years time you will know why your statement was/is completely stupid, wrong and backwards to reality.

When I write CSS with standards I have zero problems with things working in nearly all browsers except IE.

Ever try to use this in an IE browser? Put is into a page and see what you get...then try it in a real browser.

[/php].wdith
{
width: 700px;
margin: 20px;
padding: 20px;
background: #ffff00;
}[/php]

Looks simple right? IE can't deal with it...just another example...

Jason Batten
06-05-2005, 06:23 AM
Alright.

Why doesn't font-weight: bold; work in Firefox but works perfectly fine in IE :confused: It's my latest bug, do I really have to use <b> for FF to understand :rolleyes:

I have learnt CSS from multiple sources and everything I have written works in IE. I haven't had problems until I started to test it in Firefox.

Weedpacket
06-05-2005, 09:08 AM
Originally posted by NetNerd85
Alright.

Why doesn't font-weight: bold; work in Firefox but works perfectly fine in IE :confused: It's my latest bug, do I really have to use <b> for FF to understand :rolleyes:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Page title</title>
</head>
<body>
<p>So here we have some
<span style='font-weight:bold'>text that should be in bold</span>
just to see if it is.</p>
</body>
</html>

Works for me (relevant part of the spec: CSS Level 1, &sect;5.1.5. (http://www.w3.org/TR/CSS1#font-weight)).

Jason Batten
06-05-2005, 10:38 AM
Try this...

<html>
<head>
<style type="text/css">
p.1 {
font-weight: bold;
}
</style>
</head>
<body>
<p class="1">Something</p>
</body>
</html>:p

laserlight
06-05-2005, 10:45 AM
Yep, doesnt work - but then the use of a numeric class looks fishy (changing it to an alphanumeric one solves the problem).

Nonetheless it works for Opera, so could be a bug with Firefox.
Will check it out and see.

Jason Batten
06-05-2005, 10:51 AM
Yeah p.one works fine.

There yah go FF lovers, your queen has a bug :p

laserlight
06-05-2005, 11:05 AM
W3C's CSS validator fails the CSS:
p.1 { font-weight: bold; }
... reporting a parse error.

Changing the '1' to 'a' or 'a1' eliminates the error.

The clue could come from the HTML: 4.01 spec on SGML basic types -> CDATA (http://www.w3.org/TR/html4/types.html#type-cdata):
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
Note that if we change the class to an id, Firefox, Opera and MSIE all work identically, as expected.

planetsim
06-05-2005, 11:12 AM
I wouldnt classify it a Bug, i couldnt find it in the specification but if I remember correctly to define a CSS Class you must have a letter before any numeric values. However like I said I couldnt find it in the specification to back myself up, or to say its a bug. If it is its like one bug compared to too many in IE.

laserlight you beat me to it

Jason Batten
06-05-2005, 11:13 AM
Oh bum. Looks like I will have to get strict with my CSS coding.

Now that truly is a bother. *huff

*has some crumb cake & tea

vaaaska
06-05-2005, 11:28 AM
Use of any numeric value to begin the naming of your CSS is incorrect - it is in the manual somewhere.

You can say that it's such a pain in the ass...perhaps in the same way a person might find it a pain in the ass that their car has square wheels.

goldbug
06-05-2005, 12:07 PM
Originally posted by vaaaska
Use of any numeric value to begin the naming of your CSS is incorrect - it is in the manual somewhere.

You can say that it's such a pain in the ass...perhaps in the same way a person might find it a pain in the ass that their car has square wheels.
No no no! This surely must be a bug with Firefox! :)

/me yawns.

Weedpacket
06-05-2005, 01:26 PM
Originally posted by vaaaska
Use of any numeric value to begin the naming of your CSS is incorrect - it is in the manual somewhere. Yup, bottom of &sect;7.1 (http://www.w3.org/TR/CSS1#forward-compatible-parsing) (or &sect;4.1.1 (http://www.w3.org/TR/CSS2/syndata.html#tokenization) in the CSS Level 2 spec, but it is explicitly stated to be the same.)

NAh +00 mUCh l1ke WORK L0L0L0L! 1 W4nt +0 bE 4Bl3 +o $pELL mY worD$ @nY W4y 1 W@nT!

leatherback
06-05-2005, 01:46 PM
Hey Weed,

Looks like you work on FireFox: the words in your last sentence are all messed up. I think it is a bug crawling over the key-board or somtin

NetNerd.. I am so sorry for you.

Jason Batten
06-05-2005, 01:50 PM
Why? :confused:

Elizabeth
06-05-2005, 07:15 PM
Originally posted by leatherback
Hey Weed,

Looks like you work on FireFox: the words in your last sentence are all messed up. I think it is a bug crawling over the key-board or somtin

NetNerd.. I am so sorry for you. Leatherback - wow, long time no see, where ya been??

leatherback
06-05-2005, 08:07 PM
Hi Elizabeth,

Nice to be appreciated (Or at least.. noticed that I was absent..)

I have been working like crazy.. My web-comp. took a dive over the last few months: I have been finishing my PhD thesis, and will receive my degree in a few weeks (Hehe, Although in the Netherlands, I will have an 'independence day' on the first of juli too!).

In case you are really interested: MY thesis is titled: "Charting the quality of forage. Measuring and mapping the variation of chemical components in foliage, using hyperspectral remote sensing". I worked on satellite data, in order to measure the chemical composition of plants from a plance or satellite. And best of all.. I managed to get some usefull results! If you want, you are welcome to drop by on the first.. Big party afterwards at my place!

So I spent weeks of 90+ hours working on that. Now it is at the printers' office, and I am helping my department out with their website, while looking for a nice job in spatial ecology. (You got one, by chance?)

How have you been?

J.

leatherback
06-05-2005, 08:11 PM
Originally posted by NetNerd85
Why? :confused:

Hm, what shall I say. Because you are so confused, that you actually think that MS / IE are correct by interpreting bugged coding, and mistakingly take that as the real world. And then say the firefox is wrong, and not accepting that some people actually code according to standards, rather then to IE-warps.

But hey.. As they said in the matrix... No-one can be told.. You have to see it for yourself. Your time will come, and you will see the truth too. (It is out there..).

J.

Elizabeth
06-05-2005, 09:49 PM
Originally posted by leatherback
Hi Elizabeth,

MY thesis is titled: "Charting the quality of forage. Measuring and mapping the variation of chemical components in foliage, using hyperspectral remote sensing". You know, I was just talking about that the other day. ;)

If you want, you are welcome to drop by on the first.. Big party afterwards at my place!Free beer? Hmm... it almost makes it worth the trip!

...while looking for a nice job in spatial ecology. (You got one, by chance?)No, sorry- now if you were looking for one in special ecology, then we could talk.

How have you been? Good; trying to keep these hooligans in line is a full-time job, you know. :)

Anyway, glad you're back!

Weedpacket
06-06-2005, 03:53 AM
Originally posted by Elizabeth
Leatherback - wow, long time no see, where ya been?? That's a relief - I thought it was just me drinking too much again. Phew!

Jason Batten
06-06-2005, 04:35 AM
Originally posted by leatherback
Hm, what shall I say. Because you are so confused, that you actually think that MS / IE are correct by interpreting bugged coding, and mistakingly take that as the real world. And then say the firefox is wrong, and not accepting that some people actually code according to standards, rather then to IE-warps.

But hey.. As they said in the matrix... No-one can be told.. You have to see it for yourself. Your time will come, and you will see the truth too. (It is out there..).

J.

You really have no idea about me but thats because I make it so ;)

vaaaska
06-06-2005, 05:48 AM
Originally posted by NetNerd85
You really have no idea about me but thats because I make it so ;)

Except for the things you post in here...they are adding up.

If you need more proof about IE falability then just go read the IE blogs and their discussions surrounding IE 7...after all these years of lousy service to their use base they have finally admiited that they are WAY behind the times.

Typically, when one has a programming problem (or a 'bug' as you prefer to call it) it's not the fault of the language or the application/software - it's YOU. Most of us around here are mature enough to realize that problems are typically either the result of our lack of experience or the approach itself is not good (once again, lack of experience).

Weedpacket
06-06-2005, 06:59 AM
Originally posted by vaaaska
Typically, when one has a programming problem (or a 'bug' as you prefer to call it) it's not the fault of the language or the application/software - it's YOU. Most of us around here are mature enough to realize that problems are typically either the result of our lack of experience or the approach itself is not good (once again, lack of experience).
This business of "Why doesn't font-weight: bold; work in Firefox" being a case in point. As it turned out, it was not a bug in Firefox, it was a bug in the CSS that had been written; and furthermore that bug had nothing to do with font weight.

The first part certainly shouldn't have been a surprise. Which sounds more likely: (1) a coding novice making a mistake, or (2) an organisation with hundreds of programmers (including some very experienced ones) who are working with an aim of providing the best standards support of any relevant product blatantly managing to visibly botch one of the simplest bits of what has been one of those standards for six years? Oh, silly me, Microsoft managed to do it despite having the bigger budget and a position on the standard's editorial board. I'm sure some people here would share the same theory as me as to why.

Jason Batten
06-06-2005, 07:30 AM
Just because I bring forward other views which oppose the majority on this board doesn't mean I agree with the other views I bring forward.

To be naive and/or immature is one thing, to be an adult who acts like a child, is a completely different thing.

I know perfectly well that computers only bugger up if you bugger up. Five years ago the computer crashed all the time for me, could have been Win98 but I believe it was my skill. The computer never crashes for me now unless I make it.

CSS is something I rushed into, I never really learnt it 'properly'. Like JavaScript it is just something I use in snippets. I learnt what I need to know and ran away. I don't recall ever reading anything about not being able to use numbers for classes. I should have realised it while learning PHP but since it worked in IE, which I have always used up until recently. Personally I don't know why you shouldn't be able to use numbers alone, it would make things easier IMO.

Do I have a lack of experience? No I've been building web sites for five years, I just dont have as much as some here. I am more than happy to listen and learn but I won’t give you the satisfaction of proving me wrong :evilgrin:

MAIN POINT: You can't fix a problem if you don't encounter it.

vaaaska
06-06-2005, 07:51 AM
Originally posted by NetNerd85
I am more than happy to listen and learn but I won�t give you the satisfaction of proving me wrong :evilgrin:

MAIN POINT: You can't fix a problem if you don't encounter it.

Well...

1) We have proven you wrong.
2) It's all in your atttitude towards the 'problem' at hand.

Jason Batten
06-06-2005, 07:58 AM
I believe it is obvious that I have said what you just said with what I said before :rolleyes:

planetsim
06-06-2005, 08:34 AM
Since when does a thread in the EL become Resolved :eek:

leatherback
06-06-2005, 02:57 PM
Originally posted by Elizabeth
You know, I was just talking about that the other day. ;)

Free beer? Hmm... it almost makes it worth the trip!

No, sorry- now if you were looking for one in special ecology, then we could talk.

Good; trying to keep these hooligans in line is a full-time job, you know. :)

Anyway, glad you're back!

Hey Elizabeth,

Yeah, I figured you had a good coffee-side chat about hyperspectral remote sensing. Always happens to me. I think I have something new, and it is old news already ;-)

But, yeah, that's true.. You just had a kid late last year right? How is that going? Any walking going there yet? My sister had her first in april last year. Pain in the * now, with the independent mind, curiosity & walking..

Hm.. Special ecology.. Sounds fun.. ;-)

-- Free beer only for invitees!! I only ordered 2 kegs! --

:-))

J.

Oh, eeh.. Figure the thread is closed because there is no need for argumentation, and he realizes .. is a lost case.

Elizabeth
06-06-2005, 03:12 PM
Originally posted by leatherback
You just had a kid late last year right? How is that going? Any walking going there yet? My sister had her first in april last year. Pain in the * now, with the independent mind, curiosity & walking.. My first is a pain in the * too :) she turns 5 today, actually- excruciatingly independent and hard-headed; she already thinks her mom is an idiot. I can only imagine how she'll be at 13. But with that comes the comfort in knowing she'll be less likely to give in to peer pressure later on, I guess. My little guy is 16 mos. and just happy to be here. He's much more laid back and goes with the flow. He too is running around and thankfully keeps his curiosity in check. His favorite thing now is to wave bye-bye at the cars that go by, so all the little old people in the neighborhood think he's the greatest.

Yet again, I digress.

Firefox rules, IE sucks. How's that for jumping back on track? :)

leatherback
06-06-2005, 03:34 PM
Hm..

Firefox rulez.. Guess I could llive with that. Although I must admit I am now typing in mozilla, not mozilla firefox; well.. Tomatoe / tomato.

IE sux? Hm.. Gues.. Have you looked at the 'help' drop-down menu?> It has the feature "For internet explorer users". With in it, some explanation on what is new when you use mozilla/firefox. Hehe, need I say more?

But seriously. There was a time that I used IE, because it used to be pretty good with CSS. Then netscape upgraded to V6...

J.

Elizabeth
06-06-2005, 03:42 PM
Originally posted by leatherback
There was a time that I used IE, because it used to be pretty good with CSS. Heh, I remember that - when I got my CIW in 2000 I remember there was a big hubub about CSS ONLY working in IE and so I think that's why I had a mental block against using it for a very long time. I'm coming around slowly but surely, heh.

leatherback
06-06-2005, 03:52 PM
yeah 'the "good" old days'

;-)

Weedpacket
06-07-2005, 06:26 AM
Originally posted by NetNerd85
Do I have a lack of experience? No I've been building web sites for five years, I just dont have as much as some here [/B] But that's just it - you've been building web sites for five years without knowing about CSS in all that time? If you look at the date of the CSS1 standard's spec you'll see that it was published in 1999 - and it only became a standard after spending years in the real world on probation. Where have you been ever since?

I learnt what I need to know and ran away.This could be one reason you lack experience.

Weedpacket
06-07-2005, 06:29 AM
Originally posted by Elizabeth
My first is a pain in the * too

It's been so long since I dragged down the tone of conversation around here that I just had to make a remark about how that is a disturbingly apposite character to use.

I feel better now.

Elizabeth
06-08-2005, 12:17 AM
Originally posted by Weedpacket
It's been so long since I dragged down the tone of conversation around here that I just had to make a remark about how that is a disturbingly apposite character to use.

I feel better now. Yes, mine actually does look like that; I just can't sit on anything inflatable.


By the way, thanks Weed- I knew we could count on you to bring us back down again :)

goldbug
06-08-2005, 12:26 AM
Originally posted by Elizabeth
Yes, mine actually does look like that; I just can't sit on anything inflatable.

Huh??

dalecosp
06-08-2005, 12:36 AM
Originally posted by Elizabeth
Yes, mine actually does look like that; I just can't sit on anything inflatable. ROFLM*O!

if (rand(1,1000)==777) {
guffaws_fade();
}

:D:D

Elizabeth
06-08-2005, 12:40 AM
Originally posted by goldbug
Huh?? Don't worry - I hide it well; only my husband can say for sure. Probably why you never noticed.

goldbug
06-08-2005, 01:36 AM
Perhaps I interpreted Weed's comment a tad differently than everyone else :bemused: :D

Jason Batten
06-08-2005, 05:24 AM
um... IE has turned my vertical dashed line into... well mixed solid, dashed, dotted and just plain ewww lines... Firefox does not have this error however :p

Anyone know a 'fix'? :bemused: