Div won't wrap around Sortable Fancybox Gallery

Permalink
Hey!

I'm new to C5 and have been tackling some problems on my own, but I can't seem to find a solution to this one..

I'm using the Sortable Fancybox Gallery and it's working great! When I'm in edit mode, nothing's wrong, but when I publish my edits, the div that should wrap around the Fancybox Gallery doesn't wrap around it.

I use a custom template that holds a div with the <?php $a = new Area('Main'); $a->display($c); ?> tag in it, like this:

<div id="content" class="rounded-corners">
   <?php $a = new Area('Main'); $a->display($c); ?>
</div>


I've put the Sortable Fancybox Gallery as a block in that particular area.

Can anyone help me out?

intothewoodshed
 
ScottSandbakken replied on at Permalink Best Answer Reply
ScottSandbakken
Try this:

<div id="content" class="rounded-corners">
   <?php $a = new Area('Main'); $a->display($c); ?>
   <div class="clearfix"></div>
</div>


or this:

<div id="content" class="rounded-corners">
   <?php $a = new Area('Main'); $a->display($c); ?>
   <div class="clearfix" style="clear:both"></div>
</div>
intothewoodshed replied on at Permalink Reply
intothewoodshed
Thanks! That worked like a charm.

I used my footer div as a clearing div, but somehow that doesn't work in C5. Does that have something to do with calling the footer from footer.php? I'm a newbie to php, but would like to understand this :)

Cheers!
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
Its a CSS issue. When you float an element, it no longer has a height or width in the DOM. All the images output by Sortable FancyBox Gallery are in containers that are "floated".
intothewoodshed replied on at Permalink Reply
intothewoodshed
That makes sense, thanks!