The bodies of subpages nested in iframe tags cannot overlap, as shown in the figure: _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:23:24
Original
2046 people have browsed it

html css web

The red box is the iframe side, the blue box is the subpage body side
Figure 1:

Figure 2:

Reply to discussion (solution)

What I want to achieve is: the blue box mark coincides with the red box mark

The blue box mark is the sub-page body edge
re:
Subpage? Is it also an iframe?

No, it refers to the iframe embedded page

Set the iframe's frameborder=0

The style of the iframe's connection page (your subpage) is

body {margin:0;padding:0;}
Copy after login
Copy after login

Set the iframe's frameborder=0

The style of the iframe's connection page (your subpage) is

body {margin:0;padding:0;}
Copy after login
Copy after login


Everything you mentioned has been set as follows (but it still doesn’t work):


Subpage: body{margin:0 auto; paddin:0; background:transparent; width:667px; overflow:auto ;}

paddin:0;? Is it because of a spelling error?

paddin:0;? Is it because of a spelling error?

paddin:0;? Is it because of a spelling error?

It’s just a mistake here, but it’s correct in the document

Is there an address that can be accessed from the public network?

Is there an address that can be accessed from the public network?

?Yes,?on???:
1.html






< ;style type="text/css">




left







2.html








 <br /> aaaaa <br /> aaaaa <br /> aaaaaa <br /> aaaaaaaa <br /> 



Main page

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=gb2312" /><title></title></head><style type="text/css"><!-- *{border:none; margin:0 auto; padding:0;}div{border:1px solid red; width:600px;}--></style><body><div id="lDiv">left</div><div id="rDiv"><iframe marginheight="0" marginwidth="0" frameborder="0" allowtransparency="no" name="ifm" src="7.html"></iframe></div></body></html>
Copy after login

7.html
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=gb2312" /><title>iframe child</title><style type="text/css">body{margin:0;padding:0;}</style></head><body><pre class="brush:php;toolbar:false">aaaaaaaaaaaaaaaaaaaaaaaa
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template