What are the alternatives to the HTML5 frameset label? Solutions for frameset Label substitution

Source: Internet
Author: User
This article is mainly about the HTML5 Frameset label Alternative case resolution, and about the HTML5 frameset label two solutions, now let's look at this article.





First, let's take a look at what the alternative to the HTML5 frameset tag is:



The page as little as possible with frameset is not conducive to search engines.



Here are the warning tips for frameset and frame in Visual Studio:



Warning Validation (XHTML 1.0 Transitional): element "Frameset" is not supported.



Warning Validation (XHTML 1.0 Transitional): element "Frame" is not supported.



The new HTML standard already does not support frameset and frame elements, one alternative is to use a div with the IFRAME and CSS instead of the FRAMESET element. IFrame based on different content, aspect adaptive is actually very simple, but a lot of people do not solve, the solution is as follows < is to set its height and width in the OnLoad method;


<div id="navigation">
<! -- where asp.net Treeview, menu and other menu controls in the database or HTML < U > < li > tags with CSS, configuration menu can be read dynamically in the database or in the
Configure in XML -- >
</div>
<div id="content">
<iframe id="contentIFrame" name="Content" src=" XMLDataBinding.aspx " scrolling="no" frameborder="0"
onload=" this.height=this . contentWindow.document.body .scrollHeight+5; this.width=this . contentWindow.document
. body.scrollWidth +5;" />
</div>


Using this is one of the better scenarios to see online.



Now we introduce the workaround for frameset label substitution:(HTML5 does not support frameset, so there are two solutions)



1. The IFRAME is used, but fewer people are currently using the IFRAME, and the IFRAME is incompatible with different browsers.



2. Use jquery's OnLoad method to load the page, but after this method jumps to multiple pages, clicking back Forward on the top of the browser is not valid, but you can think of adding a back button. So the more popular is this approach:



Take a look at the code example description for the frameset tag:


< HTML DOCTYPE>
<html>
<head>
<meta http://equiv="Content-Type" content="text/html; charset=utf-8" />
<title>div+css29616;- frameset25928;- 26524;</title>
<style type="text/css">.header{border- bottom:1px solid %35; ccc;margin- bottom:5px; *
MainContainer width:960px;max-width :1600px;}
sidebar width:180px;float :left;margin- right:-180px;border-right :1px solid \35; ccc;min- height:500px;
padding:5px; Main float:left;margin-left :200px; padding:5px; *
Content padding:0 10px; *
</style>
</head>
<body>
<div class="page"><div class="header"><div id="title">
<h1>39030;</ h1>
</div></div>
<div class="MainContainer"><div class="sidebar">36793;"26639;</div>
<div id="main" class="main">
</div>
</body>
</html>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.