Solved

IMG Alignright - Does not work in IE7

Posted on 2008-10-19
5
715 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
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.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

820 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