?
Solved

IMG Alignright - Does not work in IE7

Posted on 2008-10-19
5
Medium Priority
?
723 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 2000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

770 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