Question:

How do you make a website without having to repeat the layout code in every page?

by  |  earlier

0 LIKES UnLike

do you understand what im trying to say?

its really annoying..

i was using freewebs but thats what i have to do, keep repasting the layout code in every page.

is there any other way i wont have to do that?

best answer gets 10pts =]

and i dont usually chose a best answer lol

<33 thanks!

*please dont say learn css, just tell me. =P

 Tags:

   Report

4 ANSWERS


  1. With any code, you have to reference somewhere that the layout is...

    for CSS we reference a CSS Sheet in our web directory.

    for php includes we reference a file in which we want to include... helpful for editing one file that makes the chnages appear on all pages of a site.

    Depending on what basic layout functions you are referring to, you are mostly likely going to have to stick with what you have for now.


  2. I won&#039;t say you should learn CSS, because that wasn&#039;t your question.

    You asked HOW do you make a website ... (etc).

    In order to make a website without having to repeat the layout code on every page, you MUST use CSS.  It&#039;s up to YOU whether or not you want to actually LEARN CSS.


  3. You can&#039;t do it without knowing at least a little CSS.

    Create a CSS page with all the code and save it as mylayout.css or something similar.

    On every page you need to insert this code in the head section.

    &lt;link rel=&quot;stylesheet&quot; type=&quot;css/text&quot; src=&quot;mylayout.css&quot; ./&gt;

  4. Make a template that looks like the layout you want to use for every page including the nav links, footer and images that will all be common to every page. Set up a main container for your content that will differ from page to page.  Upload that with freewebs file uploader with name of template.html. Set attributes of file to read only.

    When you want a new page, click the edit Icon for the template page, add your content via the editor or copy/paste from a local html editor. Save page with new name you plan to use.

    Or, use the &quot;make new page&quot; link found in File Manager, give it a name, copy/paste the template code and then add the page content and save.

    Ron

Question Stats

Latest activity: earlier.
This question has 4 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions