Welcome to WebmasterWorld Guest from 34.204.203.142

Forum Moderators: open

Message Too Old, No Replies

Script is Centered in IE but shifs to right in FF

     
6:01 pm on Aug 27, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 26, 2004
posts:778
votes: 1


I am using Firefox 3.0.1 to view a page I have set up. The following line of code shows up centered in IE, but is shifted to the right in Firefox. Any idea why?

<p align="center"><script language="javascript" type="text/javascript" src="http://www.example.com/include/p_drive_qt_banner3.js"></script></p>

6:52 pm on Aug 27, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


There are many possibilities, depending on your DTD and also potentially the content of the javascript. since the align attribute is deprecated in HTML 4 [webmasterworld.com], does the layout render better using this mark-up:

<p style="text-align:center">

9:51 pm on Aug 29, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 26, 2004
posts:778
votes: 1


<p style="text-align:center">

No, I just tried this form and it doesn't work. I would agree that the JavaScript has something in it that would cause this, but why would it be ok in IE?