Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-10-17
3
Medium Priority
?
1,433 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 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Find out what you should include to make the best professional email signature for your organization.
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 …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

916 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