The problem:
Here is what I do
body {
border: 0;
}
as was suggested here: Removing border from WebBrowser control
But this only works when we use the following doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
When doctype is changed to
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
the nasty border won't go away!
But I need the XHTML doctype in order for "position: fixed" to work in IE.
Any suggestions?
The code:
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>
<title>Borders, Go Away!</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
</body>
</html>
CSS:
body {
border: 0;
}
OK, it seems there is no way to remove the border from CSS when XHTML DOCTYPE is used in IE.
I ended up implementing GetHostInfo method of the IDocHostUIHandler interface of the WebBrowser control/component in my desktop app, as this example in Delphi illustrates: Frameless Web Browser
And here is another related question here on StackOverflow: Remove border on activex ie control
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With