473,550 Members | 2,692 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

showModalDialog leaves gap at right hand edge


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.

<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0 " >

Save it and then open it in internet explorer. The horizontal line goes from left to right perfectly to the right hand

Now create a page called MainPage.html with the same folder as the previous page. Within it have this code;

<script language="Javas cript">
window.showModa lDialog('dialog .html','','dial ogWidth:540px;d ialogHeight:450 px');
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.dialogWi dth)!="undefine d")
window.document .all.SmallBanne rTable.width=se lf.window.dialo gWidth;
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?
Remove 'TheCompany' in email address to give correct version.
Jul 20 '05 #1
2 5117
On Mon, 08 Sep 2003 12:08:04 +0100, Steve
<so*****@nelson .TheCompanypama rco.co.uk> wrote:
So my question for anyone that knows,

Is this a bug ? or am missing something that I should be doing?

It's space reserved for the scrollbar, use CSS to ensure it's not

comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #2
Ahh, well that explains it. Still seems a bit odd that the behavior isn't the same as normal windows, i.e. it should fit
to the end when no scroll bar and adjust itself when there is a scroll bar, like normal pages do. The dialogs I present
to users are generated by PHP and some may require scroll bars and some may not depending upon the amount of data to

Would your CSS fix just ensure no scroll bar is present (which won't work for my pages) or are you setting some other
property ?

Thanks for your input,


On Mon, 08 Sep 2003 11:16:53 GMT, ji*@jibbering.c om (Jim Ley) wrote:
On Mon, 08 Sep 2003 12:08:04 +0100, Steve
<so*****@nelso n.TheCompanypam arco.co.uk> wrote:
So my question for anyone that knows,

Is this a bug ? or am missing something that I should be doing?

It's space reserved for the scrollbar, use CSS to ensure it's not


Remove 'TheCompany' in email address to give correct version.
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: jake | last post by:
Maybe some kind person can help with a suggestion or two ;-) I want to construct a banner on a number of pages in the format: LHS: Text (variable content) RHS. Logo ..... each with a different background colour. The following test page shows what I'm trying to achieve (borders put in for diagnostic purposes).
by: F. Da Costa | last post by:
Hi, I've been wrecking my brain on what is probably a very small thing. On the following link i've got a page that does not fill properly to the right-hand side. As you can see the bannerArea is too short (compared to the width of the screen). How do i make sure that the bannerArea div also fills to the side like the other divs?
by: csgraham74 | last post by:
Hi guys, I ve created a web control - i want to make sure that it always sits at the very bottom of the browser screen. How can i achieve this. Ive been playing about with tables etc.. in html but moving the vertical align affects all other controls tables etc. on the screen. basically can i force a control or table to be at the bottom of...
by: clubamigos | last post by:
I am having problems with getting a right hand side border positioned correctly. What l would like is for the dotted line to touch the navbar and the bottom of the content section of the page. If you see the following screenshot you will see what l am trying to achieve. The red line indicates what l am trying to do. I would really appreciate any...
by: jj | last post by:
I have a single threaded application in c# that scans through a file system. While doing this if I try to minimize, maximize buttons on the top,right hand corner of my form do not do as they are supposed to do. To maximize the window I have to go to "task manager" and double click the application. How do I control those maximize, minimize...
by: bruno | last post by:
I have a .aspx with a TreeView in the left hand and a GridView or a FormView in the right hand. I would like to resize the two sides like in http://msdn.microsoft.com/library/default.asp, but I didn't find the solution. Can I get any help? Just a sample or a link to where I can learn about. Thank you very much. -- bruno
by: aarthi28 | last post by:
Hi, I have written this code, and at the end, I am trying to write a vector of strings into a text file. However, my program is nor compiling, and it gives me the following error when I try to write to the file: error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable...
by: Inbaraj | last post by:
HI.... This is Inbaraj... I am doing an Internet Chat program... I that if a person who enter into that portal a popup message should be displayed like in google talk.. In right hand side a popup window will be displaying saying that person is online.. I dont know how to bring that pop window in the righ handside corner.. can...
by: Vaibhav Shinde | last post by:
i am getting an unwanted blank space on the right hand side and the bottom of the page. also facing problems with the layout in different IE versions. Thanks in Advance
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.