Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

#obsolete

Options
Go to last post Go to first unread
Fedor  
#1 Posted : Monday, January 30, 2006 6:00:00 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,558

Thanks: 5 times
Was thanked: 62 time(s) in 61 post(s)
This article describes how to resolve a problem with incorrect rendering of the BitmapViewer web control in Internet Explorer (when scrollbars are disregarded and the image is overflowed out of the control area).

Symptoms

Under some circumstances an image displayed in the BitmapViewer web control overflows the control area (it is drawn above scrollbars). This problem occurs in Internet Explorer only:

UserPostedImage

In alternative browsers such as Firefox, Opera, Safari, Konqueror, etc. the control is displayed properly:

UserPostedImage

UserPostedImage

Reason

This problem occurs only if the browser is switched into CSS1-compatble mode. Internet Explorer is not 100% compatible with CSS1 (from the point of view of the specification). In particular it does not handle certain elements properly and therefore disregards scrollbars.

However Internet Explorer can work in so-called quirk mode. This is a mode of backward compatibility with previous versions of Internet Explorer.

CSS1-compatible mode is set when you use one of the following DTD declarations at the top of the HTML page with the BitmapViewer:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


Typically such declarations are inserted when you create a page in Visual Studio 2005.

Solution

To eliminate this problem you should switch the browser into the quirk mode. It can be done by specifying the HTML 4.01 Transitional DTD declaration without system identifiers (URI references):

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >


Alternatively, you can just remove the DTD declaration.

As soon as you apply all necessary changes, BitmapViewer will work properly in Internet Explorer:

UserPostedImage

Note: if you are not going to use Internet Explorer as a client platform of your web application, and expect to use some alternative browsers like Firefox, Mozilla, Safari, and Opera, you can continue using CSS1-compatible mode. These browsers will work properly with any DTD declaration.

See Also

MSDN: compatMode Property
Best regards,
Fedor Skvortsov
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.