my css doesnt work in ie

perkeyone

something clever
Reaction score
71
my style sheet has 2 id's "contacts" and "entry"
"contacts" works fine with ie but "entry" does not

i compared the two id's and found that they affect similar sectors and similar properties... so i dont understand what would be causing the problem.

i used ie's developer tools (f12) to turn off individual properties and found that if i turn of any property in the TH sector of the "entry" id, then turn it back on it will show properly... which only confuses me more.

here is my style sheet
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Okay, first, TOO MANY SCRIPT TAGS.
Why are you using so many script tags?

As for your question, IE has really bad support for standards, including CSS.
There are fixes, but they're ugly.

I'd have a look at this page for more info.
 

perkeyone

something clever
Reaction score
71
those script tags are generated by a loop.
im using them to dynamically add select options from a database.
im going to remove the source code since i doubt the problem lies there.
instead i am going to post a few images.
 

celerisk

When Zerg floweth, life is good
Reaction score
62
" but "entry" does not "

Care to tell us what exactly "it doesn't work" means here?


There's an extra \ at the end of the #entry line.


" IE has really bad support for standards, including CSS "

Perhaps. But IE8 is good enough for most things.
This also only applies to things like weirdo selectors that are almost never used.
They certainly aren't used in the top post...
 

UndeadDragon

Super Moderator
Reaction score
447
Havent looked through it all yet, but:

Code:
#entry{
	border-collapse:collapse;
	font-family:Arial Narrow, Helvetica, sans-serif;}\

I would remove the backslash.

Secondly:

Code:
<script language="javascript">addoption("type","1","Book")</script>
<script language="javascript">addoption("type","2","Curricula")</script>
<script language="javascript">addoption("type","3","Multimedia")</script>
<script language="javascript">addoption("type","4","People / Agency")</script>
<script language="javascript">addoption("type","5","Research / Article")</script>
<script language="javascript">addoption("type","6","Web / Unpublished")</script>
<script language="javascript">addkeyword("adoption")</script>
<script language="javascript">addkeyword("child abuse")</script>
<script language="javascript">addkeyword("domestic violence")</script>
<script language="javascript">addkeyword("foster care")</script>
<script language="javascript">addkeyword("truancy")</script>

-->

Code:
<script language="javascript">addoption("type","1","Book");
addoption("type","2","Curricula");
addoption("type","3","Multimedia");
addoption("type","4","People / Agency");
addoption("type","5","Research / Article");
addoption("type","6","Web / Unpublished");
addkeyword("adoption");
addkeyword("child abuse");
addkeyword("domestic violence");
addkeyword("foster care");
addkeyword("truancy")</script>
 

tooltiperror

Super Moderator
Reaction score
231
Code:
<script language="javascript">addoption("type","1","Book");
addoption("type","2","Curricula");
addoption("type","3","Multimedia");
addoption("type","4","People / Agency");
addoption("type","5","Research / Article");
addoption("type","6","Web / Unpublished");
addkeyword("adoption");
addkeyword("child abuse");
addkeyword("domestic violence");
addkeyword("foster care");
addkeyword("truancy")</script>

--->

Code:
    <script type="text/javascript" charset="UTF-8">
        addoption("type","1","Book");
        addoption("type","2","Curricula");
        addoption("type","3","Multimedia");
        addoption("type","4","People / Agency");
        addoption("type","5","Research / Article");
        addoption("type","6","Web / Unpublished");
        addkeyword("adoption");
        addkeyword("child abuse");
        addkeyword("domestic violence");
        addkeyword("foster care");
        addkeyword("truancy")
    </script>

Now it looks better, uses the text/javascript standard, and will translate correctly into other languages that support UTF-8 (including Japanese!) I think even on IE.
 

Magentix

if (OP.statement == false) postCount++;
Reaction score
107
Now it looks better, uses the text/javascript standard, and will translate correctly into other languages that support UTF-8 (including Japanese!) I think even on IE.

Or you could set the content-type for the entire document (like you always should)?:)

php:
PHP:
<?php
    header('Content-Type: text/html; charset=utf-8');
?>

xhtml:
PHP:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>

html5:
PHP:
<head>
<meta charset="utf-8">
</head>


EDIT:
PHP:
<script type="text/javascript" src="extravars.js.php"></script>
Use your script to load the vars in there.
Make sure to set your content-type in extravars.js.php to text/javascript (application/javascript or application/x-javascript sometimes fails in IE).

Externalizing it makes your code cleaner, avoids accidentally blocking synchronous downloads and is basically just awesome.
Especially when you set a .htaccess file to handle .js files in a certain folder as if they were php. (That way the filename could remain extravars.js)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top