开发者

Zend Framework / CSS (IE) isn't applying as it supposed to !

I have this really weird problem with Zend Framework and the view on all IE's I'm using the HTML/CSS template for the sticky footer, where the page is also centralised in the middle of the screen. I used the same template before applying the design on the code on Zend and all browsers worked perfectly fine. Now when I applied the design on the code, all browsers are still working fine except of IE (7,8,9) ! The page isn't centralised any more, and some elements aren't taking their CSS classes. I copied the exact same code I used before moving the code to Zend (which was working on IE) and pasted it into Zend and I still had the same problem. I even created a div and tried to centralise it using the following CS开发者_Python百科S code:

#container{
position:absolute; 
width:960px;
height:200px;
left:50%;
top:0;
margin-left:-480px;
}   

and still, it wasn't centralised on any of the IE browsers ...

Could anyone please try and help me figure out what exactly is going on??

Many thanks in advance !


Did you try : text-align:center;

Another way to center content is to do so :

#container{
     width:960px;
     height:200px;
     position: absolute;
     margin 0 auto;
     text-align:center; 
}

Look : http://jsfiddle.net/5u8aM/


Hello again everyone ... I'm not sure if I'm supposed to apologise for the question or not, but after a really long time of research and many tries to fix the issue I had either by changing the HTML code or CSS, the solution was really easy (or maybe I was stupid I didn't pay attention for it). All I had to do was change the doctype of the document, once I added < !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> all the CSS bugs was fixed, the page was centralised and it worked perfectly fine.

Regards

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜