S
Steve
Hi,
I've come across what appears to be a bug in the rendering engine of internet explorer when a document is opened by
showModalDialog. Basically any elements that should render to the right hand edge of the window (i.e. Horizontal rules,
100% tables) fall short by around 15 - 20 pixels or so. I'm currently using internet explorer 6 and have created two
simple pages to demonstrate the behavior. My original pages were much more complicated but the effect remains even with
the most basic of documents.
Create a file called Dialog.html and put the following lines within it.
<HTML>
<HEAD>
</HEAD>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<hr>
</BODY>
</HTML>
Save it and then open it in internet explorer. The horizontal line goes from left to right perfectly to the right hand
border.
Now create a page called MainPage.html with the same folder as the previous page. Within it have this code;
<HTML>
<HEAD>
</HEAD>
<BODY>
<script language="Javascript">
window.showModalDialog('dialog.html','','dialogWidth:540px;dialogHeight:450px');
</script>
</BODY>
</HTML>
Now open MainPage.html with internet explorer and the dialog that appears will not show the HR rule to the right hand
edge, it falls short by around 20 pixels.
The same effect appears with tables that are 100%, they finish before the right hand margin and if they have a
background colour set it will look quite messy. My problem for one of our pieces of intranet software is that we have a
corporate banner that must appear at the top of every page. On dialog pages the banner falls short of the edge by a very
noticeable amount and is unacceptable.
I've coded a work around that basically checks if the current page is a dialog page and if it is it adjusts the table to
make it bigger, here's the code;
if(typeof(self.window.dialogWidth)!="undefined")
window.document.all.SmallBannerTable.width=self.window.dialogWidth;
So if it's a dialog it resizes the table to the dialog width. Actually it's sizes it a little too wide but I'll fix
that very shortly.
So my question for anyone that knows,
Is this a bug ? or am missing something that I should be doing?
Steve
Remove 'TheCompany' in email address to give correct version.
I've come across what appears to be a bug in the rendering engine of internet explorer when a document is opened by
showModalDialog. Basically any elements that should render to the right hand edge of the window (i.e. Horizontal rules,
100% tables) fall short by around 15 - 20 pixels or so. I'm currently using internet explorer 6 and have created two
simple pages to demonstrate the behavior. My original pages were much more complicated but the effect remains even with
the most basic of documents.
Create a file called Dialog.html and put the following lines within it.
<HTML>
<HEAD>
</HEAD>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<hr>
</BODY>
</HTML>
Save it and then open it in internet explorer. The horizontal line goes from left to right perfectly to the right hand
border.
Now create a page called MainPage.html with the same folder as the previous page. Within it have this code;
<HTML>
<HEAD>
</HEAD>
<BODY>
<script language="Javascript">
window.showModalDialog('dialog.html','','dialogWidth:540px;dialogHeight:450px');
</script>
</BODY>
</HTML>
Now open MainPage.html with internet explorer and the dialog that appears will not show the HR rule to the right hand
edge, it falls short by around 20 pixels.
The same effect appears with tables that are 100%, they finish before the right hand margin and if they have a
background colour set it will look quite messy. My problem for one of our pieces of intranet software is that we have a
corporate banner that must appear at the top of every page. On dialog pages the banner falls short of the edge by a very
noticeable amount and is unacceptable.
I've coded a work around that basically checks if the current page is a dialog page and if it is it adjusts the table to
make it bigger, here's the code;
if(typeof(self.window.dialogWidth)!="undefined")
window.document.all.SmallBannerTable.width=self.window.dialogWidth;
So if it's a dialog it resizes the table to the dialog width. Actually it's sizes it a little too wide but I'll fix
that very shortly.
So my question for anyone that knows,
Is this a bug ? or am missing something that I should be doing?
Steve
Remove 'TheCompany' in email address to give correct version.