Solved

IMG Alignright - Does not work in IE7

Posted on 2008-10-19
5
721 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
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.

717 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