Solved

Cascading Style Sheet and footer HTML

Posted on 2009-04-02
14
385 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
Technology Partners: 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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Fix Form size HTML 16 31
Can anyone help me find this preloader? 51 46
Display Flex does not Wrap Items 2 12
Incorrect css styling in footer 3 8
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

730 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