Solved

Image in table not aligning with page background image -- internet Explorer versus Firefox

Posted on 2008-10-17
3
1,423 Views
Last Modified: 2010-04-21
Hi,
I have a webpage located here http://www.grosskopfandblack.prontopage.com/page/page/6562464.htm (please view source to see the code) . Note that the page background http://www.grosskopfandblack.prontopage.com/f/design/t_page_background.jpg does not align (use the woodgrain looking line below the black "scales of justice" as the reference point)  with the table when viewed in Firefox, but it does in Internet Explorer.

I realize that there is some kind of code that I would use to have the page render one thing for IE and another for FF but I have no clue what that code would be.

Can someone please help me?

Thanks,
chris
0
Comment
Question by:chrisj1963
3 Comments
 
LVL 10

Expert Comment

by:GeoffSutton
ID: 22746151
Not able to view the source on your page, but the best thing for alignment would be to use javascript to check the browser type, then change the position style to relative (obj.style.position="relative";), then adjust the top and left values accordingly (obj.style.top="-2";) will move it up 2 pixels, 2 will move down 2 px etc.

Keep in mind that relative may not work because it will be messed up by browser width.  Position.absolute may be a better option, but Firefox puts the 0,0 at the top left of the parent element, and IE puts 0,0 at the top left of the screen.

Hope this helps,

Geoff
0
 
LVL 3

Accepted Solution

by:
JunkMan earned 500 total points
ID: 22746252
height's is your issue, there is no need for specific browser css code, FX and diferent browser render inline elements diferently, i've realized that your header row, the one that has the Home, More Info, About us links is slightly shorter in FX than IE, if you set the height of it, has attached <tr height="30" the image aligns in both browsers.

I hope it helps.
<tr height="30">

							<td bgcolor="#f9d78d" background="">

							

			<table cellspacing="5" cellpadding="0" border="0" align="center">

			

			

				<tbody><tr>

			

			

				

				

					<td>

						<table cellspacing="0" cellpadding="0" border="0" bgcolor="#f9d78d" width="100%">

							<tbody><tr>

				
 

					<td bgcolor="#f9d78d" align="center" width="140" class="link" onmouseover="bgColor='fcf9e7'" onmouseout="bgColor='f9d78d'" onclick="window.location='/page/page/6562464.htm'">

						<a href="/page/page/6562464.htm" onclick="return false;" class="link">Home</a>

					</td>

													

							</tr>

						</tbody></table>

					</td>

					

				 

			

				

				

					<td>

						<table cellspacing="0" cellpadding="0" border="0" bgcolor="#f9d78d" width="100%">

							<tbody><tr>

				
 

					<td bgcolor="#f9d78d" align="center" width="140" class="link" onmouseover="bgColor='fcf9e7'" onmouseout="bgColor='f9d78d'" onclick="window.location='/page/page/6562465.htm'">

						<a href="/page/page/6562465.htm" onclick="return false;" class="link">More Info</a>

					</td>

													

							</tr>

						</tbody></table>

					</td>

					

				 

			

				

				

					<td>

						<table cellspacing="0" cellpadding="0" border="0" bgcolor="#f9d78d" width="100%">

							<tbody><tr>

				
 

					<td bgcolor="#f9d78d" align="center" width="140" class="link" onmouseover="bgColor='fcf9e7'" onmouseout="bgColor='f9d78d'" onclick="window.location='/page/page/6562466.htm'">

						<a href="/page/page/6562466.htm" onclick="return false;" class="link">About Us</a>

					</td>

													

							</tr>

						</tbody></table>

					</td>

					

				 

			
 

			

				</tr>

			

			

			</tbody></table>

		 

		

							</td>

						</tr>

Open in new window

0
 

Author Closing Comment

by:chrisj1963
ID: 31507327
Sorry about the delayed repsonse. thanks for the solution!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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.
This article discusses four methods for overlaying images in a container on a web page
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

762 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now