0

I want to have a navigation panel on the left side of the page, which can be accessed on all other pages.

To achieve this, I used <frameset> tag.

<frameset cols="20%,80%">
  <frame src="contents/navigation.html" name="navigation">
  <frame src="contents/index.html" name="content">
</frameset>

But this is a deprecated tag in HTML5, and I get a deprecation-warning from my IDE for this tag, indicating the <frameset> tag is not supported in HTML5. So, what can be an alternative to this deprecated approach?

+PS: There are some useful answers in the question (Alternative for frames in html5 using iframes). But, still I am looking for an answer to create a laft-side panel for the navigation items. iframe tag only adds a frame or box, but for the case shown in my question, frameset tag divides the view-port to two columns, in which navigation is placed on the left hand side of the page. How can I get this output of frameset using an alternative method?

Ali Safari
  • 1,535
  • 10
  • 19
  • Have you tried using an ` – Manav Jul 04 '19 at 11:24
  • @Manav Thanks for your comment. When I use iframe, I only get one empty frame as output, not even two empty boxes, as I have two frame tags here. – Ali Safari Jul 04 '19 at 11:40
  • Thanks @EliKnaffo, I found a solution to my problem on the page you posted here. – Ali Safari Jul 04 '19 at 11:46
  • This is what I'm going to use as an alternative to frameset: Please let me know if you have any suggestion to improve my answer to the problem based on your suggestions. – Ali Safari Jul 04 '19 at 12:06
  • I would suggest you to look at iframe at https://www.w3schools.com/ It’s the best site for the fundamentals of HTML and CSS and it’s the regulator for them. – EliKnaffo Jul 04 '19 at 12:48

1 Answers1

0

Iframe is the alternate for frame. for layout you have to use css to achieve design.

<iframe class="header" src="header.html"></iframe>
<iframe class="main" src="main.html"></iframe>
<iframe class="footer" src="footer.html"></iframe>
Amit
  • 1,841
  • 1
  • 19
  • 36
  • thanks for your comment. iframe tag only adds a frame or box, but for the case shown in my question, frameset tag divides the page into two columns, in which the navigation items are listed on the left hand side of the page. So, how can I get this output of the frameset tag using another method? – Ali Safari Jul 04 '19 at 12:35