Dear all,
I know HTML, and few days ago I started to use CSS.
I know how to change the many properties, but I couldn’t find how to add constant text.
My css file is being used by few html pages. Every page have to end with the same line
“Please tell you friend about this event”
How can I add it automatically to all pages
Cheers, Bamba
Hi,Welcome to Sitepoint
It sounds as though you are talking about using SSI includes which is not a css issue.
You can create one file which is included dynamically (via php or some other serverside magic) into the page at the point you require. This means you only need to keep one copy of the file and it is used all across the site.
You can add some generated content with CSS but that shouldn’t be used for real content because it doesn’t really become part of the html.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
p.test:after{
content:'This is some CSS generated text'
}
</style>
</head>
<body>
<p class="test"></p>
</body>
</html>
Doesn’t work in IE6 and 7 either so is not really an option.