How to make a subpage in simple html? - html

I am making an internally used html site for my company. I am a beginner at html and have done this by using a template form W3school. The site will be used to look up different work procedures for internal use only and will run on our server (not on the internet).
In the main site (main.htm) I have a menu bar on the left with links to subpages (sub1.htm, sub2.htm and so on). As it is now I use iFrame to open the subpages in my main site. This way the entire site including the menu bar will stay and only the subpage will load when I change subpage. My issue is that I cannot go directly to a subpage by typing main.htm/sub5 or similar. I always have to start at the main.htm and then click the link to a certain subpage. If I open the specific subpage from the file sub5.htm it will open but without the menu bar as this is not included in the .htm code.
Is there a better way to make the subpages open on the main page?

Related

Wordpress customize specific site

I made a little game using html and new I´m looking to publish it on my wordpress site. There is only on problem though, I don´t know how to add a page in html code. If I add a new Site I can only edit the text and attach pictures, but is there a way to add a complete page under a domain like www.example.com/page ?
Upload the HTML file to your website's root directory using FTP. If you name it game.html, you should be able to open the file by navigating directly to it www.example.com/game.html.
You go to My Page. Then there is a submenu Publish. Click on the button Add next to Pages. When you did that, there is that small menu in the middle where you can choose several options such as header, bold, italics, etc.. In the top right corner of that menu, there are two options: Visual | HTML. Just click on HTML and you can add HTML code.

HTML preserve header when loading another page

I am building a website and when I click on one of my header's page links, it loads the whole page again, rather than preserving the header and only loading the main content. For example:
When you click on a button on the sidebar of YouTube, it will, for example, load the watch later playlist, and preserve the search bar and sidebar. How would I go about doing this on my website?
Have a look at using aJax. This should resolve your issue.

HTML links not working

I created my first website uploading the first two pages including the first and main page and then a second page that the first page links to. Before doing so, a link that when clicked on, takes me correctly from my main page to a second page worked. After uploading it on 000webhost.com it no longer worked. Meaning, I can view my main page but when I click on the link that should take me to my second page, it doesn't do anything. Here is the code that was and is still included in my main page for the link that should take me to my second page. I have a feeling that it has something to do with the protocol and that I have to make changes to it but not sure what changes to correctly make so the link will work. I used a sub domain at 000webhost.com not my own. Here is the code that was and is on my main page:
<li>Noah's First Day</li>
The link points to a file on your computer (note the file:// prefix). The best practice is usually to have links to your own pages in relative form. So, for example, assuming you uploaded all the files to the same directory, just use the filename itself:
<li>Noah's First Day</li>

How to keep the state of a css based navigation menu while navigating to other pages

I am new to CSS and trying to find out how to keep the state of a css based menu over multiple pages.
The situation is like this
I am working on an intranet site.
There is a set structure of the website. I have content files and a left menu file. The left menu file is used for creating links to other pages and it is imported in all the content files. (these are ASP files and I am not sure what we call it technically for using the content of one file in all the other files).
So the task is that I have a site map and I want to translate it into the links in the left menu file so that they appear in all the content pages.
I am using this example and adjusted it for my needs. The problem is when I go from one page to the other the state of the expanded and collapsed nodes does not stay the same. What is the best way to achieve this.

Automatically open external links with iframe?

I am working on a WordPress site that has a lot of authors. The stories often contain external links, and I am looking for a way that we can automatically have external links open with a small header that has a "Back to our site" link, along with a close button.
Ideally this would be done automatically, but we'd also like to be able to create links manually that open in this same sort of iframe with our header. How can I go about setting this up?
I suggest you build this via Javascript, so you could easily turn it off/on as needed and it will be kind of portable too and you can use it on other site as well.
steps to do:
Go through all the anchor links and if the href is external link, add attribute target blank, and change the href links
if(external_link){
a.target = '_blank';
a.href="http://example-ownsite.com/iframe_holder/?page=" + a.href;
}
Then take a look at my page on http://fedmich.com/works/odesk/
so you could provide a vertical scrollbar on the iframed page.
Im using a function called resizeIframe() there
Note: some sites dont want to be placed inside iframe and they will breakaway from the topframe.