Thread: Css

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    3
    Rep Power
    0

    Css


    I have a table with different text and links in it that needs to appear on every page of my web site. Is there a way to put this table into a CSS and have it appear on all the pages that link to that CSS?

    I thought of maybe making it an image and using a 'map' to define the links. If the table can not be linked using the CSS, can this image map?

    Thanks for your help!
  2. #2
  3. Retired
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Finland
    Posts
    9,143
    Rep Power
    2493
    If you are wanting to include a block of text, then you would have to use server side includes or php include files, iframes or use a JavaScript include file. Would strongy recommend against using the last one though.

    HTH

    Cheers,
    Jamie

    >_ skiFFie ? | Twitter

    __________________

    Let the might of your compassion arise to bring a quick end
    to the flowing stream of the blood and tears .....
    Please hear my anguished words of truth.

    __________________
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    northern virginia
    Posts
    7
    Rep Power
    0

    re: CSS


    There's no pleasant way to do what you want. If you're using static HTML (ie: not generated by a script, or using server-side includes), your best bet is a script to parse your pages, and insert the table into the correct location. (I'd recommend perl) Yes, it's painful, but it does work.

    If you're using server side includes, it's a hair less painful. You put the table into its own page, and include that page in every other page (probably using a script again). The advantage here is that if you change the table, you don't have to manually change it in dozens or hundreds of locations (or write another script to do it).

    If you're using some sort of CGI (or equivalent) to generate the pages, then life gets much easier. Just put that table in one file (or method), and insert it in the same spot on every page.

    Sorry, suspect that didn't help much. Good luck.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    3
    Rep Power
    0
    Thanks for the ideas! As I am still fairly new at this, I went with the IFRAME choice mentioned and it worked well. Now I only have to make changes in one place and then include that page in a frame on my other pages.

    I am sure as time goes on, I will learn how to include all of the other suggestions.
  8. #5
  9. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,268
    Rep Power
    1956
    Iframes are probably the worst of all possible choices for what you want. In the simplest case, server side includes (SSI) are likely the best choice.

    cheers,

    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    3
    Rep Power
    0
    What are the disadvantages of using IFRAMES?

    Keep in mind, I'm still new at this and just know basic HTML
  12. #7
  13. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,268
    Rep Power
    1956
    iframes are not as bad as frames, but still have limited value and proper use. See D-Scripts. Be sure to follow the links citing additional references.

    cheers,

    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.

IMN logo majestic logo threadwatch logo seochat tools logo