Welcome Guest, Not a member yet? Register   Sign In
css problem in IE
#1

[eluser]murtuza54[/eluser]
Hi

In my application css files are in css folder on root directory

in header view
i wrote
<link type=“text/css” rel=“stylesheet” href=”/css/style.css”>

so application runs well and fine in mozilla firefox with all css effects but fails in IE,
means in IE css effects are not shown..

in page source it displays the same as above..

my question is how is it possible that firefox gets css correctly but not IE


the other point..
my image folder and javascript folder are also on root directory
and i have given their path also like this..
and their effects are shown well and fine in IE even..
only problem is CSS…

any help?
#2

[eluser]TheFuzzy0ne[/eluser]
I'd guess that for starters you haven't declared a DOCTYPE so IE doesn't know what kind of document it's parsing (Firefox is very forgiving).

Try adding the line like this:

Code:
<link type="text/css" rel="stylesheet" href="/css/style.css" />

(Note the inline XML-style closing tag).

I think the document is probably being parsed as XHTML.
#3

[eluser]murtuza54[/eluser]
Thanks for reply

i tried />
but its not working..
still same problem...
#4

[eluser]murtuza54[/eluser]
ok

can you please tell me how you use css in your application?
what be the path and how you link it?
#5

[eluser]TheFuzzy0ne[/eluser]
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Welcome to my Web site&lt;/title&gt;
    
    &lt;link rel="stylesheet" type="text/css" href="/css/main.css" /&gt;
&lt;/head&gt;
&lt;body&gt;
...

Another thing to try, would be clearing Internet Explorer's Temporary Internet Files.
#6

[eluser]murtuza54[/eluser]
nothing happenes with temporary file clearance..

is your code working fine in both IE and firefox?
#7

[eluser]maesk[/eluser]
Hi,

Please don't crosspost (http://ellislab.com/forums/viewthread/105215/)!

I use the site_url() function for my CSS / images / JavaScript. Example:
Code:
&lt;link rel="stylesheet" type="text/css" href="&lt;?php echo site_url('/css/global.css'); ?&gt;" /&gt;

It works fine.
#8

[eluser]murtuza54[/eluser]
yes i made it second time
but first time i made it in Lounge section where i was not getting replies...then i made topic in code and application section..

and i tried to find option to delete post.. but i dint get anywhere..
can you please let me know where is it?
i also want to delete my redundant thread..
#9

[eluser]maesk[/eluser]
I think you can't delete it, just make sure you're in the right forum next time. For the Lounge it says:

Quote:CodeIgniter's social forum where you can discuss anything not related to development.

Has your CSS problem been solved?
#10

[eluser]murtuza54[/eluser]
thank you friend, I will take care next time.

and yes finaly i solved css problem

solution is somewhat weird

i just simply changed

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

to


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

and it started working




Theme © iAndrew 2016 - Forum software by © MyBB