InfoLinks inFrame and Printing

One annoying thing about InfoLinks support is that sometimes when you ask a simple question they outright refuse to give you an answer and basically just tell you that their product is broken and can't be fixed.

One such conversation that I had with their support staff was regarding the inFrame advertising option. Now this is a particularly useful way of adding advertising to a web page in that the ads only appear when the browser viewport is wide enough that there is enough space on either side of your page content for these additional ads to be displayed. Basically when your visitors have their browser open a lot wider than needed for your page some of what would otherwise be wasted space on either side of your content gets used by InfoLinks to display additional ads. Where the viewport is not as wide the ads simply don't appear and so your visitors can still see all your content.

There is one problem though with the way that InfoLinks have their inFrame ad code set up and that is where your visitor has their viewport wide enough to see the extra ads and then decides that they want to print your page. The width of an A4 or letter sheet of paper is generally going to be a lot narrower than the width of a web page where there is space for the extra ads to fit either side of the content. In fact if someone tries to print a page with the inFrame ads visible then these ads appear in front of the page content and the actual content for the first page of the printed output is almost completely hidden. Your visitor ends up seeing only a couple of letters from the middle of each line of your content on the first page of their printout of the page.

The obvious fix is to have these ads hidden when the page is printed. What is not so obvious is how to identify the inFrame ads so that they can be hidden when printing the page. I decided to ask support what values to use to handle this and was basically told that it is not possible - and that therefore the inFrame ads are unusable for any web site where the content is more important to your visitors than the ads. This didn't sound right to me and so I had an extensive conversation with their support staff and was continually assured by the person I was in contact with that the service was broken and that they had no intention of fixing it.

In fact the support person was wrong with their answer on each occasion and was just not prepared to find out what the correct answer to my query was. It is in fact trivially easy to set up the inFrame ads so that they don't break your web page by displaying in front of the content when someone prints the page.

I was aware from the start that there had to be a way to do this since the JavaScript that inserts the ads into the page needs a way to reference the ads that it is inserting in order to apply the animation that has them gradually moving into view. That's why I spent so much time trying to get their support to give me the answer. Since they refused to I finally decided to figure it out for myself.

To save everyone else wanting to use the InforLinks inFrame advertising from being given the runaround by support I'll provide the answer to how to fix the advertising so that it doesn't break your page.

The CSS that you need to add to your page when you use this advertising option which InfoLinks don't provide is:

@media print {
#IL_IF_LEFT, #IL_IF_RIGHT {display:none !important;}

With that added to the CSS in your page you can have the inFrame ads appear when the browser is wide enough for them to fit outside of your content and not have them display over the top of your content when someone prints the page.

I am left wondering why the support person insisted that there wasn't a way to fix their script though rather than just telling me the two ids of the ad frames.

When I advised InfoLinks of this simple fix they claimed to have been unaware that it was even possible - but I can't see how anyone could possibly use that particular ad option without it. Also in asking how to do it in the first place I had indicated that I knew that it was possible but just needed to know one piece of information to be able to do it so it also makes no sense that they continually told me it wasn't possible when I had already made it clear to them that it was.

Get InfoLinks.

go to top

FaceBook Follow
Twitter Follow