简体   繁体   English

删除周围的空白<object></object>

[英]Remove white space around <object></object>

I am doing a website for internet explorer. 我正在为Internet Explorer开发一个网站。 (don't judge!) (不要判断!)

I noticed this white border around the content of the second frame.. 我注意到第二帧内容周围的白色边框。 在此处输入图片说明 Here is the code: 这是代码:

 <html> <head> <title>Web remote Desktop</title> <script language="javascript" type="text/javascript"> if(!(window.navigator.userAgent.indexOf("MSIE ") > 0)) { window.location = "./redir.html"; } </script> </head> <frameset cols="200, *" onload="checkIfIE()" name="full"> <frame src="nav.html" name="nav"> <frame src="content.php" name="desktop" scrolling="no"> </frameset> </html> 

 <html> <head> </head> <body> <?php if(true || isset($_POST["todo"])) { echo('<object todo="irrelevant" width="100%" height="100%"> </object>'); } else { #display start page include_once "default.php"; } ?> </body> </html> 

I looked up different ways to fix this - 90% of them being " add margin , padding and/ or border="0" " - that all have helped nothing if added to any or all, <frame> , <body> or <object> . 我查找了解决此问题的不同方法-其中90%是“ 添加页marginpadding和/或border="0" “-如果将这些添加到任何一个或所有<frame><frame><body><object>

What else can I do/ what might have gone wrong? 我还能做些什么/可能出了什么问题?

It's definitely a margin issue somewhere; 这肯定是某个地方的保证金问题; but it might be hard to find where exactly; 但是可能很难找到确切的位置。 it could be inside of one of your frames, or maybe not. 它可能在您其中一个框架内,也可能不在。 Try using browser developer tools (F12) and use the Select Element tool to click into the innermost element in that content frame. 尝试使用浏览器开发人员工具(F12),然后使用“选择元素”工具单击该内容框架中最里面的元素。 Then, with the Styles tab open on the right, click on each element in the tree until you find one that has a margin or padding that is affecting the layout. 然后,在右侧打开“样式”选项卡的情况下,单击树中的每个元素,直到找到一个具有影响布局的边距或填充的元素。

Please add the following CSS rules into the <head> of the page: 请将以下CSS规则添加到页面的<head>中:

<style type="text/css">    
    html, body, object { padding: 0; margin: 0; }
</style>

And see if that helps. 看看是否有帮助。

Do you have any CSS/styling added? 您是否添加了任何CSS /样式?

Try this inside a .css file and adding it to your <head> : 在.css文件中尝试此操作并将其添加到您的<head>

html, frameset, frame {
 margin: 0;
 padding: 0;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM