jquery - Floating div at center doesn't work in IE -


let's have fallowing html-

    <div  id="submitpage" align="center" > <div id="middlecontainer"> <p align="center" id="loading-image">&nbsp;<img  src="/cso/images/loading.gif" border="0" > <font color="red" >submiting order...</font></p> </div> </div> 

i trying float submitpage div @ center of page...i ahve used fallowing css , it's working fine in mozila don't know why it's not working in ie-8..

#submitpage {  border: 1px solid black;  width: 746px;  height:201px;  background: aqua;   text-align: center;  z-index: 99;  position: fixed;  display: block;  margin:90px auto; } #middlecontainer{  text-align: center;  width: 91px; margin: 0 327px; } #loading-image {   position: absolute;   top: 74px;   left: 299px;   z-index: 100; } 

please let me if doing wrong or missing needs added ie.any way doing using jquery appreciated.

mozila screen shot

thanks.!

excuse me saying so, but... mess. mixing html attributes , css, centering, centering , centering. , centering. , font tags. , centering...

you should avoid specify centered text element contains block elements, because ie handles incorrectly , applies centering on block elements, not text.

as placing text , image in element, need element, image, , text:

<div  id="submitpage">   <img src="/cso/images/loading.gif" alt="">submitting order... </div>  #submitpage {   border: 1px solid black;   width: 746px;   height: 201px;   background: #0ff;    z-index: 99;   position: fixed;   left: 50%;   top: 90px;   margin-left: -373px;   line-height: 201px;   text-align: center;   color: #f00; } #submitpage img{   margin-right: 10px;   border: none; } 

demo: http://jsfiddle.net/pkmqm/


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -