Gantry/RT + boxplus detail misalign solved
Posted: 20 Jan 2012, 22:06
After trying to fix off-center images in boxplus I've found a problem and a solution.
The problem is the gantry css. It states that
body {
min-width: 960px
}
and content inside it
div .rt-container {
width:960px
}
Thats why in a iframe box of about 900px or less the iframe body and rt-container div is wider (960px) than the iframe itself.
The code that generates detail popup fortunately inserts local style. So it's easy to override Gantry/RT parameters:
It's com_phocagallery\views\detail\view.html.php line 118
The lines added between gantry-fix comments solves the problem.
But in future versions it would be great to extract this style generation from the source to some external file for easier adjustment.
Maxim
The problem is the gantry css. It states that
body {
min-width: 960px
}
and content inside it
div .rt-container {
width:960px
}
Thats why in a iframe box of about 900px or less the iframe body and rt-container div is wider (960px) than the iframe itself.
The code that generates detail popup fortunately inserts local style. So it's easy to override Gantry/RT parameters:
It's com_phocagallery\views\detail\view.html.php line 118
Code: Select all
// No Scrollbar in Detail View
if ($this->tmpl['detailwindow'] == 7) {
} else {
$document->addCustomTag( "<style type=\"text/css\"> \n"
." html,body, .contentpane{overflow:hidden;background:".$this->tmpl['detailwindowbackgroundcolor'].";} \n"
." center, table {background:".$this->tmpl['detailwindowbackgroundcolor'].";} \n"
." #sbox-window {background-color:#fff;padding:5px} \n"
// gantry-fix-begin
."body {min-width:100%} \n"
.".rt-container {width:100%} \n"
// gantry-fix-end
." </style> \n");
}
But in future versions it would be great to extract this style generation from the source to some external file for easier adjustment.
Maxim