HTML design question

Discussion in 'Software' started by zygmore, Dec 30, 2004.

  1. zygmore

    zygmore Private E-2

    I was wondering if there was a simple way to create a web page from 2 or more pieces of web pages. Like, i had a banner/header design on one page that would be the standard for the whole site and another body web page that would be different from the first. If anyone knows a way to do this without using frames please let me know.
     
  2. Kodo

    Kodo SNATCHSQUATCH

    yes there is.

    make a header file, and "index" page and footer file.
    use SSI (includes) and include the header and footer on every "index" page that you make.
     
  3. MerlinCorey

    MerlinCorey Private E-2

    Or use a scripting language and include the header and footer parts in functions and such
     
  4. zygmore

    zygmore Private E-2

    Ok, now, how would i go about doing either one??
     
  5. goldfish

    goldfish Lt. Sushi.DC

    Does your web host support ASP or PHP? If so, the answer is simple.

    Make 3 pages:
    top.htm - put your header, from <html>, thru <head>, start <body> and enter header HTML
    index.asp/php - put the page content (not including header/footer)
    bottom.htm - Footer data, and </html>

    In your index.php/asp file, place the following:

    If it supports PHP:
    PHP:
    <?php include("top.htm"); ?>
    Main page content goes here!
    <?php include("bottom.htm"); ?>
    or if it supports ASP
    Code:
    <!-- #include file = "top.htm" -->
    Main page content goes here!
    <!-- #include file = "bottom.htm" -->
    
    If you host does not support any Server side Scripting, then it gets a bit more complicated.
     
  6. zygmore

    zygmore Private E-2

    The php worked... apparantly asp is not supported by my host. I appreciate the help.
     
  7. Kodo

    Kodo SNATCHSQUATCH

    Your server may support ASP.. this directive <!--include file=" file name here" --> is a Server Side Include and is neither part of PHP or ASP. If you really want to find out if ASP is supported then do this in a txt file and name it Test.ASP


    <%=this is a test%>

    then point your browser to test.asp.

    If you see "THIS IS A TEST" then ASP is supported.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds