从WebBrowser控件中删除边框 [英] Removing border from WebBrowser control

查看:107
本文介绍了从WebBrowser控件中删除边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WebBrowser控件坐在里面有刺激性2px的插图看的边境周围窗体上。它使我的内容由4 PX在右侧和底部被剪切,我不能找出如何摆脱它。该控件本身没有任何边框样式属性 - ?一个人如何删除边框

I've got a WebBrowser control sitting on a Form which has an irritating 2px inset-looking border around it. It's causing my content to be clipped by 4 px on the right and bottom, and I can't figure out how to get rid of it. The control itself doesn't have any BorderStyle properties -- how does one remove the border?

请参阅红色区域中的截屏:

See the red area in the screen shot:

我想要的web浏览器看起来像蓝色区域 - 也就是填写表格,并针对窗体的边缘齐平。

I want the WebBrowser to look like the blue area -- that is, to fill the Form and be flush against the Form's edges.

推荐答案

IE借鉴,作为对body标签的默认样式的一部分。设置边界:0px body元素,它会消失。

IE draws that as part of the default style on the body tag. Set border:0px on the body element and it goes away.

值得庆幸的是,这是<一个href="http://blogs.msdn.com/b/ie/archive/2010/08/23/making-sites-look-their-best-in-standards-mode.aspx"相对=nofollow>在IE9 要走了。

Thankfully, this is going away in IE9.

这篇关于从WebBrowser控件中删除边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆