Okay, my title is a bit much, but my problem is real.
I'm trying to get images inserted by img_assist to align properly in my nodes. I found a potentially wonderful solution here:
However, the solution solves one issue and presents another. After making the following modification to the img_assist module:
< $output = "";
---
> $output = "
1289c1289
< $output .= "";
---
> $output .= "
";
And the following addition to my style.css file:
div.image_assist {
margin-left:3px;
margin-right:3px;
}
div.float_left {
float:left;
}
div.float_right {
float:right;
}
The images align properly in IE but are reduced to mere white-space. I have tried setting the height for the image div, but this doesn't seem to work...
Also in Firefox, this alignment trick seems to have no effect at all. Any ideas to help me banish this devilish behavior? Thanks in advance!
Comments
Changes to image.assist
Oops, those mods to the imgassist module were filtered out: use code tags!
Change
to
and
to
That's it...
Getting better
The problem of invisible images was banished. The code needed the positioning to be declared:
I also declared the #content div to be positioned relative...
The only problem now: this doesn't allow text to wrap around images or the alignment of images with the firefox browser. There must still be something amiss here. Any ideas?
Firefox div width
Okay, it looks like Firefox is making the width of the img_assist div 100%, even if I set the div float left (or right) to a specific width. Something is maybe overriding the width of the div, but I would think that the specificity of the css would take precedence of a generic div property?
A look to an example page would help
Glad you are making progress but with styling issues it is pretty hard to help without a link to a page showing the problem.
Thanks for the reply
I finally got Firefox to align the img_assist divs "correctly." I placed the CSS in my modules.css file, instead of the general style CSS. I think this forced the module.css to take precedence over whatever was interfering: in my page.tpl.php file I load the styles this way:
I'm not sure if I've just avoided some sloppy problem by doing this, because now I've discovered another little issue. Some the inline images don't nest properly in the content div (in Internet Explorer). They initially appear floating out of the content area and then magically reset themselves to their proper position. Key the twilight zone music. If you want to look at the problem, check out this page:
http://www.alpinecountyca.com/other_organizations/alpine_watershed_group...
Thank you for any suggestions/corrections, etc.
From bluemarine
The bluemarine has this in page.tpl.php, from the comment I would guess you want to add it to your theme.
And a word of warning, by hardcoding the importing of style sheets you hava made it hard to use other modules that have their own style sheet(s). It is generally better to use
<?php print $styles ?>
.Actually...
This hardcoding was the only way I could keep the event module from making events look like neon-colored flash cards... I would guess there is a better way...but I even deleted the style.css file, but my overides didn't work until I hard-coded the style sheet into the tpl.php file.
I'm not sure exactly what I did, but I got the inline images working for the most part... I turned off custom sizes with img_assist and called the modules file seperately... I do still have the print $styles line in the head. Will this cover me?
Thanks for the feedback.