Solved

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

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

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
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 style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

728 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