Solved

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

Posted on 2008-10-17
3
1,424 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

939 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

10 Experts available now in Live!

Get 1:1 Help Now