Connecting Tech Pros Worldwide Forums | Help | Site Map

table caption CSS problem in Netscape/Mozilla?

Randall Sell
Guest
 
Posts: n/a
#1: Jul 20 '05
Can anyone confirm if I am being an idiot, or is this a bug in the CSS
implementation of Netscape 7.x/Mozilla 1.4 ...

give the following single HTML:

<html>
<head>
<style type="text/css">
<!--
caption {
font: bold 20px;
}
-->
</style>
</head>
<body>
<table border=1>
<caption>g'day</caption>
<tr>
<td>1a</td>
<td>1b</td>
<td>1c</td>
<td>1d</td>
</tr>
</table>
</body>
</html>

IE will display correctly, and the caption of "g'day" is 20 point, but
Netscape seems to ignore it. and I get the standard font size.

If I add a style called "mycaption' as:

..mycaption {
font-size: 20px;
}

and change the <caption> to use this like:

<caption class="mycaption">g'day</caption>

Then both browsers (IE and Netscape/Mozilla) display correctly. So is IE
displaying correctly because it is being more "lenient" is something I am
doing wrong, or is Netscape just a pile of s**t. Personally I suspect the
latter, but will reserve judgement until I hear from one of you experts.

regards,
-Randall

ps, I should mention I also tried a more specific selector like
table caption {
font: bold 20px;
}

but that did not help either.



Brian
Guest
 
Posts: n/a
#2: Jul 20 '05

re: table caption CSS problem in Netscape/Mozilla?


Randall Sell wrote:[color=blue]
> caption {
> font: bold 20px;
> }[/color]

Best not to use pixel sizes for fonts, but you no doubt have been
reading this group for some time before posting, so you already know
about this.
[color=blue]
> <table border=1>
> <caption>g'day</caption>[/color]
[color=blue]
> IE will display correctly, and the caption of "g'day" is 20 point, but
> Netscape seems to ignore it. and I get the standard font size.
>
> If I add a style called "mycaption' as:
>
> .mycaption {
> font-size: 20px;
> }[/color]

You have changed the selector from an element to a class, and *also*
changed the declaration from the shorthand font property to the
font-size property.
[color=blue]
> and change the <caption> to use this like:
>
> <caption class="mycaption">g'day</caption>
>
> Then both browsers (IE and Netscape/Mozilla) display correctly.[/color]

Ok. But font <> font-size. The font property allows you to set lots
of things at once; you have chosen to set only weight and size in your
declaration, which is allowed, but will reset all other properties to
their initial values. You have put them in the correct order, but
have skipped font-style and font-variant. I don't know how the values
work when you skip certain properties. I have read the css2 spec, as
you no doubt did. I frankly cannot tell if order even matters. Some
of the examples put values out of order.
[color=blue]
> So is IE displaying correctly because it is being more "lenient"
> is something I am doing wrong, or is Netscape just a pile of s**t.[/color]

I'd not charge that Mozilla 1.x is a pile of crap, nor that it is
buggy, unless I were really experienced with css. Not even as an
either/or proposition. I'd assume that I was wrong until being sure
that it was the browser. But that's me.
[color=blue]
> Personally I suspect the latter, but will reserve judgement
> until I hear from one of you experts.[/color]

I don't know about being an expert, but I can troubleshoot. And the
first thing I notice is that your experiment was not carefully controlled.
[color=blue]
> ps, I should mention I also tried a more specific selector like
> table caption {
> font: bold 20px;
> }[/color]

Now you have gone back to the short-hand selector. To conduct an
experiment, change only *one* thing at a time. Specifically, try

caption {
font-size: 20px ;
}

and tell us what happens.

--
Brian
follow the directions in my address to email me

Randall Sell
Guest
 
Posts: n/a
#3: Jul 20 '05

re: table caption CSS problem in Netscape/Mozilla?


Indeed, using shorthand syntax with Netscape/Moz doesn't work. I love
lessons learned the hard way. And the longer you stare at code that doesn't
work, the more likely you will remember it in the future!

Anyway, using the full rule font-size does work, with px, em, and % (didn't
try any others).

But IMHO this is still a bug since the shorthand syntax should be valid. And
the two should be interchangeable in all circumstances.

As for me jumping to conclusions - I am a die hard NN fan, and still use
4.79! (You would laugh if I told ya why, so I'll leave that alone)

thanx for the help
randall



"Brian" <usenet1@mangymutt.com.invalid-remove-this-part> wrote in message
news:%IEcb.430859$cF.134460@rwcrnsc53...[color=blue]
> Randall Sell wrote:[color=green]
> > caption {
> > font: bold 20px;
> > }[/color]
>
> Best not to use pixel sizes for fonts, but you no doubt have been
> reading this group for some time before posting, so you already know
> about this.
>[color=green]
> > <table border=1>
> > <caption>g'day</caption>[/color]
>[color=green]
> > IE will display correctly, and the caption of "g'day" is 20 point, but
> > Netscape seems to ignore it. and I get the standard font size.
> >
> > If I add a style called "mycaption' as:
> >
> > .mycaption {
> > font-size: 20px;
> > }[/color]
>
> You have changed the selector from an element to a class, and *also*
> changed the declaration from the shorthand font property to the
> font-size property.
>[color=green]
> > and change the <caption> to use this like:
> >
> > <caption class="mycaption">g'day</caption>
> >
> > Then both browsers (IE and Netscape/Mozilla) display correctly.[/color]
>
> Ok. But font <> font-size. The font property allows you to set lots
> of things at once; you have chosen to set only weight and size in your
> declaration, which is allowed, but will reset all other properties to
> their initial values. You have put them in the correct order, but
> have skipped font-style and font-variant. I don't know how the values
> work when you skip certain properties. I have read the css2 spec, as
> you no doubt did. I frankly cannot tell if order even matters. Some
> of the examples put values out of order.
>[color=green]
> > So is IE displaying correctly because it is being more "lenient"
> > is something I am doing wrong, or is Netscape just a pile of s**t.[/color]
>
> I'd not charge that Mozilla 1.x is a pile of crap, nor that it is
> buggy, unless I were really experienced with css. Not even as an
> either/or proposition. I'd assume that I was wrong until being sure
> that it was the browser. But that's me.
>[color=green]
> > Personally I suspect the latter, but will reserve judgement
> > until I hear from one of you experts.[/color]
>
> I don't know about being an expert, but I can troubleshoot. And the
> first thing I notice is that your experiment was not carefully controlled.
>[color=green]
> > ps, I should mention I also tried a more specific selector like
> > table caption {
> > font: bold 20px;
> > }[/color]
>
> Now you have gone back to the short-hand selector. To conduct an
> experiment, change only *one* thing at a time. Specifically, try
>
> caption {
> font-size: 20px ;
> }
>
> and tell us what happens.
>
> --
> Brian
> follow the directions in my address to email me
>[/color]


Mikko Rantalainen
Guest
 
Posts: n/a
#4: Jul 20 '05

re: table caption CSS problem in Netscape/Mozilla?


[Top-posting fixed. Please, do not do that again.]

Randall Sell / 2003-09-25 20:29:
[color=blue]
> "Brian" <usenet1@mangymutt.com.invalid-remove-this-part> wrote in message
> news:%IEcb.430859$cF.134460@rwcrnsc53...
>[color=green]
>>Randall Sell wrote:
>>[color=darkred]
>>>caption {
>>> font: bold 20px;
>>>}[/color]
>>
>>Best not to use pixel sizes for fonts, but you no doubt have been
>>reading this group for some time before posting, so you already know
>>about this.[/color][/color]
[color=blue]
> Indeed, using shorthand syntax with Netscape/Moz doesn't work. I love
> lessons learned the hard way. And the longer you stare at code that doesn't
> work, the more likely you will remember it in the future!
>
> Anyway, using the full rule font-size does work, with px, em, and % (didn't
> try any others).
>
> But IMHO this is still a bug since the shorthand syntax should be valid. And
> the two should be interchangeable in all circumstances.[/color]

Why do you think "font: bold 20px;" is a valid declaration? The spec
<URL:http://www.w3.org/TR/CSS21/fonts.html#font-shorthand> says:

[Reformatted to be easier to read.]

Value:
[
[ <'font-style'> || <'font-variant'> || <'font-weight'> ]?
<'font-size'>
[ / <'line-height'> ]?
<'font-family'>
]
| caption
| icon
| menu
| message-box
| small-caption
| status-bar
| inherit

Notice that font-family is *required* if you use anything but one of
the keywords. IMO, that requirement makes the 'font' shorthand
unusable for pretty much anything, but some people may think otherwise.

Also, worth noting is that the spec probably has error in the above
definition as they immediately give an example:

p { font: normal small-caps 120%/120% fantasy }

But because there's no '+' or '*' one shouldn't be allowed to use
both font-weight *and* font-variant. Logical assumption is that the
spec should really read:

[ <'font-style'> || <'font-variant'> || <'font-weight'> ]*

(Yep, the spec I referenced has only WD status, but the same problem
can be found from CSS2 spec.)

--
Mikko

Brian
Guest
 
Posts: n/a
#5: Jul 20 '05

re: table caption CSS problem in Netscape/Mozilla?


Mikko Rantalainen wrote:[color=blue]
>
> <URL:http://www.w3.org/TR/CSS21/fonts.html#font-shorthand> says:
>
> Value:
> [
> [ <'font-style'> || <'font-variant'> || <'font-weight'> ]?
> <'font-size'>
> [ / <'line-height'> ]?
> <'font-family'>
> ][/color]
[snip][color=blue]
>
> Notice that font-family is *required* if you use anything but one of
> the keywords.[/color]

Now that you've explained it, I can follow the spec. I'll admit that
it had me a bit confused.
[color=blue]
> Also, worth noting is that the spec probably has error in the above
> definition as they immediately give an example:
>
> p { font: normal small-caps 120%/120% fantasy }[/color]

Their examples did contribute to my confusion.
[color=blue]
> But because there's no '+' or '*' one shouldn't be allowed to use
> both font-weight *and* font-variant. Logical assumption is that the
> spec should really read:
>
> [ <'font-style'> || <'font-variant'> || <'font-weight'> ]*[/color]

Thanks for clarifying things for me.

--
Brian
follow the directions in my address to email me

Brian
Guest
 
Posts: n/a
#6: Jul 20 '05

re: table caption CSS problem in Netscape/Mozilla?


Please don't top-post.

Randall Sell wrote:[color=blue]
> Indeed, using shorthand syntax with Netscape/Moz doesn't work.
>
> Anyway, using the full rule font-size does work
>
> But IMHO this is still a bug since the shorthand syntax should be valid.[/color]

Still assuming it's a bug in Netscape and not in your css, eh?
[color=blue]
> As for me jumping to conclusions[/color]

Twice, no less. :-p
[color=blue]
> - I am a die hard NN fan, and still use 4.79![/color]

So do I, for testing purposes. But that's not relevant to the discussion.

--
Brian
follow the directions in my address to email me

Randall Sell
Guest
 
Posts: n/a
#7: Jul 20 '05

re: table caption CSS problem in Netscape/Mozilla?



"Mikko Rantalainen" <mira@st.jyu.fi> wrote in message
news:bkvbt3$s3$1@mordred.cc.jyu.fi...[color=blue]
> [Top-posting fixed. Please, do not do that again.]
>
> Randall Sell / 2003-09-25 20:29:
>[color=green]
> > "Brian" <usenet1@mangymutt.com.invalid-remove-this-part> wrote in[/color][/color]
message[color=blue][color=green]
> > news:%IEcb.430859$cF.134460@rwcrnsc53...
> >[color=darkred]
> >>Randall Sell wrote:
> >>
> >>>caption {
> >>> font: bold 20px;
> >>>}
> >>
> >>Best not to use pixel sizes for fonts, but you no doubt have been
> >>reading this group for some time before posting, so you already know
> >>about this.[/color][/color]
>[color=green]
> > Indeed, using shorthand syntax with Netscape/Moz doesn't work. I love
> > lessons learned the hard way. And the longer you stare at code that[/color][/color]
doesn't[color=blue][color=green]
> > work, the more likely you will remember it in the future!
> >
> > Anyway, using the full rule font-size does work, with px, em, and %[/color][/color]
(didn't[color=blue][color=green]
> > try any others).
> >
> > But IMHO this is still a bug since the shorthand syntax should be valid.[/color][/color]
And[color=blue][color=green]
> > the two should be interchangeable in all circumstances.[/color]
>
> Why do you think "font: bold 20px;" is a valid declaration? The spec
> <URL:http://www.w3.org/TR/CSS21/fonts.html#font-shorthand> says:
>
> [Reformatted to be easier to read.]
>
> Value:
> [
> [ <'font-style'> || <'font-variant'> || <'font-weight'> ]?
> <'font-size'>
> [ / <'line-height'> ]?
> <'font-family'>
> ]
> | caption
> | icon
> | menu
> | message-box
> | small-caption
> | status-bar
> | inherit
>
> Notice that font-family is *required* if you use anything but one of
> the keywords. IMO, that requirement makes the 'font' shorthand
> unusable for pretty much anything, but some people may think otherwise.
>
> Also, worth noting is that the spec probably has error in the above
> definition as they immediately give an example:
>
> p { font: normal small-caps 120%/120% fantasy }
>
> But because there's no '+' or '*' one shouldn't be allowed to use
> both font-weight *and* font-variant. Logical assumption is that the
> spec should really read:
>
> [ <'font-style'> || <'font-variant'> || <'font-weight'> ]*
>
> (Yep, the spec I referenced has only WD status, but the same problem
> can be found from CSS2 spec.)
>
> --
> Mikko
>[/color]

Yes, I see your point. I was merely going off of what TopStyle 3.1 sets for
me. One can only read so much documentation before one wants to jump in and
give it a go! Yet another lesson learned the hard way.

So at the end of the day, it was one of the things I suspected. That IE is
being "lenient" and allowing me to do stuff that technically it shouldn't.
And from what I've seen, Netscape follows the HTML 4.01/CSS1 specs VERY
closely.

As a newbie to CSS (I have only been using them since Friday, a week ago) it
is hard to know which is the case. If IE is being overly lenient, or
Netscape not working. That could commonly be said in NN4.x. but am finding
N6+ to be very close to the mark.

thanx for the help,
-randall


Randall Sell
Guest
 
Posts: n/a
#8: Jul 20 '05

re: table caption CSS problem in Netscape/Mozilla?



"Brian" <usenet1@mangymutt.com.invalid-remove-this-part> wrote in message
news:nTGcb.430032$Oz4.228209@rwcrnsc54...[color=blue]
> Please don't top-post.
>
> Randall Sell wrote:[color=green]
> > Indeed, using shorthand syntax with Netscape/Moz doesn't work.
> >
> > Anyway, using the full rule font-size does work
> >
> > But IMHO this is still a bug since the shorthand syntax should be valid.[/color]
>
> Still assuming it's a bug in Netscape and not in your css, eh?
>[color=green]
> > As for me jumping to conclusions[/color]
>
> Twice, no less. :-p
>[color=green]
> > - I am a die hard NN fan, and still use 4.79![/color]
>
> So do I, for testing purposes. But that's not relevant to the discussion.
>
> --
> Brian
> follow the directions in my address to email me
>[/color]

refer to my prior response to Mikko. As for jumping to conclusions, I stated
"but will reserve judgement until I hear from one of you experts". As a
matter of fact, it would appear I got two experts that got me all sorted
out.

ta
-randall


Mikko Rantalainen
Guest
 
Posts: n/a
#9: Jul 20 '05

re: table caption CSS problem in Netscape/Mozilla?


Randall Sell wrote:[color=blue]
> "Mikko Rantalainen" <mira@st.jyu.fi> wrote in message
> news:bkvbt3$s3$1@mordred.cc.jyu.fi...
>[color=green]
>>[Top-posting fixed. Please, do not do that again.]
>>
>>Randall Sell / 2003-09-25 20:29:[color=darkred]
>>>But IMHO this is still a bug since the shorthand syntax should be valid.
>>>the two should be interchangeable in all circumstances.[/color]
>>
>>Why do you think "font: bold 20px;" is a valid declaration? The spec
>><URL:http://www.w3.org/TR/CSS21/fonts.html#font-shorthand> says:
>>[/color]
>
> Yes, I see your point. I was merely going off of what TopStyle 3.1 sets for
> me. One can only read so much documentation before one wants to jump in and
> give it a go! Yet another lesson learned the hard way.[/color]

Yet another reason not to use those wizard-like tools to create web
pages. If you don't have time to learn CSS, you should pay some
professional to do the work for you. Ask if they do the work with text
editor or with some tool. Ask them how they test if the web page works
(if they don't mention MSIE/mac, lynx *and* opera, don't bother with
them). I've yet to see a *real* pro working with a off-the-shelf web
page construction tool. If they use photoshop or flash mx to create
graphics, thats ok, but if they use *any* off-the-shelf tool to create
html and CSS (and possibly even javascript!) you can be happy if it
works correctly with MSIE 6 SP1/win32 with javascript on. However, if
they tell you that they use software they've written by themselves,
they're highly probably okay. I'm sure some "pros" following this
newsgroup will disagree but this is my experience.

The CSS spec is pretty easy to read through. It really isn't that hard
either. If you have any experience with programming languages, learning
CSS should take a few days, max. The *real* problem is knowing *how*
different browsers fail to correctly implement the spec. If you know the
spec and write a page, Mozilla more often than not correctly displays
it. And MSIE more often than not fails to display the page as expected...

--
Mikko

Randall Sell
Guest
 
Posts: n/a
#10: Jul 20 '05

re: table caption CSS problem in Netscape/Mozilla?



"Mikko Rantalainen" <mira@st.jyu.fi> wrote in message
news:bl2nu5$uf7$1@mordred.cc.jyu.fi...[color=blue]
> Randall Sell wrote:[color=green]
> > "Mikko Rantalainen" <mira@st.jyu.fi> wrote in message
> > news:bkvbt3$s3$1@mordred.cc.jyu.fi...
> >[color=darkred]
> >>[Top-posting fixed. Please, do not do that again.]
> >>
> >>Randall Sell / 2003-09-25 20:29:
> >>>But IMHO this is still a bug since the shorthand syntax should be[/color][/color][/color]
valid.[color=blue][color=green][color=darkred]
> >>>the two should be interchangeable in all circumstances.
> >>
> >>Why do you think "font: bold 20px;" is a valid declaration? The spec
> >><URL:http://www.w3.org/TR/CSS21/fonts.html#font-shorthand> says:
> >>[/color]
> >
> > Yes, I see your point. I was merely going off of what TopStyle 3.1 sets[/color][/color]
for[color=blue][color=green]
> > me. One can only read so much documentation before one wants to jump in[/color][/color]
and[color=blue][color=green]
> > give it a go! Yet another lesson learned the hard way.[/color]
>
> Yet another reason not to use those wizard-like tools to create web
> pages.[/color]

Ummm, I think you should check out the tool before spouting such ignorance.
I'm not a sales person for them, nor care to be, but in short, it has
wizards for a quick-start. And context highlighting as well as inspectors. a
very good tool. The only thing it is missing is bookmarks making it
difficult to navigate large files.

http://www.bradsoft.com/topstyle/index.asp


If you don't have time to learn CSS, you should pay some[color=blue]
> professional to do the work for you. Ask if they do the work with text
> editor or with some tool. Ask them how they test if the web page works
> (if they don't mention MSIE/mac, lynx *and* opera, don't bother with
> them). I've yet to see a *real* pro working with a off-the-shelf web
> page construction tool. If they use photoshop or flash mx to create
> graphics, thats ok, but if they use *any* off-the-shelf tool to create
> html and CSS (and possibly even javascript!) you can be happy if it
> works correctly with MSIE 6 SP1/win32 with javascript on. However, if
> they tell you that they use software they've written by themselves,
> they're highly probably okay. I'm sure some "pros" following this
> newsgroup will disagree but this is my experience.
>
> The CSS spec is pretty easy to read through. It really isn't that hard
> either. If you have any experience with programming languages, learning
> CSS should take a few days, max. The *real* problem is knowing *how*
> different browsers fail to correctly implement the spec. If you know the
> spec and write a page, Mozilla more often than not correctly displays
> it. And MSIE more often than not fails to display the page as expected...
>
> --
> Mikko
>[/color]


Closed Thread