Solved

IMG Alignright - Does not work in IE7

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What cart is this? 2 54
Html split(text) 2 46
How do I update select listbox after search 2 48
CSS Selector Chain NOT working for this situation? 3 10
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

737 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