+ 4

HTML: how to make links change only part of the website

I created a basic structure of the webpage with top menu and left-hand menu bars. The middle of the screen is the section, which I want to change based on what link we click in either of the menus. I used CSS properties float:right and overflow: hidden to style the website. I don't want to create many .html files, like: index.html, about.html, contact.html. Instead I'd like only the middle HTML section to change and I'd like to keep it within one HTML file. In MVC this can be done using _layout, where I place @RenderSection - to render individual section within the main _layout. There must be a simple way to do this in pure HTML, is there? I kindly ask the great people here on SoloLearn to help and advise / point me in the right direction.

23rd Jul 2019, 8:02 AM
HouseMouse
HouseMouse - avatar
5 odpowiedzi
+ 1
Really? I mean there must be a way to do it with just HTML. No, I don't use any back-end for this. Just a pure website built using html css js. I mentioned MVC, which is Asp.net (C#), but this is not the point. It was just a reference.
23rd Jul 2019, 3:46 PM
HouseMouse
HouseMouse - avatar
+ 1
After searching extensively, I finally found it. This is what I had in mind: http://jsfiddle.net/mdesdev/zfu9y/ Eh, couldn't someone just post something helpful that makes sense? Anyway, I guess it's solved.
23rd Jul 2019, 10:00 PM
HouseMouse
HouseMouse - avatar
0
Right. That is correct. Yet... I'm not looking for MVC solution. Forget MVC. No backend. I built a pure html webpage and I wonder if I can have one file (let's say index.html) where I change the main section of the page depending which link from the menu was clicked. How can I do that?
23rd Jul 2019, 3:56 PM
HouseMouse
HouseMouse - avatar