| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Nov 2005 Location: CA, USA
Posts: 400
![]() ![]() ![]() ![]() ![]() ![]() | Adding Text with CSS? Hi all, I was just wondering if it is possible to add text to all of your webpages using an external css. For example, if I want to add a copyright notice (ie...copyright 2006) at the bottom of every page, what can I do? I have a website built entirely of html pages, but I would like the ability to edit a single page instead of all of them. Regards, Steve
__________________ Los Angeles SEO Consultant |
| |
| | #2 (permalink) |
| NamePros Member Join Date: Apr 2006
Posts: 186
![]() | CSS is not for adding content to pages, it's used to stylize content within your HTML code. You can dynamically add content to all of your pages... one would be to use some sort of scripting language like PHP to create a page template and have your template included on all of your pages. For example, you would create a php file (say copyright.php) with the following: Code: <?php echo "Copyright © 2006, ABC Company."; ?> Code: <?php include('path/to/copyright.php'); ?> You can also do it using HTML includes... but to be honest, I don't remember that method since I haven't used that for over 10 years. PHP Templates are so much easier.
__________________ |
| |
| | #3 (permalink) |
| NamePros Regular Join Date: Mar 2005
Posts: 912
![]() ![]() ![]() ![]() ![]() | CreedFeed is surely absolutely right, CSS is only used to stylize the layout of your contents. as CreedFeed suggested switching your pages to use PHP would be a great idea the method above is basically the easiest i could also think of. you'll just have to change your .html pages to .php to start after that you can easily create the above examples and include that on your pages i'm sure your hosting provider supports php as it is the most popular and widely used language on the internet. Just to let you know theres also a Apache / PHP variable that you can set in your configuration files (if you have the access to them) you can enter the locations of your include files and apache will automatically add those files for you in all your pages. ????: NamePros.com http://www.namepros.com/programming/215562-adding-text-with-css.html you can also edit the apache to httpd.conf file to setup php on your .html extensions please let us know if you need further help hope this helps Regards,
__________________ Live Support : Zubair11 [at] hotmail.com Free SEO Directory! || Free Online TV || Tech Blog Web Design & Web Development Services || Reliable Web Hosting |
| |