473,394 Members | 1,746 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,394 software developers and data experts.

Strange browser differences in handling of COL styles

I've put a sample web page at

http://gavelcade.com/tests/font-styles-lost.html

that illustrates strange inconsistencies both among and within browsers in a
situation where I've applied styles to various parts of a table, including
COL elements (though that may or may not be the cause of the problem. Both
HTML and CSS pass validation.

I assigned the class "project-data-attribute" to the first of two columns in
tables (having class "project-data") like the following:

Grantee: Aardvark College
Project Director: Dr. Aaron Aramanian
Project Title: Fifty Ways to Leave Your Lover
I want to specify the width of the first column and have it bolded. The
following rule is theoretically applicable.

table.project-data .project-data-attribute {
width: 10em;
font-weight: bold; }

I tested this in IE6, Netscape 7, Firefox 1.0, and Opera 7.54. The width is
set correctly in ALL of these browsers BUT only IE boldfaces the text!

Exploring further, I added two more properties to this rule:

table.project-data .project-data-attribute {
width: 10em;
background-color: #ee9;
color: #42c;
font-weight: bold; }

As with boldfacing, the text color is only applied by IE6. The text remains
black in the other browsers. Even more oddly, the background color *does*
show up in Firefox and Opera as well as in IE--but it doesn't show up in
Netscape.

Testing whether it was a somehow a specificity problem, I changed
..project-data-attribute to col.project-data-attribute, but that didn't make
any difference. I even tried making it less specific, removing the
table.project-data container selector, but no change in result.

Comments? Alternative approaches, short of applying the class to each of the
first-child TDs individually? Thanks.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.

Jul 21 '05 #1
3 2198
On Thu, 18 Nov 2004 14:02:12 -0500, Harlan Messinger
<h.*********@comcast.net> wrote:
Comments? Alternative approaches, short of applying the class to each of
the
first-child TDs individually? Thanks.

You can only use the background, border, visibility and width properties
on col and colgroup.

Jul 21 '05 #2
On Thu, 18 Nov 2004 14:28:56 -0500, Neal <ne*****@yahoo.com> wrote:
On Thu, 18 Nov 2004 14:02:12 -0500, Harlan Messinger
<h.*********@comcast.net> wrote:
Comments? Alternative approaches, short of applying the class to each
of the
first-child TDs individually? Thanks.

You can only use the background, border, visibility and width properties
on col and colgroup.


Forgot to add: [http://ln.hixie.ch/?start=1070385285&count=1]
Jul 21 '05 #3

"Neal" <ne*****@yahoo.com> wrote in message
news:op**************@news.individual.net...
On Thu, 18 Nov 2004 14:28:56 -0500, Neal <ne*****@yahoo.com> wrote:
On Thu, 18 Nov 2004 14:02:12 -0500, Harlan Messinger
<h.*********@comcast.net> wrote:
Comments? Alternative approaches, short of applying the class to each
of the
first-child TDs individually? Thanks.

You can only use the background, border, visibility and width properties
on col and colgroup.


Forgot to add: [http://ln.hixie.ch/?start=1070385285&count=1]


OK, thank you very much. But--bah! At least my grief is shared.

Jul 21 '05 #4

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

Similar topics

115
by: J | last post by:
I've run CSSCheck on my style sheets and I always get a warning similar to this: "font: bold 9pt/100% sans-serif Warning: Absolute length units should not generally be used on the Web ..." ...
2
by: Mark F | last post by:
In my stylesheet, body is defined: body { background-color: transparent; color: #000066; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: medium; margin: 0px;...
56
by: Don G | last post by:
I currently have IE6 and Firefox installed on my machine, and I switch between the two when testing web sites I am working on. It is my understanding that IE5 is still pretty common. Is this...
3
by: Andrew Mayo | last post by:
(note: reason for posting here; browser helper object is written in C++; C++ developers tend to know the intricacies of message handling; this looks like a Windows messaging issue) Microsoft...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
17
by: lawrence | last post by:
How is it possible that the question "How do I detect which browser the user has" is missing from this FAQ: http://www.faqts.com/knowledge_base/index.phtml/fid/125 and is only here on this...
11
by: blangela | last post by:
I am teaching a C programming course to C++ programmers and want to come up with list of _KEY_ differences between the two languages. Below is a list I have come up with so far. Have I missed any?...
16
by: Heinrich Pumpernickel | last post by:
i got the following strange extra question in a written test today . since the test was abt c/c++ i guess this is on topic here --8<-- 22) Consider the following quote: "If Mickey's a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.