iFrame Width and Height are being ignored

4 messages Options
Embed this post
Permalink
dougoftheabaci

iFrame Width and Height are being ignored

Reply Threaded More More options
Print post
Permalink
(This post was updated on )

I did a test run of Shadowbox on a site pulling content into an iFrame and settings it's width and height in JS but while the content comes in just fine the width and height are ignored.

My rel attribute is
shadowbox;width=500;height=400
and my Shadowbox.init call has the option
players: ["iframe"]
. I tried setting the player as HTML but it just went to the link instead of injecting the HTML as AJAX, which is what I thought it might do. What am I doing wrong? I'm not using any javascript libraries on this page. I have the latest version of Shadowbox just downloaded this morning. The doctype is HTML 4.01—which is the one thing I suspect—and the browser is Firefox 3.0.13. Sorry, I can't post a link.
Wizzud

Re: iFrame Width and Height are being ignored

Reply Threaded More More options
Print post
Permalink
You might want to try setting width and height, as opposed to just height (twice)...?

maybe like...
   rel="shadowbox;width=500;height=400"
Combine literacy with curiosity and a whole world of information opens up to you
dougoftheabaci

Re: iFrame Width and Height are being ignored

Reply Threaded More More options
Print post
Permalink
Ugh... That explains why no one responded.

That's a typo. I didn't directly copy and paste from the source. Fixed.
SuMic

Re: iFrame Width and Height are being ignored

Reply Threaded More More options
Print post
Permalink
In reply to this post by dougoftheabaci
The same question