I've defined an amazon field on my blog nodes that allows multiple amazon items to be added.
If I add multiple items, when the node is displayed the items are run together and displayed badly.
The display is fixed if, in amazon-item.tpl.php, the outer div is changed to have style=clear:both as below:
<div class="<?php print $classes; ?>" style="clear:both">
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | amazon.css20090719.patch | 1.1 KB | iva2k |
Comments
Comment #1
tcblack commentedI believe this is a CSS issue. I applied the change you suggested and saw no difference. The problem is caused by floating the image left in the CSS. This causes each successive image to be floated left but they appear to be nested because that's the way floated images flow.
Rather than floating left, turn off the float with float:none and the problem goes away.
Alternatively play with the amazon.css file to get what you're looking for.
Comment #2
iva2k commentedI rolled a patch against 6.x-1.x-dev, which fixes this issue in amazon.css file.
I also noticed that amazon.css is not always loaded if CSS optimization is enabled, so I moved drupal_add_css() into amazon_init() function in amazon.module.
Please review for commit to 6.x-1.x-dev. I believe the CSS part of it applies directly to 6.x-2.x-dev.
function theme_amazon_item() may need to be changed in 6.x-2.x-dev if CSS optimization remains an issue.
Comment #3
rfayIf you've tried this patch and it resolves these issues, please mark the patch RTBC. Not @iva2k, of course.
Comment #4
rfayCommitted with slight change (targeted field-type-asin instead of .amazon-item) - http://drupal.org/cvs?commit=270920
Please test in the dev version when it's updated and let me know if there are any issues.