Results 1 to 10 of 10

Thread: repeating contents of home page on every page of website

  1. #1
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default repeating contents of home page on every page of website

    Hi,
    I am designing my first website. I am facing one problem. I want the logo and horizontal and vertical menu as well as footer to be placed on every webpage that is loaded. Please can anyone tell me the idea about this ?

  2. #2
    Join Date
    Oct 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    either use CSS, in-line styles or iFrames

    search for any of these topics on this forum

  3. #3
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Or you can use PHP (or any other server side language that allows you to include files). Basically, make your header, navigation, and footer separate pages and include them into each one of your pages using the php function include() (or equivalent).

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  4. #4
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by scorch View Post
    either use CSS, in-line styles or iFrames

    search for any of these topics on this forum
    Hi thanks for your reply.can you give me the code to be written in CSS for this ??

  5. #5
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    CSS cannot pull html code from a server. it only has the ability to style what is already present.

    if you have access to PHP that would be your best option.
    PHP Code:
    <?php include('/path/to/file.ext'?>

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    You could use a single CSS stylesheet to keep the same look for each pages, such as having the default text color as orange. It would not control content, though.

    I agree with PHP. If you have the option, it's really easy and works well.

    Think of include() as "take the contents of (....this....) and output them directly".
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hey just copy the html page m make its copies on the same place. change the names of the copied files as the name of your links n make the editing in the pages as the name or the link name specified.
    for more detailed information just click to {removed}
    Last edited by jscheuer1; 10-16-2007 at 03:53 PM. Reason: remove plug

  8. #8
    Join Date
    May 2007
    Location
    England, UK
    Posts
    235
    Thanks
    3
    Thanked 6 Times in 6 Posts

    Default

    I wouldn't do the last suggestion because if you copy all your pages then finish updating all the content - what happens if you then want to change something (i.e. a link) on all pages?
    You'd have to update all of the pages individually, not a good idea!

    I agree PHP is the best option or if you use DreamWeaver you can set up templates so that if you make a change on the template it updates all of the other pages automatically.

  9. #9
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    It's not only a bad idea, but also likely the exact thing the original poster is trying to avoid. Looks suspiciously like a spammer anyway.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  10. #10
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,312
    Thanks
    28
    Thanked 136 Times in 131 Posts
    Blog Entries
    29

    Default

    Hello Luckyros,
    You could use the technique explained here (although it works with frames, it avoids certain disadvantages of frameset use).

    Arie Molendijk.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •