Only Change Text and Keep Logo

Discussion in 'HTML & Website Design' started by robertg0123, Dec 3, 2007.

Thread Status:
Not open for further replies.
  1. #1
    I was wondering what the code is to have a website with a navigation bar and a header but under the header have text and whenever you click something on the navigation bar it changes ONLY the text?
     
    robertg0123, Dec 3, 2007 IP
  2. chikki.v

    chikki.v Peon

    Messages:
    101
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    hi
    if u dont mind can u send me code .
     
    chikki.v, Dec 3, 2007 IP
  3. snigster

    snigster Peon

    Messages:
    88
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Are you using php? If so you can use the php include (http : // php . net/include/). If not you can acheive the same result with frames (http : // www. w3schools . com/html/html_frames.asp).

    I would advise using the php method.
     
    snigster, Dec 4, 2007 IP
  4. robertg0123

    robertg0123 Well-Known Member

    Messages:
    399
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    145
    #4
    Can you demonstrate both methods?
     
    robertg0123, Dec 4, 2007 IP
  5. snigster

    snigster Peon

    Messages:
    88
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Using PHP

    <?php
    
    // call header.php which contains your HEAD section, banner etc)
    include 'header.php';
    
    // call the page with your content in./ OR your content
    include content.php'; // this will call a ppage to display content
    print "your text"; // or you could just put your content here
    
    // self explanatory
    include footer.php';
    
    ?>
    Code (markup):
    Frames is just as easy, but if you can use the above method, you really should.

    
    <frameset rows="20%,60%,20%">
       <frame src="header.htm">
       <frame src="content.htm">
      <frame src="footer.htm">
    </frameset>
    
    Code (markup):
     
    snigster, Dec 4, 2007 IP
  6. robertg0123

    robertg0123 Well-Known Member

    Messages:
    399
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    145
    #6
    Now how would I do that with a navigation bar. Such as how can I make ti load to a different page?

    ~Rob~
     
    robertg0123, Dec 4, 2007 IP
  7. chikki.v

    chikki.v Peon

    Messages:
    101
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    hi
    for ex:
    <a href="f.htm">option</a>
    f.htm consists following code
    <frameset rows="20%,60%,20%">
    <frame src="header.htm">
    <frame src="content.htm">
    <frame src="footer.htm">
    </frameset>
    whenever u click the option link then u will get new page which consists of header,content and footer files.
    ok all the best.
     
    chikki.v, Dec 4, 2007 IP
  8. robertg0123

    robertg0123 Well-Known Member

    Messages:
    399
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    145
    #8
    I have found out that that is incorrect. I am trying to use iframes. To do so you have to set a name on the iframe and set the navigation bar to "target" the iframe.
     
    robertg0123, Dec 7, 2007 IP
Thread Status:
Not open for further replies.