CodeIgniter Forums
CSS menu works with Firefox, Opera, but not with IE - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: CSS menu works with Firefox, Opera, but not with IE (/thread-53300.html)

Pages: 1 2


CSS menu works with Firefox, Opera, but not with IE - El Forum - 07-18-2012

[eluser]mkmkmk[/eluser]
Hi everybody

A very strange situation, so I am unsure how to explain my problem.
The title is not correct: if I parse all thing into a variable and store it with file_put_contents() into a file, yes, than it works also with IE.

This works with FF and Opera, but not with IE: the sub-menues are not displayed.
Code:
$this->parser->parse('header', $data);
$this->load->view('temsilci_menu');
$this->load->view('footer');

Then I tried this:
Code:
$nix = $this->parser->parse('header', $data, TRUE);
$nix .= $this->parser->parse('temsilci_menu', $data, TRUE);
$nix .= $this->parser->parse('footer', $data, TRUE);
file_put_contents('application/views/nix123.php', $nix);
$this->load->view('nix123');
Again: this works with FF and Opera, but not with IE: the sub-menues are not displayed.
But if I change the extention of nix123.php to html and double-click on it, than it works fine with IE.

I hope I was able to describe my problem understandable.


Edit: Tested with 2.1.1 and 2.1.2
Edit2: Tested with IE8




CSS menu works with Firefox, Opera, but not with IE - El Forum - 07-18-2012

[eluser]mkmkmk[/eluser]
I played a little bit around. With this code also IE is running fine. But of course, it is a very ugly temporary solution:
Code:
$nix = $this->parser->parse('header', $data, TRUE);
$nix .= $this->parser->parse('temsilci_menu', $data, TRUE);
$nix .= $this->parser->parse('footer', $data, TRUE);
file_put_contents('nix123.php', $nix);
redirect('nix123.php');



CSS menu works with Firefox, Opera, but not with IE - El Forum - 07-19-2012

[eluser]blekknajt[/eluser]
So You are saying that generated code (as in source) in Opera is different than this in IE?


CSS menu works with Firefox, Opera, but not with IE - El Forum - 07-19-2012

[eluser]InsiteFX[/eluser]
In IE your sub-menus are probaly going behind your div.

This is a CSS problem with IE to fix you need to add zindex to your CSS code for your menus.



CSS menu works with Firefox, Opera, but not with IE - El Forum - 07-19-2012

[eluser]mkmkmk[/eluser]
Okay, let's assume this is a IE problem. But why does the page runs in IE without problem, if I redirect CI outputs to a file and open this file in IE?


CSS menu works with Firefox, Opera, but not with IE - El Forum - 07-19-2012

[eluser]mkmkmk[/eluser]
Inserting z-index property did not solve the problem.


CSS menu works with Firefox, Opera, but not with IE - El Forum - 07-19-2012

[eluser]blekknajt[/eluser]
Without code / url no one will help You.


CSS menu works with Firefox, Opera, but not with IE - El Forum - 07-19-2012

[eluser]blekknajt[/eluser]
One thing comes to my telepathic mind:
Quote:Quirks mode in any version of IE will also be triggered if anything precedes the DOCTYPE. For example, if a hypertext document contains a comment or any tag before the DOCTYPE, IE will use quirks mode:
Code:
<!-- This comment will put IE 6, 7, 8, and 9 in quirks mode -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
Quirks mode - Wikipedia


CSS menu works with Firefox, Opera, but not with IE - El Forum - 07-19-2012

[eluser]mkmkmk[/eluser]
I know that without code it is very hard to help. But for me it would be very difficult to extract this part of code from all others. Maybe I could delete all the business data and publish here a time-limited url; but I am not sure if this would help to find the problem.
But anyway: for myself I find a way to circumnavigate this problem. But I'm pretty nearly certain that this could be a bug.




CSS menu works with Firefox, Opera, but not with IE - El Forum - 07-19-2012

[eluser]mkmkmk[/eluser]
With the famous "try & error" methode I found a better solution:
If I insert a
Code:
<!DOCTYPE HTML>
into the root index.php, than everything works normal.
Can someone please explain me the reason for this behaviour?