Modifier le width et height d'une div du plugin colorbox
Bonjour,
J'utilise le plugin jqeury colorbox pour afficher des popins, comme le mondre le code si-dessous:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| 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');
}
}); |
Voici le résultat
Code:
1 2
| <div id="cboxContent" style="float: left; width:572px; height:396px;">
<div " id="cboxLoadedContent" style="display: block; width:570px; overflow: auto; height: 394px;> |
Je veux pouvoir avoir le même width et le même height au niveau de ma div #cboxLoadedContent que la div pére #cboxContent., mais je ne sais pas comment colorbox fait les calcules des width & height, on dirait qu'il fait -2? par défaut il utilise
Code:
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
Merci par avance de votre aide.