How to set auto width and height of smoothbox in Socialengine based on content?

81 Views Asked by At

I am trying to change the width and height of smoothbox popup which in fact is the iframe. The traditional way of setting iframes width ain't working because of TB_Overlay.

I had just tried CSS way as listed below but not really as flexible as a normal iframe.

I have added no conflict and used jquery.

 var $j = jQuery.noConflict();
 $j('#TB_window').css('width','800px');
 document.getElementById("TB_iframeContent").width = "800";

Is there any better way to set the smoothbox width and height? Hope many are looking for answer.

Thanks in advance

1

There are 1 best solutions below

0
Gaurav Sharma On

jquery will not work in iframe. It would be easy if you add new CSS according to the particular page

#page_id .particular_div_class #TB_windowcss
{
'width':'800px' !important;
}