We help IT Professionals succeed at work.

Cascading Style Sheet and footer HTML

SteptoeTeam
SteptoeTeam asked
on
404 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 -





Comment
Watch Question

Jason C. LevineDon't talk to me.
CERTIFIED EXPERT

Commented:
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.
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
How would I implement a server side include - considering that
I have to maintain this every year
Jason C. LevineDon't talk to me.
CERTIFIED EXPERT

Commented:
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.

Author

Commented:
Using IIS and is static htnl.
Jason C. LevineDon't talk to me.
CERTIFIED EXPERT

Commented:
Okay, so use the Library Item advice.

Author

Commented:

Ok let me try and revert.  Since we are on this topic can I use
301 redirect with htnl with no scripting.
Jason C. LevineDon't talk to me.
CERTIFIED EXPERT

Commented:
>> Since we are on this topic can I use 301 redirect with htnl with no scripting.

What does that have to do this topic?

Author

Commented:

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

Author

Commented:

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 -
Jason C. LevineDon't talk to me.
CERTIFIED EXPERT

Commented:
Please do.  One question per thread is the rule here.

Author

Commented:

No points will be added for the 301 redirect question
Else you can Manage Site in DW, which will help in replacing code in one go in all the pages.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.