Oh, no. It's even more fun than that. Internet Explorer does not go with the margin:0 auto; You have to use text-align:center :) So it's more like:
<body> <div id="wrap"> ... your centered content ... </div> </body> and <style type="text/css"> body { text-align: center; // IE centering } #wrap { text-align: left; // Reset back to left margin: 0 auto; // Modern browser centering } </style> Gusts PS. I didn't test this, but it's the same thing we use every day to center whole page. On 2012.08.12. 18:31, Angel Herráez wrote: > Bob wrote: > >> -- I had to play some jQuery tricks to implement <center>, but that's good >> to learn how to do >> anyway. I did have a problem implementing my .center() method without >> hard-coding widths, but >> that's probably what you need to do anyway when you use anything that >> involves page centering. > Centering without <center> or align="center" (both of which are deprecated) > is quite a pain, yes, but have you tried this? It usually works for me with > tables. > > > <table style="margin:0 auto;"> > > or > > <table style="margin-left:auto; margin-right:auto;"> > > > And no need for calling $(window).resize() > > You can of course take it out from the body into your css sectin or external > file. > > <style type="text/css"> > .centered { margin-left:auto; margin-right:auto; } > </style> > > <table class="centered"> > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Jmol-developers mailing list > Jmol-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-developers -- Gusts Kaksis ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers