?
Solved

Cascading Style Sheet and footer HTML

Posted on 2009-04-02
14
Medium Priority
?
389 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 2000 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

770 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