javascriptjquerycsscolorbox

how to customise the width of #cboxLoadedContent in jquery colorbox


I'm using jquery plugin colorbox,

I encounter a problem when trying to set width and height of div #cboxLoadedContent which is a child of cboxContent div, by default it using box-sizing, I don't know how colorbox calculate the width & height of this div. I have for example the parent div:

<div id="cboxContent" style="float: left; width:572px; height:396px;">

<div " id="cboxLoadedContent" style="display: block; width: 570px; overflow: auto; height: 394px;>

Can I have the same value of my cboxcontent in cboxLoadedContent?


Solution

  • Thnaks for your answer.

    In fact I'm not using rel:'group',

    This is my code :

    var popin_width = '572';
    var popin_height = '416';
    if( $('.ie8, .ie7').length )
    {
        popin_height = '417';
    }
    if( $('.ie7').length )
    {
        popin_height = '427';
    }
    
    
    $('.popin').colorbox({
        inline: true,
        width: popin_width,
        height: popin_height,
        opacity: 0.8,
        overlayClose: true,
        close: 'Fermer',
        onOpen: function() {
            $('a, :input, object').attr('tabindex', '-1');
        },
                onClosed: function() {
            $('a, :input, object').attr('tabindex', '0');
        }
    });