keep header remain when navigating to different links of website [closed] - html

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
How do we keep the header remain there even when navigating to different links within a site?
ex flipkart.com, eemli.com - when you click the header links, the header gives a feeling that it remains but the page and URL changes. I understand if the header has dynammic ever-changing contents, this cannot be achieved.

Here is a good article showing some tecniques to achieve that...
How can I change the page URL without refreshing the page?

Every page sends the same header, either through a templating system (JSP, Velocity, Freemarker, etc) or because it's hardcoded that way. Each new page just renders the same HTML at the top of the page.

Well, you could do one of two things.
Use a frame to load your content (very old web technique), or
Load in the content of the next page with AJAX and replace what's underneath the header.
Of the two, #1 is more foolproof but #2 has a slicker feeling. That being said, I can't imagine using techniques like this are good for SEO.

Related

Simple website (HTML & CSS) - what is the best way to simplify subpages editing? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last month.
Improve this question
I'm trying to get back into HTML & CSS coding and learn JS. I found so many tutorials which are very helpful, now I would like to develop some simple websites. Many years ago the only way to make subpages (I hope it is a correct translation) was to use iframe or just copy whole content from homepage (so with need of editing every page to change ex. logo or footer). What is the best way to do it now?
Typing "HTML CSS webpage tutorial" in YT returns a lot of awesome results, but it gives me only the solution how to make a design, not a website with working menu etc.
What do you suggest? I prefer to work on separate files instead keeping all code in one "index.html".
Thank you in advance,
Happy New Year!!!
Regards, Mariusz
I have no solution yet.
Nowadays different frameworks are used for that purpose. If you don't want to use one, the easiest way would be to still use PHP and use its include method to load "subfiles" like header, footer, navigation sidebar and other content / website parts that are identical on all pages.
BTW, just a note aboute a detail in your question: The "ancient" method for this didn't use iframes, but frames – that's a big difference: iframes load external webpages, frames (as parts of framesets) load parts of the own website.

How do I create a website template using html and css? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Maybe I'm not using the correct terminology because I can't seem to find an appropriate answer. I have built a header and a footer using html and css. This will not change from page to page and so I want to make it the template and simply change the content in between the header and the footer for each page of my website. I know I could simply copy and paste the code but if I wanted to change the header for some reason I would then have to change the header on each of my pages! Super inefficient. Coding is all about reuse. surely there's a way to do what I'm saying. Help me web developers!
You could do one of many things:
Use PHP files and require() the headers and footers in the main page, though you'll have to use a server on your localhost to test the pages.
You could maybe take a look into creating single page applications, using AJAX.
AJAX Introduction here.
You could go a step further and pick one of the very popular JavaScript MVC frameworks.
Read more about them here.
Finally, you could also do it the "old way" and use iframes, but that is honestly bad practice and will bring more harm than good.

Why does the page source of Facebook, unlike stack overflow, look the way it does? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Below are examples of the page source from both sites. I am on chrome if that means anything. My Questions is, why do these two sites look so differently from each other? Why does Facebooks source look the way it does, paragraphs and paragraphs of code with no formatting compared to stack overflow where tags and elements are distinguishable from each other?
Does it serve a purpose for it to be shown the way it looks on facebooks website? I assume that's not how it was formatted in development but done that way after loading it to the site?
**Here is an example of Facebooks source code from the landing page**
**Here is an example of Stack Overflows source code from the landing page**
Not necessarily. Majority of the code is on the server side anyway so you can't see majority of the code for both websites. However, Facebook's code has been minified. This means the code has been scrunched together to take up less space so that the site will load faster.

How to add code into wordpress site? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
Hello I have just started to use word press today, I have developed my own theme, and edited the header and footer files to show what I want it to show, however I’ve ran into a problem adding in the main content. What I did was just take the html, and dump it into the html editor and this worked great site was fine, however if you click into the visual editor and then click at the start of a div, and press “backspace” it removes the div and merges it with the div above it, should this happen? And if that is what is supposed to happen can you prevent it?.
Allot of my potential clients don’t want a html website and want word press and that makes me lose them since I am mainly html/css/php etc, so that’s why I'm learning it, however if the above is what happens it seems like these clients will keep on coming back to me wanting it fixed etc and make me look bad for making sites that break easily thus decreasing my value as a freelancer.
Any and all help is welcome the reason I'm asking is because i can’t find any websites about this they are all purely make a theme. Thank you.
P.S this site is running locally so cannot provide link sorry.
I agree with #jhanifen, your client will not want to post html into the WYSIWYG editor, so keep in mind your theme will have to allow what ever they choose to put in there.
You wont be able to prevent the behaviour you are describing, you could lock the page from other users editing it but this is a bad way to go.
I usually make a child theme of a good simple standard theme and create page templates to allow for different page styling. http://codex.wordpress.org/Page_Templates
You may also want to look into custom post formats for more specific posting behaviour. http://webdesignledger.com/tips/getting-started-with-wordpress-post-formats.

HTML page editing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
In an attempt to learn HTML, I thought it may be a good idea to edit some simple code. So, I navigated to what I figured was a simple layout on a website and copied the source to my desktop. I made minor changes and attempted then to reopen the HTML file in a browser to see the changes.
Instead of the same layout with a few minor adjustments, the entire scheme was deformed. The wording was all there(no longer formatted), but the background was now white and all the links appeared structrually in one column on the left side of the screen.
So, in essense, what is the best way to learn HTML and why didn't my attempt at editing work? Are there more files required than provded by a simple source save provides?
The HTML likely references things by RELATIVE PATH, e.g. a CSS File included with /styles/... not http://originaldomain.com/styles/... So if you just saved the HTML, none of the relative paths will resolve. Most browsers allow you to file --> save page as, which will copy not just the file but also the resources.
Try www.w3schools.com/html/ should give you a good start and a good understanding. Don't try and run before you can walk! And try learning CSS aswell
The file you needed was an external CSS file. It is linked to in the head of the document. This site is better than w3schools, www.w3fools.com
There are a lot of videos out there. Try www.reddit.com/r/learnprogramming
That community is much laid back and friendly!