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

IE Won't Display Formatting of Custom Tags

I use Mozilla 1.4a almost exclusively for my general browsing needs.
I'm working on a blog and am playing around with CSS a bit. Things
were looking quite nice in Mozilla, and I didn't think to check
whether the page looked okay in IE. Then a friend told me that some
of my formatting didn't show up, and I'm at a loss as to how to fix
it.

IE6 handles all the standard CSS tags properly; it's the one's I've
made up myself that it doesn't do right. For example, I have the
following set up to format dictionary entries:

.blogPost asha{font-weight:bold;}
.blogPost eng{font-style:italic;}
.blogPost ipa{font-family:monospace;}

And:

<p><asha>foreign word</asha> <ipa>[pronunciation]</ipa> <eng>English
translation</eng></p>

This works perfectly in Mozilla -- the foreign word is bold, the
pronunciation is monospaced, and the English is italicized. IE shows
no formatting at all. How can I fix this?

Thanks!
--
AA
Jul 20 '05 #1
1 3803
*Evertjan.* <ex**************@interxnl.net>:
Arthaey wrote on 08 jul 2003 in comp.infosystems.www.authoring.stylesheets:
<p><asha>foreign word</asha> <ipa>[pronunciation]</ipa> <eng>English
translation</eng></p>

This works perfectly in Mozilla -- the foreign word is bold, the
pronunciation is monospaced, and the English is italicized. IE shows
no formatting at all. How can I fix this?

Probably by using some specialised XML application instead of HTML.
.asha{font-weight:bold;}

<span class="asha">...</span>


More appropriate, in theory, would be the 'lang' or 'xml:lang' attribute and
the ':lang' pseudo-class, though. (If "asha" is a language.) Perhaps a table
or definition list is also a better approach.

<dl>
<dt lang="asha">foreign word</dt>
<dd lang="ipa">[pronunciation]</dd>
<dd lang="en">English translation</dd>
</dl>

or

<table>
<tr><th lang="asha">foreign word</th>
<td lang="ipa">[pronunciation]</td>
<td lang="en">English translation</td></tr>
</table>

Note that "ipa" is not a valid language code according to ISO 639, but is
used for example by MPEG 4. It's probably better to use it as a suffix to
the transcribed language ("asha-IPA") or mark it as of personal use
("x-IPA"). The required CSS rules would differ in both these cases.
I've no idea what "asha" may stand for, so I left it in unmodified. Google
says the American Speech-Language-Hearing Association is abbreviated so.
You may of course alternately use the three letter code "eng" instead of the
two letter one "en" for English.

:lang(asha) {font-weight:bold;}
:lang(en) {font-style:italic;}
:lang(ipa) {font-family:monospace;} /* I doubt this was a good choice. A
font with IPA characters should already be in a reasonable style. It's not
very likely a user has a full IPA font at all, even less a monospaced one.
*/

I'm not aware of any working implementation of ':lang()'. A less powerful,
less exact alternative, that isn't supported by IE<6 and NS<4 either, would
be to use attribute selectors:

[lang|=asha] {font-weight:bold;}
[lang|=en] {font-style:italic;}
[lang|=ipa] {font-family:monospace;}

For XHTML 1.1 and /real/ XHTML 1.0 you would have to change the colon to
pipe in the CSS (only proposed yet IIRC):

[xml|lang|="asha"] {font-weight:bold;}
[xml|lang|="en"] {font-style:italic;}
[xml|lang|="ipa"] {font-family:monospace;}

All variants /should/ work the same with the universal selector "*" added at
the beginning.

--
"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that."
G. H. Hardy
Jul 20 '05 #2

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

Similar topics

5
by: javaguy | last post by:
I have a data entry web application that is formatted heavily with tables. Having learned a bit of CSS, I'm hoping to rewrite this using <div> tags. But I have run into a formatting problem that...
23
by: Mat | last post by:
<div id="container"> <div id="main"> <div id="header"> <p class="Address">123 Fake Street, </p> <p class="City">Crazy City, </p> <p class="Province">Ontario </p> <p class="PostalCode">H0H...
6
by: Kevin G. | last post by:
I'm not sure if this is possible, but if a page uses a CSS style sheet and you would still like to use good old <font> tags... is there a tag to tell the browser to ignore the CSS formatting just...
0
by: Noel Volin | last post by:
Hi all, I have a customer server menu control that I downloaded from gotdotnet in order to learn a little more about custom controls. The problem is that everything works wonderfully if I view...
5
by: iegeek | last post by:
Hi all, I know this is a well-worn topic, but in viewing multiple posts and articles, I still can't find a satisfactory answer. I have embedded html in an xml file (element data, not attributes)...
2
by: rickholt | last post by:
Many years ago at IBM we had a text formatting language (DCF) which let you specify all sorts of microcommands to a page formatter. Not particularly exciting, but it was also a primitive...
0
by: peridian | last post by:
Hi, I wanted a web page where I could post code to, and have it appear in coloured formatting based on the context of the code. Most of the techniques I have seen for this involve complex use...
1
Gulzor
by: Gulzor | last post by:
Hi, I have defined a set of custom tags that I put among regular HTML tags. E.g. <body> <div id="regular_id"> <namespace:container id="something" type="article" /> </div> </body>
3
by: IT Couple | last post by:
Hi In the past I have used HTML tags to generate HTML emails, now I want to store the data with HTML tags but display the data on a report. Is there a control that is able to undestand HTML...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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...

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.