Forum Moderators: not2easy

Message Too Old, No Replies

can CSS do this?

add text with one change

         

conroy

8:31 pm on Nov 4, 2003 (gmt 0)

10+ Year Member



Hi all

I know CSS can be used to change the colors and size of text, but is there a way to add text with CSS so it will update it to all pages?

For example, say I add a new page of content to my site and want all of my pages to link to it. Can I edit an external CSS file and have it appear on all of my pages?

Reflection

8:48 pm on Nov 4, 2003 (gmt 0)

10+ Year Member



No CSS isnt for content management.

Your better off using some kind of server side includes or something something similar.

MonkeeSage

9:03 pm on Nov 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, conroy!

You could (theoretically) do it with the content attribute, but the problem is that IE and others don't support it, only Mozilla and Opera do. Plus, the point of CSS is to seperate style from content, and thus the content attribute should be used sparingly to keep with the idea, not for large blocks of text.

You could do it with an external JavaScript file, Server-Side Includes, or PHP. JavaScript will be the least accessible because it may not be supported or may be disabled by the client; SSI and PHP are the most accessible because they are handled server-side, before any output is passed to the client -- but they require additional settings / software on the server.

Depending on which method would work best for you, you should probably ask how to do it on the Apache forum (SSI is Apache technology), the PHP forum or the JavaScript forum.

Jordan

conroy

10:21 pm on Nov 4, 2003 (gmt 0)

10+ Year Member



Thanks guys I appreciate it.