External Style Sheets, Need Help!!

3 replies
  • WEB DESIGN
  • |
I am trying to find out if you can create a css rule that will copy text? What I have is a website with 150 pages. Can you create an external style sheet so that it will add text links to the bottom of the page. I don't want to have to copy and paste on 150 pages my menu at the bottom of the page.

I know that you can create rules for website background color, text links etc, but I can't find where you can create a rule for text.

Any answers would be greatly appreciated.

Mike
#external #sheets #style
  • Profile picture of the author cmaclean
    Hi Mike,

    Generally for a site with that many pages you'll want to use a CMS such as wordpress. Seeing as you're not in that situation, you can change your all the pages to php pages (change html extension to php).

    Create a file called 'bottom-menu.php' or whatever you want to call it.

    Put your HTML menu code in here (no need to include html, head, body tags, etc.)

    Next, on the bottom of all the files add: <?php include("bottom-menu.php"); ?>
    This will call the menu into each file.

    I know you will still be copying and pasting something, but at least if you have to edit it again, you will only need to edit the menu file.

    FYI, I use EditPlus as my html text editor. It has the option to find and replace a piece of text in all open files. Often I open 30+ files at once and do a quick replace if needed.

    Hope that helps.

    Craig
    {{ DiscussionBoard.errors[1232361].message }}
    • Profile picture of the author Claire_P
      Hi,
      I am fairly new here, but I'm a web designer online instructor for GVO. I use the HEREDOC "string creation tool" that allows the programmer to create multi-line strings without using quotation marks for designing my sites.

      This site has about 70 pages, and I keep adding pages to it, so without the "string creation tool", I'd be going nuts having to add a new menu item to all 70+ pages each time I added a new page or main category.

      Claire Poulton
      {{ DiscussionBoard.errors[1249428].message }}
  • Profile picture of the author shahz
    Well, refer to cmaclean's post. That is indeed one of the best ways to have a repeating object on a website. That is the main function of PHP at the first place. All you need is just one file that contains the information for that particular portion and the other pages just "call" that file up to be rendered. If you want to change something in the future, just edit that particular PHP file and it will automatically change wherever it is being called. It is best to be used when you have a huge amount of pages on your site.

    PHP is not to be confused with CSS. PHP is pre-hypertext processing used to program your site dynamically and CSS is cascading style sheet which is used just to "style" the website.
    {{ DiscussionBoard.errors[1249538].message }}

Trending Topics