Linking in css?

They have: 5 posts

Joined: Jul 2007

Hi all,

I'd like to ask something.

I have a stlye.css and that is linked to about 80 html pages.These 80 html pages are summaries of lesson. I have a div its id="pagead" on the top of all 80 pages. When i change style.css all 80 pages changes in relation with css. But i would like to show advertisements in this div and make it a link to another site. But there is no option for making link in css.

How can i overcome this?

Is there a piece of code which enables me to insert link code and it makes all 80 pages' div redirect to link?

Maybe java can do this if i can give div id to java code. But i dont know how to do that...
Thank you....

He has: 698 posts

Joined: Jul 2005

I don't quite understand what you're needing, but would some sort of include work for you? With PHP, it looks like this:

<?php

//File extension must be .php for this to work

include("file.html");
?>
'

Then you could put that in each file and change that single file each time. Perhaps I misunderstood you, but this is what I'm thinking you need.

Kurtis

They have: 5 posts

Joined: Jul 2007

Thank you very much, that kind of code was what i was looking for, and my pages in .php so there is no problem.

thank you very much...

He has: 698 posts

Joined: Jul 2005

No problem. I'm more than glad to help. Wink

He has: 629 posts

Joined: May 2007

Hmm. I'm wondering if you are thinking of something like Google Ads? These come from another source (Google) and generally go into an iFrame[1]. You'd need to add an iFrame (HTML) in each page, presumably inside the DIV you are referring to.

Note that the source would have its own CSS. Your site-wide CSS only affects the appearance of the surrounding page, not the iFrame itself.

[1] http://www.w3.org/TR/html401/present/frames.html

Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.