开发者

Joomla - Can I add code after # of modules?

开发者 https://www.devze.com 2023-02-18 06:33 出处:网络
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/Categor

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:

Joomla - Can I add code after # of modules?

http://d.pr/N4e4

and on

FF:

Joomla - Can I add code after # of modules?

http://d.pr/RZcQ

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消