Using Header - Main - Footer Template is getting wierd on IE - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Using Header - Main - Footer Template is getting wierd on IE (/showthread.php?tid=39975) Pages:
1
2
|
Using Header - Main - Footer Template is getting wierd on IE - El Forum - 03-26-2011 [eluser]barisv[/eluser] Hi, I am trying to write a admin page that its header and footer are same on all pages. So I decided to create a template to not to write (copy-paste) them all pages. Just the main page will be the dynamic one. I did it the way as below: admin_template.php Code: <?php $this->load->view('includes/admin_header.php'); ?> So I can call it from the function I wanted. Code: function index() Now, the problem is, this way is breaking the style for all IE versions. The other browsers are working fine. Then I deleted the template and I put header, main and footer in one page , it works nice for also IE even if the both way produces the exactly same output when I looked at the source code. What is the problem ? Thanks in advance for your help. Screenshots of problem IE Problem : http://i54.tinypic.com/qsqczb.jpg This is what I wanted: http://i56.tinypic.com/54sv2s.jpg Using Header - Main - Footer Template is getting wierd on IE - El Forum - 03-26-2011 [eluser]Piter[/eluser] Hi, A better solution would be to use layout, see: http://codeigniter.com/wiki/layout_library/ Using Header - Main - Footer Template is getting wierd on IE - El Forum - 03-26-2011 [eluser]TWP Marketing[/eluser] Barisv Which version of CI are you using? Is the path to your CSS files correct and the same in both cases? Using Header - Main - Footer Template is getting wierd on IE - El Forum - 03-26-2011 [eluser]barisv[/eluser] I am using 2.0 and I can say that all the things are same so I couldnt figure out the problem. Very interesting for me. I am looking at the layouts as Plter adviced. Thanks Using Header - Main - Footer Template is getting wierd on IE - El Forum - 03-26-2011 [eluser]TWP Marketing[/eluser] Without seeing your css code, it's hard to guess, but you may be using an attribute that microsoft has deemed unworthy of support %-P That's a problem relating to which version of IE you're using to test with. How are you centering your layout? Using Header - Main - Footer Template is getting wierd on IE - El Forum - 03-26-2011 [eluser]barisv[/eluser] Actually I think the problem is not about so much css, because when I gathered all pieces together with same css files, it also works for IEs. I am using IE Tester and all versions of it have same problem. Not only the centralization problem, also navigation bar's height is getting bigger. I am using margin:0 auto but I can also use text-align:center for body and text-align:left for container div. Maybe it helps but this is not only the problem. And I really want to know what causes this ? I am very curious about it (: Using Header - Main - Footer Template is getting wierd on IE - El Forum - 03-26-2011 [eluser]TWP Marketing[/eluser] I don't see anything special in the layout library, but do post a reply if it works for you. If it doesn't solve the problem, please post your CSS and view code. Using Header - Main - Footer Template is getting wierd on IE - El Forum - 03-26-2011 [eluser]barisv[/eluser] Layout class worked (: I have thought headache will continue. In addition to that its more flexible from my solution. dzięki Plter . but I want to know why my solution isnt working if anyone knows the answer Using Header - Main - Footer Template is getting wierd on IE - El Forum - 03-27-2011 [eluser]InsiteFX[/eluser] Like they said above you need to code a special .css file for each version of IE IE does things different then all the other browsers! Do a search in google on IE BUGS! InsiteFX Using Header - Main - Footer Template is getting wierd on IE - El Forum - 03-27-2011 [eluser]skunkbad[/eluser] [quote author="InsiteFX" date="1301254408"]Like they said above you need to code a special .css file for each version of IE IE does things different then all the other browsers! Do a search in google on IE BUGS! InsiteFX[/quote] I don't use IE specific stylesheets anymore, and can achieve the same display regardless of browser, and without browser hacks that make the stylesheet not validate. I will say that YUI css reset has some hacks, and I do use the YUI css reset. I don't know if that means anything to OP. I'd never start another project without using it. |