Solved

Cascading Style Sheet and footer HTML

Posted on 2009-04-02
14
386 Views
Last Modified: 2012-05-06
Hi

I would like to add text to the CSS footer - is this possible.  There is already a footer

At the moment each page has a footer already- ideally what I would like to do is add the footer text to the CSS so it will automatically update each html web page.  So when I need to change the footer I do it from the CSS -

The current CSS sheet is as follows:

#footer {
width:780px;
margin:0px auto;
clear:both
}

And the html web page is as follows:

<!-- Footer -->
<div id="footer">
<p>&copy; Test Footer 2007</p>
</div>

So I would like to add the above footer to the CSS and remove the footer from the html page -





0
Comment
Question by:SteptoeTeam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
14 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24052487
No, this is not possible.  CSS is meant to separate your design from the content.  It has no ability to be a templating system.

Since you are using Dreamweaver, you do have some ability to do this from the software.  You can make the footer a Library Item and that will allow you to do a single edit to update all pages.  You can do a sitewide Find and Replace to make the edit.  You could switch over to a DW template (not recommended).  Finally, you could create a server side include for the footer.

All of the above will allow for a single edit to maintain the footer.
0
 
LVL 2

Accepted Solution

by:
thunderwonder earned 500 total points
ID: 24052552
well, you can use CSS content property.

Like u can use this code to add 'I am green' before every paragraph in green class

.green p:before {
    content: 'I am green';
}


Refer:
http://www.w3.org/TR/CSS21/generate.html
http://htmldog.com/reference/cssproperties/content/
http://www.w3schools.com/Css/pr_gen_content.asp
0
 

Author Comment

by:SteptoeTeam
ID: 24052575
How would I implement a server side include - considering that
I have to maintain this every year
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24052605
Depends on the server and scripting available?  I assume Apache?  Is this a static HTML site or a PHP site?

If you are unsure, switch to the Library Item advice.  It's essentially the same thing as SSI just run from the DW framework.
0
 

Author Comment

by:SteptoeTeam
ID: 24052634
Using IIS and is static htnl.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24052648
Okay, so use the Library Item advice.
0
 

Author Comment

by:SteptoeTeam
ID: 24052694

Ok let me try and revert.  Since we are on this topic can I use
301 redirect with htnl with no scripting.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24052741
>> Since we are on this topic can I use 301 redirect with htnl with no scripting.

What does that have to do this topic?
0
 

Author Comment

by:SteptoeTeam
ID: 24052769

Ok let me try and revert.  Since we are on this topic can I use
301 redirect with htnl with no scripting.
0
 

Author Comment

by:SteptoeTeam
ID: 24052791

It doesn't but since I was asking about CSS I thought I
Would ask this as well.  I will post a new question for this -
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24052891
Please do.  One question per thread is the rule here.
0
 

Author Comment

by:SteptoeTeam
ID: 24053009

No points will be added for the 301 redirect question
0
 
LVL 13

Expert Comment

by:qwerty021600
ID: 24056938
Else you can Manage Site in DW, which will help in replacing code in one go in all the pages.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question