![]() | | ||||||||
| | #1 |
| Active Warrior War Room Member Join Date: Oct 2007 Location: Los Angeles, CA , .
Posts: 74
Thanks: 2
Thanked 3 Times in 2 Posts
|
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 |
| | |
| | #2 |
| Active Warrior War Room Member Join Date: May 2009 Location: Vancouver, British Columbia, Canada
Posts: 95
Thanks: 7
Thanked 8 Times in 7 Posts
|
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 |
| | |
| | |
| | #3 |
| Warrior Member Join Date: Apr 2007 Location: Chemainus, BC, Canada
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
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 |
| | |
| | |
| | #4 |
| Ultimate War Machine War Room Member Join Date: Oct 2009
Posts: 63
Thanks: 2
Thanked 12 Times in 12 Posts
|
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. |
| | |
![]() |
|
| Tags |
| external, sheets, style |
| Thread Tools | |
| |
![]() |