Joomla - Can I add code after # of modules?
Here's the problem - On my homepage I'm displaying 9 modules at a specified width that float: left. The height is not specified and will vary with each new article that I post to the Section/Category. There are 3 modules in each row, with the first of the new row set to clear:left.
This works fine with FF3, FF4, Chrome, and IE8 - but IE7 does not appear to be clearing properly. The modules, each wrapped in a div, seem t开发者_如何转开发o be ignoring the clear, and appear almost as though they were just floating.
Hopefully, an image will explain that better than I am able to -
IE7:
and on
FF:
What I'm wondering is if I can tell Joomla to add a <div class="clear"></div>
after each set of 3 modules have been displayed?
<div class="module">CONTENT</div>
<div class="module">CONTENT</div>
<div class="module">CONTENT</div>
<div class="clear"></div>
<div class="module">CONTENT</div>
<div class="module">CONTENT</div>
<div class="module">CONTENT</div>
<div class="clear"></div>
<div class="module">CONTENT</div>
<div class="module">CONTENT</div>
<div class="module">CONTENT</div>
<div class="clear"></div>
All of that would be a result of the single jdoc:include statement:
<jdoc:include type="modules" name="articles" style="Articles" />
Thanks!!
The problem is most likely in your CSS and the way you are clearing the floats doesn't work with IE7. You probably should implement a solid clear fix in your CSS, here is a really good article on an updated clear fix that works on any modern browser, and IE6/7 too.
http://perishablepress.com/press/2009/12/06/new-clearfix-hack/
精彩评论