NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Adding Text with CSS?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 07-10-2006, 03:52 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
sbaik's Avatar
Join Date: Nov 2005
Location: CA, USA
Posts: 400
sbaik is a name known to allsbaik is a name known to allsbaik is a name known to allsbaik is a name known to allsbaik is a name known to allsbaik is a name known to all
 




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
sbaik is offline  
Old 07-10-2006, 04:00 PM   #2 (permalink)
NamePros Member
 
CreedFeed's Avatar
Join Date: Apr 2006
Posts: 186
CreedFeed is on a distinguished road
 



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 &copy; 2006, ABC Company.";
?>
Then on all of your pages (assuming they're php files) you can simply include the copyright.php file. In your page's source you'd add the following where you want the copyright statement to appear:

Code:
<?php include('path/to/copyright.php'); ?>
This is just a basic solution to achieve this. You can get really advanced with PHP and templates. For example, on my website I have a template file (template.php) that includes two functions - getHeader() and getFooter() - which contain the HTML source for my header and footer. Then on any page I want to display, before my content I'd print the results of header function and after my content I'd print out the results of the footer function.

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.
CreedFeed is offline  
Old 07-11-2006, 07:30 AM   #3 (permalink)
NamePros Regular
 
Zubair1's Avatar
Join Date: Mar 2005
Posts: 912
Zubair1 is just really niceZubair1 is just really niceZubair1 is just really niceZubair1 is just really niceZubair1 is just really nice
 


AIDS/HIV
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
Zubair1 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 03:31 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger