473,748 Members | 8,933 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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'da y</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="mycaptio n">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 3776
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'da y</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="mycaptio n">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*****@mangym utt.com.invalid-remove-this-part> wrote in message
news:%IEcb.4308 59$cF.134460@rw crnsc53...
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'da y</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="mycaptio n">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*****@mangym utt.com.invalid-remove-this-part> wrote in message
news:%IEcb.4308 59$cF.134460@rw crnsc53...
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.jy u.fi...
[Top-posting fixed. Please, do not do that again.]

Randall Sell / 2003-09-25 20:29:
"Brian" <us*****@mangym utt.com.invalid-remove-this-part> wrote in message news:%IEcb.4308 59$cF.134460@rw crnsc53...
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*****@mangym utt.com.invalid-remove-this-part> wrote in message
news:nTGcb.4300 32$Oz4.228209@r wcrnsc54...
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.jy u.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.j yu.fi...
Randall Sell wrote:
"Mikko Rantalainen" <mi**@st.jyu.fi > wrote in message
news:bk******** *@mordred.cc.jy u.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
5035
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 (preg_match("/Mozilla/i", $info)) {
9
2551
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 make my scripts multi-browser, when they don't bother giving me basic documentation?
2
3040
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 where the form object are positioned resizes....??? Strange hè? Maybe someone knows the answer. Thanks.
5
8224
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 browser-agnostic (i.e., works with Netscape, version 4x, 7x, etc). My question is this: I have about 10 table rows, each tagged with a class attribute (<tr class="billing" style="display:none">) that I wish to make visible or invisible in response...
13
4161
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 get *9*. In the example table, there are 4 rows with 4 columns each in the tbody. I'd expect 4 child nodes for the table body with 4 children each. I get those 4 plus 5 alerts in Mozilla/Netscape. I get only those 4 in IE and Opera. Note that...
4
81856
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 suggestions would be appreciated. Thank you. http://www1.esc.edu/personalstu/fhartnet/books.html <tr class="lightblue">
10
2375
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 = navigator.appName;
5
3962
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 it's possible at all. (Opera 9 shows a bigger indentation (2px?) but from the right side, but this fun is for later :-) IE displays the expected (at least by me) layout. The relevant HTML block in the transformer...
7
5944
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 is enclosed in a bounding div. If caption is given a font-size (eg 0.8em) with CSS text it displays correctly, however MSIE then shows the text too small.
0
8826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9316
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9241
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8239
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4597
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.