Originally it was not embedded, but now in order to facilitate the modification of the navigation bar, the navigation bar is written into an html, so that it can be used on multiple pages after being modified separately in the future.
The problem is that the webpage is normal before it is embedded. However, after writing the navigation bar to another HTML, it becomes abnormal. Some cannot be displayed or even cannot load CSS. What is going on? CSS is standard and loaded inside the head
<link rel="stylesheet" href="./default.css" type="text/css">
<iframe name="content_frame" marginwidth=0 marginheight=0 width=100% src="./head.html" frameborder="0" scrolling="no" ></iframe>
<!--头部链接,嵌入整个NAV,包括最顶部、图片、和导航栏--> <div class="top"> <div id="nav"> <div class="nav-left"> 咨询电话:<font color="red">020-33445566</font> </div> <div class="nav-right"> <a href="">网站首页</a> | <a href="javascript:void(0);" onclick="AddFavorite('我的网站',location.href)">收藏本校</a> </div> <!--清除浮动--> <div class="clear"> </div> </div> <div class = "banner"> <center><img src="./Front-pic/banner.jpg" alt="aa" width="1079" height="120"></img></center> </div> <div class = "Navigation"> <div id="menu_wrapper" class="blue"> <div class="left"></div> <ul id="menu"> <li><a href="#">首页</a></li> <li><a href="#">招生信息</a></li> <li><a href="#">通知公告</a></li> <li><a href="#">网上报名</a></li> <li><a href="#">在线资讯</a></li> <li><a href="#">联系我们</a></li> </ul> </div> </div> </div>
Is there a problem with the path to import the css file?
There is no problem with the css file import Is there a problem with the path
Is this the way the page you embedded is written?
How should I write it? Is this how the page you embedded is written?
The HTML page embedded with iframe is an independent page, so you need to write the corresponding CSS style to the head.html page.