Usually when you use an IFRAME tag to link an external source the page that’s referenced by the SRC attributes is loaded at the top left corner. This is the default behavior, but sometimes you’d like to show to your users not the entire page from the top left corner, but to show only part of the external page instead.
You can wrap the IFRAME into a div and scroll the DIV content using absolute TOP and LEFT CSS properties.
Here’s an example:
width : 400px;
height : 200px;
overflow : hidden;
position : relative;
position : absolute;
top : -100px;
left : -100px;
width : 1280px;
height : 1200px;
Here you have one DIV with dimensions 400x200px. Now by moving the IFRAME within it you can position it on the right place.
<iframe src="http://www.example.com" id="my-iframe" scrolling="no"></iframe>
Continue reading Scroll an IFRAME Content to a Predefined Position
How to detect the browser speed?
It’s easy, you just put a ajax or image load in the beginning of the page and than you know what the speed is. But the problem is that the ajax and the image load need to finish to know exactly how slow or fast the connections is. And even worse, you need to slow down the page even for normal (fast) connections. And where’s the point? You get the site slower only to understand the connection. That’s not OK.
Well if both style=”border:[0|none]” is working and border=”0″ attribute doesn’t help, and all this is not working only on IE, the solution is …
<iframe frameborder=”0″ … ></iframe> is helping
What a lovely combination
Recently I wrote an article about the Google Adsense problem with page load blocking and than the solution was simple and elegant. You must put your ad in a separate .html file and to include it into your page with an iframe. That gives the page the ability to “breath” and to load faster.
You can see the entire article here.
When everything’s OK, wait for the IE
Yes as usual every browser loaded the iframe correclty, except … Continue reading Google Adsense, iframes and IE