I am creating a Page with a block of text and an image. Using html to align an image on the right hand side of my text. It works in Garland. When I installed Sky the image aligns on the right, but the text wont wrap.
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_image_float
At first my text contained a list. The list appeared to stop the wrapping so I removed the list tags. In FF the text now wraps, but it wont wrap in IE7.
Is this controlled within CSS and if so where whould I look?
Comments
Comment #1
summit commentedHi,
Confirming this situation. In FF the text wraps. In IE6 and IE7 the text won't wrap..
Setting this to bug-report, while I think the intention is it should work the same in FF and IE.
Thanks a lot in advance for going into this!
Greetings,
Martijn
Comment #2
summit commentedHi,
I have it "hardcoded" working now in IE with adding:
To the theme.
Now I can use these classes img-right, img-left and img-center to get my images roughly where I want them.
img floating right is my default.
Off course I would prefer the theme to solve this by itself.
EDIT: with other themes like purple_beauty there is now img in css. Then the EDitor handles the code, like Fckeditor.
With Sky I am not able to get the same situation through Fckeditor without adding these classes.
Greetings,
Martijn
Comment #3
StevenK commentedI confirm that it behaves exactly the same in the Drupal 6 version.
Furthermore, when i added the hardcoded classes to the Drupal 6 theme, following the suggestion from Summit, in appearance.css, it created a white section just bellow the footer message, and I had to remove the first class declaration (img. {....) in order to remove it.
Comment #4
summit commentedHi,
I added it to style.css not to appearance.css may be thats the difference.
I had to add img {.. because I have already images in my content.
But off course it is only a workaround. Hopefully the theme-owner will make a better approach with css.
Greetings,
Martijn
Comment #5
aimutch commentedIf you remove img from this part of the code in style.css:
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
The image aligns correctly in IE7. What I believe is happening is that the browser sees the vertical-align attribute so it then fails to recognize any other alignment attribute set in the image tag.
I'm not aware of a way to clear a style once it's applied without overriding it. However, we don't want to override it with another style, just remove it completely. I would suggest that we remove img from this list. If needed, we can create a separate definition for img that does not include the vertical-align attribute. I tried creating a separate img definition in IE7.css but the lack of vertical-align attribute didn't prevent it from inheriting it from the style.css file.
Comment #6
jacineGood call, I think you are right... All it really needs is border: none, so I've committed those changes. Can you guys test it out and see it that helps? Thanks.
Comment #7
Stratasfear commentedAHHHH Thank you so much. I have been trying to solve this problem for weeks in another theme entirely and this solved it.
Comment #8
aimutch commentedI can confirm this fixed in the latest release on Drupal 6 with IE 7 if you want to close this bug.
Comment #9
aimutch commentedComment #10
aimutch commented