More General HTML/Web Design Programming Q`s Answers
Question Library
Ask a question about General HTML/Web Design Programming Q`s
Volunteer
Experts of the Month
Expert Login
Awards
About Us
Tell friends
Link to Us
Disclaimer
|
| |
|
|
| |
| | | |
About John Martin
Expertise I am able to answer any web design related questions including but not limited to html, dhtml, xml, wml, css, php, flash, swf and WAP. I have computers and electronics experience dating before the Military where I served as a tactical telecommunication com center operator in Military Intelligence during Desert Storm (and Desert Shield). I have a total of 22 consecutive years of computer experience (since age 14) and also teach computer classes locally. I also know little known secrets to making money online and SEO.
http://www.yallways.com
Experience 22 years of consecutive computer related jobs, hobbies and Military operations.
Education/Credentials Personal experience, US Military Intelligence experience, Schooling and Signal Corp. Training as well.
Awards and Honors Army accommodation medal and a two week advancement in A.I.T. training due to already existent computer knowledge at the time.
| | |
| |
You are here: Experts > Internet/Online > Personal Web Pages > General HTML/Web Design Programming Q`s > Charset & CSS incompatibility?
Expert: John Martin - 11/8/2009
Question I run several different websites, and am having a problem with some of them in Firefox - the CSS won't display. At first, I thought the CSS alone was the problem, but after using people's suggestions on some forums - validating my CSS, making sure things were linked properly, reuploading files, etc - nothing helped. After someone suggested viewing the CSS through Firebug, I was shocked to see that it was displaying as Chinese characters.
This is only happening on sites with unicode characters. I have one site devoted to the Russian language, another devoted to Japanese song translations, and sometimes these languages appear on my other sites as well. You can see here (http://www.dreamwatersprings.com/russki/) that the CSS will not display at all in Firefox, yet it works fine in IE (because IE is more forgiving). The Japanese site suffers the same problem (http://www.dreamwatersprings.com/animelody/) - all the pages should have colored links; some display properly, while the others don't.
I'm not sure what to try - I don't know what encoding I should be using so that it works properly (even when I take the metatag out completely, the page will still not display CSS if there's a unicode character on it).
I need this problem fixed once and for all... and please, if you're going to critique my crappy HTML skills, do it tactfully.
Thank you,
Dreams
Answer There is a major conflict between internal styles of several pages in Firefox when using frames and iframes. In order to bypass his problem, you should use a single external CSS and simply link them to the pages. You have this done for one page but the rest of the pages have internet CSS. Try removing them and placing the styles in the external style sheet and then just link them in the header.
In short, anytime you use frames or iframes, avoid using internal styles... using individual styles on certain tags are okay but I am mainly referring to areas like this...
<style type="text/css">
A:link
{ text-decoration:none; color:#ffff00 }
A:visited
{ text-decoration:none; color:#ffff00 }
A:active
{ text-decoration:none; color:#ffff00 }
A:hover
{ color: #ffff00 ; text-transform: none; height:0; filter:blur(add=false,direction="120",strength="4") ; Cursor:crosshair; }
BODY
{ background: #ffffff;
scrollbar-face-color:#ffffff;
scrollbar-shadow-color:#000000;
scrollbar-highlight-color:#000000;
scrollbar-3dlight-color:#ffffff;
scrollbar-darkshadow-color:#ffffff;
scrollbar-track-color:#ffffff;
scrollbar-arrow-color:#000000;
}
</style>
ALSO, attempting to color scrollbars can cause errors in firefox when trying to read css. It is best to create a seperate css page for this and link to this css only if the user is on IE. Example...
<SCRIPT language=”JavaScript”>
var browserName=navigator.appName;
if (browserName==”Microsoft Internet Explorer”)
{
//load ie friendly stylesheet
document.write(’<link rel=”stylesheet” href=”/stylesie.css” type=”text/css”>’)
}
else
{
if ((parseFloat(navigator.appVersion)) >= 5 )
{
// if ns version is great than or equal to 5 (6) load this stylesheet
document.write(’<link rel=”stylesheet” href=”/stylesie.css” type=”text/css”>’)
} else {
//if you have a really ancient browser (ie. NS 4.7 or earlier) load this stylesheet
document.write(’<link rel=”stylesheet” href=”/stylesns.css” type=”text/css”>’)
}
}
</SCRIPT>
Ask a Question
|
|