Solved

IMG Alignright - Does not work in IE7

Posted on 2008-10-19
5
711 Views
Last Modified: 2013-11-19
Hi Experts,

I'm using this in CSS:

img.alignright {float: right; clear: right; margin: 0 0 5px 10px; display: inline;}

And this HTML code:

<p><img class="alignright" src="http://www.winhelponline.com/blog/wp-content/uploads/oct08/srchinf.png">Some text here.</p>

(URL: http://www.winhelponline.com/blog/fix-xp-search-companion-blank-window/)

What happens is that the image aligns to the left side after the page is fully loaded. Firefox displays the image correctly, aligned to the right side. Can someone help me fix this issue? Thanks.
0
Comment
Question by:sramesh2k
  • 3
  • 2
5 Comments
 
LVL 42

Expert Comment

by:David S.
ID: 22752404
The PNG fixer script that you're using is causing that problem. IE7 doesn't need the script, so I suggest you modify it to only work in IE5.5 and IE6.

You would need to change this line:

if ((version >= 5.5) && (document.body.filters))

to

if ((version >= 5.5) && (version < 7) && (document.body.filters))


I suggest you read Tips on Debugging Layouts: http://www.dynamicsitesolutions.com/css/debugging-layouts/

0
 
LVL 34

Author Comment

by:sramesh2k
ID: 22752990
Hi Kravimir,

Thanks for the response. I checked the two .JS files ("tabber.js" & "other.js"), and can't find the lines you stated. What am i missing?


0
 
LVL 42

Accepted Solution

by:
David S. earned 500 total points
ID: 22753151
Sorry. It's not on your server. Your page calls this script:

http://www.letsgetsocialnow.com/source-codes/small.js

which then calls this one, which is the one with the line I mentioned (there are multiple instances of the line):

http://www.letsgetsocialnow.com/js/pngfix.js
0
 
LVL 34

Author Comment

by:sramesh2k
ID: 22754880
Brilliant! I removed the "social" Javascript and things work fine now. Thanks for your diagnosis, Kravimir.
0
 
LVL 34

Author Closing Comment

by:sramesh2k
ID: 31507562
Very well done. Thank you!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now