473,320 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

table caption CSS problem in Netscape/Mozilla?

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.
Jul 20 '05 #1
9 3756
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.
<table border=1>
<caption>g'day</caption> 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;
}
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.
and change the <caption> to use this like:

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

Then both browsers (IE and Netscape/Mozilla) display correctly.
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.
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.
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.
Personally I suspect the latter, but will reserve judgement
until I hear from one of you experts.
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.
ps, I should mention I also tried a more specific selector like
table caption {
font: bold 20px;
}


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

Jul 20 '05 #2
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" <us*****@mangymutt.com.invalid-remove-this-part> wrote in message
news:%IEcb.430859$cF.134460@rwcrnsc53...
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.
<table border=1>
<caption>g'day</caption>

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;
}


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.
and change the <caption> to use this like:

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

Then both browsers (IE and Netscape/Mozilla) display correctly.


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.
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.


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.
Personally I suspect the latter, but will reserve judgement
until I hear from one of you experts.


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.
ps, I should mention I also tried a more specific selector like
table caption {
font: bold 20px;
}


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

Jul 20 '05 #3
[Top-posting fixed. Please, do not do that again.]

Randall Sell / 2003-09-25 20:29:
"Brian" <us*****@mangymutt.com.invalid-remove-this-part> wrote in message
news:%IEcb.430859$cF.134460@rwcrnsc53...
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.

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.


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

Jul 20 '05 #4
Mikko Rantalainen wrote:

<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'>
] [snip]
Notice that font-family is *required* if you use anything but one of
the keywords.
Now that you've explained it, I can follow the spec. I'll admit that
it had me a bit confused.
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 }
Their examples did contribute to my confusion.
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'> ]*


Thanks for clarifying things for me.

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

Jul 20 '05 #5
Please don't top-post.

Randall Sell wrote:
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.
Still assuming it's a bug in Netscape and not in your css, eh?
As for me jumping to conclusions
Twice, no less. :-p
- I am a die hard NN fan, and still use 4.79!


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

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

Jul 20 '05 #6

"Mikko Rantalainen" <mi**@st.jyu.fi> wrote in message
news:bk*********@mordred.cc.jyu.fi...
[Top-posting fixed. Please, do not do that again.]

Randall Sell / 2003-09-25 20:29:
"Brian" <us*****@mangymutt.com.invalid-remove-this-part> wrote in message news:%IEcb.430859$cF.134460@rwcrnsc53...
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.
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.


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


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
Jul 20 '05 #7

"Brian" <us*****@mangymutt.com.invalid-remove-this-part> wrote in message
news:nTGcb.430032$Oz4.228209@rwcrnsc54...
Please don't top-post.

Randall Sell wrote:
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.


Still assuming it's a bug in Netscape and not in your css, eh?
As for me jumping to conclusions


Twice, no less. :-p
- I am a die hard NN fan, and still use 4.79!


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

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


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
Jul 20 '05 #8
Randall Sell wrote:
"Mikko Rantalainen" <mi**@st.jyu.fi> wrote in message
news:bk*********@mordred.cc.jyu.fi...
[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 valid.
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:


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.


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

Jul 20 '05 #9

"Mikko Rantalainen" <mi**@st.jyu.fi> wrote in message
news:bl**********@mordred.cc.jyu.fi...
Randall Sell wrote:
"Mikko Rantalainen" <mi**@st.jyu.fi> wrote in message
news:bk*********@mordred.cc.jyu.fi...
[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 valid.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:

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.


Yet another reason not to use those wizard-like tools to create web
pages.


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 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

Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sims | last post by:
Hi, if i use... // php $info = getenv("HTTP_USER_AGENT"); // I noticed that Mozzila and Netscape <6(?) both use the same Agent. // so i was thinking of if...
9
by: rez | last post by:
I find it rather frustrating that Netscape 4.x is "no longer supported:" http://help.netscape.com/products/client/communicator/reflib.html Same seems true with IE. How am I ever supposed to...
2
by: reinier | last post by:
If got a little problem, i've made a webpage that is working fine in IE, but in Mozilla i've got a little problem. When i go with my mouse over a input box or some kind of form object. The table...
5
by: Harry Gould | last post by:
To all, I'm a newbie here, so please bear with me. I develop web pages for a company intranet where Internet Explorer 6 is the standard. Now I must develop a public internet website that is...
13
by: kaeli | last post by:
Can anyone explain this to me? It's driving me insane. Save this and run it in IE or Opera and then in Mozilla or Netscape 6+. In IE/Opera, I get the expected 4 alerts. In Mozilla/Netscape, I...
4
by: eomer | last post by:
I would like my table header to have a border on the bottom. What I have written works in Mozilla (1.7.12) but not IE (6). I have included the snippet of html and the snippets of CSS. Any...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
5
by: VK | last post by:
On the demo at <http://www.geocities.com/schools_ring/tmp/demo01/index.xml> the table caption has 1px(?) indentation from the left in Firefox 1.5 and I'm running out of ideas how to kill it - if...
7
by: Johnny | last post by:
In MSIE table captions are displayed at the same size as content. But in Firefox the text displays at browser default, It also exceeds the width of the table and the excess is hidden if the table...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.