Including header file using HTML - testmy.net resource / tool
Home
Welcome, Guest. Please login or register.
Did you miss your activation email?

 



donations help testmy.net pay for the very high cost to run the site. Any amount is greatly appreciated.
Click to read why...

  spcr
    
News : Have you seen the guides section?  It's an always growing section with tons of cool guides for subjects you might not even know about, check it out... it's a good read azn September 04, 2008, 11:23:36 PM
testmy.net Broadband  |  Main Forum  |  HELP!  |  Programming and Website Help  |  PHP  |  Topic: Including header file using HTML Advanced search
  0 Members and 1 Guest are viewing this topic. « previous next »
Pages 1 Go Down
Author
Topic: Including header file using HTML  (Read 512 times)
SharonB
Earning Trust
*
Offline Offline

Posts: 3



View Profile
« on: March 31, 2008, 02:40:31 PM »

Is it possible to include a header and footer file using HTML? I have my file as a .html and need to be able to include the HTML for the header and footer. Anyone know how I can do this?
Logged

I'm here!
dlewis23
Global Moderator
TMN Seasoned Veteran
*
Offline Offline

Gender: Male
Posts: 9606


HEY! ill put it down when im good and ready.


View Profile
« Reply #1 on: March 31, 2008, 02:50:52 PM »

you could use <?php include("header.html"); ?>

Otherwise use a template system.
Logged

nanobot
News Anchor
TMN Friend
*
Offline Offline

Gender: Male
Posts: 240



View Profile WWW
« Reply #2 on: March 31, 2008, 03:37:24 PM »

You could also use:

Code:
<iframe
src ="header.html"
width="100%" frameborder="0">
</iframe>

or add:

Code:
height="[number]px"

Between the width and Frameborder declaration to adjust the height. (Replace [number] with your number)

But Dlewis's way works too.
Logged


NanoTech - World Forum
92% of the teenage population has switched to rap. If you are in the 8% who ROCKS, copy & paste this in your signature
dlewis23
Global Moderator
TMN Seasoned Veteran
*
Offline Offline

Gender: Male
Posts: 9606


HEY! ill put it down when im good and ready.


View Profile
« Reply #3 on: March 31, 2008, 07:03:55 PM »

You could also use:

Code:
<iframe
src ="header.html"
width="100%" frameborder="0">
</iframe>

or add:

Code:
height="[number]px"

Between the width and Frameborder declaration to adjust the height. (Replace [number] with your number)

But Dlewis's way works too.

You shouldn't really use iframes anymore as main browsers are starting not too support them as we move away from basic html.
Logged

Print  Pages 1 Go Up
testmy.net Broadband  |  Main Forum  |  HELP!  |  Programming and Website Help  |  PHP  |  Topic: Including header file using HTML « previous next »
Jump to:  

    
testmy.net's forum is proudly Powered by SMF | SMF © 2006-2007, Simple Machines LLC
Bookmark: Del.icio.us    StumbleUpon
 
 

 

© 1999-2008 testmy.net - Contact - Legal - Facts & FAQs
Page Loading Stats: This forum Page created in 0.09 seconds with 32 queries.