Jump to content

Ie Vs Firefox Image In Div Problem


rmpotter
 Share

Recommended Posts

Hello. I'm having a problem with an <img> in my <div>.2.jpg1.jpgin the side bar, you can see the image on the right, and how, depending on the browser, is either 100% top or 100% bottom. This makes it impossible for me to center the image, because adjusting it up or down, makes it messed up on the other browser. How do I go about fixing this? It's like I say, I can easily adjust the image up or down using style="position: relative; top: 20%;", however it messes up in the other browser.Also, I must mention that the sidebar is in a table, but the problem at hand is the img within the div. This is my code...

									<td colspan="2">									<div class="links" style="height: 35px; width: 100%;">																		<a style="position: relative; top: 20%;" href="#" id="inspection" onclick="showResults(this.id)">     Inspection									</a><img  align="right" src="./images/icons/note.png" />									</div>																		<div class="links" style="height: 35px; width: 100%;">									<a style="position: relative; top: 20%;" href="#" id="media" onclick="showResults(this.id)">     GPS Site Map									</a><img align="right" src="./images/icons/map.png" />									</div>

messy code, I know, but it works good enough for now. Thanks in advance for any help!

Link to comment
Share on other sites

change the images to background images and position them center&right. I wouldn't count on align=right to work them same way in every browser (as it apparently does not).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...