Hello Daniweb Community,

I was just pondering through thoughts as one does, when I couldnt answer my own question. How do you force adverts onto a page.

The scenerio is, I will have people uploading there sites to my site, as free hosting and free subdomain name. But, as it is all free for them, I wish to include advertisements.

Companies like Piczo force an advertisement at the top of the page.

Can anyone tell me how this is done.

Thank you,

They put the page into a frame, with the ads in another frame.

But it also makes any page that was so carefully crafted to validate on W3c fail to validate when displayed on the combined page. This makes web page makers mad.

Alternately, you could require that the page author provide an img tag with a link to the ad.

Please, no moving ads. They make me click Back faster than anything else.

Yeah, I knew about the Frame way of doing it.

But I hate putting things into frames unless they are designed to go in a frame.

It can alter the design of your site for the worse. You have to scroll unnecessarily.

I could try and get the author to provide a link, however, I wanted it done automatically...

Is there a way I can use a frameset but script it so changes height and width depending on the content?

If they send the files to you, you could edit them before putting them online.

If your ad is a banner across the top, everything else will move down.

Absolute positioning in a web page will mess up any attempt to add an ad.

Note that this site requires all ads for each position to be the same size.

I guess you can use .htaccess.