Hi,

I'm using:
fckeditor-6.x-1.4
imageapi-6.x-1.6
imagecache-6.x-2.0-beta10
imagefield-6.x-3.2

When I add an image to the editor with IMCE and give it the property 'Align right', then in the editor the image is aligned properly. When saved, the image aligns right in Firefox, but not in Internet Explorer (7). In the source code of the page the img tag does have a align setting, but not a float. That's the difference in interpretation between FF en IE. Therefore, I've added float:right to fckstyles.xml:

<Style name="Image on Right" element="img">
      <Attribute name="style" value="padding: 5px; margin-right: 5px; float:right;" />
      <Attribute name="border" value="2" />
      <Attribute name="align" value="right" />
</Style>

But that doesn't change a thing (the style is not added).

Could you please tell me where and how can I set the float property?

Comments

Hk001’s picture

Those settings were overwritten by the style.css, in which I used a CSS reset sheet to eliminate the differences between IE & Firefox. Just removing the img tag from the reset sheet, fixed my problem.

ressa’s picture

... but I found this, which seems to work: http://drupal.org/node/375588#comment-1436150

I am using the ninesixty theme, and when I comment out line 27 (vertical-align: baseline;) in reset.css, the images are floating correctly, left end right in Internet Explorer 7.

I haven't tested it thoroughly, I hope it doesn't screw something else up, fingers crossed.

EDIT, after seeing the solution posted by hk001, while writing the above:
I ended up taking out img from all the tags in reset.css, so that only that tag has vertical-align: baseline; removed:

img {
  margin: 0;
  padding: 0;
  border: 0;
/* outline: 0; */
  font-size: 100%;
/*  vertical-align: baseline; TO fix IE problem with aligning images */ 
  background: transparent;
}

But even if I remove img from the reset.css stylesheet, the default style from the fckstyles.xml is still ignored. No <style="padding: 5px; margin-left: 5px" /> in img on the html of a page with an image aligned...