How to adjust an iframe element’s height to fit its content | 456 Berea Street
february 2012 by Aetles
In an ideal world there would always be a clean way of displaying data supplied by a third party on your site. Two examples would be getting the data in JSON or XML format from a Web Service and having an API to code against. But you don’t always have any of those options.
Sometimes the only way of incorporating data from a third party is by loading it in an iframe element. A few examples are financial reports, e-commerce applications, and ticket booking applications. Using an iframe is not ideal for many reasons, one of which is that it can make multiple sets of scrollbars appear on the page. Not only does it look ugly, it also makes the site less user-friendly. But there is a workaround.
Adjust the iframe’s height with JavaScript
By using the following piece of JavaScript you can adjust the height of the iframe element to match the height of its content:
code
css
iframe
javascript
js
Sometimes the only way of incorporating data from a third party is by loading it in an iframe element. A few examples are financial reports, e-commerce applications, and ticket booking applications. Using an iframe is not ideal for many reasons, one of which is that it can make multiple sets of scrollbars appear on the page. Not only does it look ugly, it also makes the site less user-friendly. But there is a workaround.
Adjust the iframe’s height with JavaScript
By using the following piece of JavaScript you can adjust the height of the iframe element to match the height of its content:
february 2012 by Aetles
An Introduction To Object Oriented CSS (OOCSS) - Smashing Coding
december 2011 by Aetles
Have you ever heard the phrase “Content is King”? Being a Web developer, and therefore having a job that’s often linked to content creation, it’s likely you have. It’s a fairly overused but true statement about what draws visitors to a site.
From a Web developer’s perspective, however, some may argue that speed is king. More and more, I’m starting to favour that stance. In recent years many experienced front-end engineers have offered their suggestions on how we can improve the user experience by means of some performance best practices.
Unfortunately, CSS seems to get somewhat overlooked in this area while many developers (for good reason) focus largely on JavaScript performance and other areas.
In this post, I’ll deal with this often overlooked area by introducing you to the concept of object oriented CSS and how it can help improve both the performance and maintainability of your Web pages.
code
css
webdesign
From a Web developer’s perspective, however, some may argue that speed is king. More and more, I’m starting to favour that stance. In recent years many experienced front-end engineers have offered their suggestions on how we can improve the user experience by means of some performance best practices.
Unfortunately, CSS seems to get somewhat overlooked in this area while many developers (for good reason) focus largely on JavaScript performance and other areas.
In this post, I’ll deal with this often overlooked area by introducing you to the concept of object oriented CSS and how it can help improve both the performance and maintainability of your Web pages.
december 2011 by Aetles
Kelly Sutton's Tumblr, 12 Steps to Writing Better Web Code
november 2011 by Aetles
It’s been over a decade since Joel Spolsky wrote the Joel Test: 12 Steps to Better Code. The man was ahead of his time. Sure, things like version control are a no-brainer for any competent shop out there. With the ease of tools out there, most teams have a bug database and have reasonably up-to-date schedules. Heck, most software companies out there do pretty well on Joel’s 12 steps. But those 12 steps are no longer enough.
I’ve become somewhat of a process nut, which is weird. Usually I’ve got my finger over the big red deploy button before anyone else. But that’s not process, that’s deploying. I like to hear how other companies work. I see the most trivial roadblocks frustrate some developers. Many companies, both big and small, pay too little attention to process. It hurts morale, it contributes to unnecessary work and it will eventually lead to a product falling apart.
This is my attempt to codify what I think are 12 great supplemental steps to Joel’s first 12. Like Joel’s, you should give a binary answer to each question: “yes” or “no.”
code
development
programming
tips
I’ve become somewhat of a process nut, which is weird. Usually I’ve got my finger over the big red deploy button before anyone else. But that’s not process, that’s deploying. I like to hear how other companies work. I see the most trivial roadblocks frustrate some developers. Many companies, both big and small, pay too little attention to process. It hurts morale, it contributes to unnecessary work and it will eventually lead to a product falling apart.
This is my attempt to codify what I think are 12 great supplemental steps to Joel’s first 12. Like Joel’s, you should give a binary answer to each question: “yes” or “no.”
november 2011 by Aetles
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) - Joel on Software
august 2006 by Aetles
Vad en mjukvaruutvecklare absolut minst måste veta om teckenkodning.
character
encoding
teckenkodning
code
utf-8
iso-latin
teckentabeller
Webbutveckling
Programmering
august 2006 by Aetles
SitePoint Blogs » Do you know your character encodings?
august 2006 by Aetles
En genomgång av vad teckenkodning är och teckentabeller mm.
character
encoding
teckenkodning
code
utf-8
iso-latin
teckentabeller
Webbutveckling
august 2006 by Aetles
A tutorial on character code issues
august 2006 by Aetles
En mycket utförlig genomgång av teckenkodning för de som behöver förstå detta på djupet.
character
encoding
teckenkodning
code
utf-8
iso-latin
Webbutveckling
august 2006 by Aetles
Sack of Ajax
may 2005 by Aetles
SACK - Simple Ajax Code Kit - är kod som gör det enkelt att använda Ajax i webbapplikationer och som ska vara säkrare än saker som SAJAX.
ajax
xmlhttprequest
javascript
sajax
Twilight
Universe
simple
code
kit
Webbutveckling
PHP
may 2005 by Aetles
Copy this bookmark: