CSS and HTML - Can a CSS file generate HTML?

I am building a website that is used with CSS in two DIVs. One "header" DIV, which is always the same "Content" DIV, which changes.

Is it possible in my CSS file to write HTML with all the links that remain in the header, so I just need to call (or the like) on each page, instead of writing the contents of the header each time? It will also help to edit only one source, since I often leave pages by mistake.

I do not want to use frames, so we are looking for an alternative.

Thanks Brett

+3
source share
5 answers

Depending on the supported server and server languages, this can be done.

Server Side Includes, . "" HTML (), .

, CSS HTML.

+1

, , , , . php, SSI . , JavaScript, DIV. , SEO.

0

iframe javascript, DOM (, ). javascript, iframe. iframe, javascript. .

CSS , , . , , HTML, , URI.

, . , Tiles SiteMesh.

0

CSS .

ajax. index.html (about.html, contacts.html ..). index.html .html content-div (, jQuery.load())

- php ( )

0

It is not possible to achieve this with CSS because CSS cannot handle any events, it is just a β€œrefrence” for the browser to know how to style your web page, but it is done using AJAX. I suggest you take a look at jQuery lib, but it will speed up the process, but the main drawback is that search crawlers will not be able to properly index your page, so it will not be good using an SEO perspective.

Perhaps if you have the time to make a version with an index and AJAX, this is what we did for the mobile project here.

jQuery AJAX API

0
source

All Articles