There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen boot computer connection crash css dell display driver drivers email error ethernet excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem router slow software sound trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Solved: Padding Differences Between Internet Explorer & Firefox


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
TW.87's Avatar
Senior Member with 308 posts.
 
Join Date: Dec 2005
Location: Canberra, Australia
Experience: Intermediate
22-Feb-2008, 09:48 PM #1
Question Solved: Padding Differences Between Internet Explorer & Firefox
G'day,

I'm working on a new website at the moment (that you can see here: http://2008.rickkelly.com.au/[Global]/Global(Assets)/Global(Heading).php), and I am having some small problems with padding differences between Internet Explorer and Firefox.

The differences I am talking about can be seen with the drop-down navigation menu, as it appears further to the right of the corresponding button in Firefox than the display in Internet Explorer (which is how I want it to display).

As well as that, the form field there is not displaying evenly between the two browsers. Neither are showing up correctly. I know it's a simple fix, but for the life of me, I can't work it out.

Any help would be greatly appreciated!
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,715 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
25-Feb-2008, 02:28 PM #2
Quote:
Originally Posted by TW.87 View Post
The differences I am talking about can be seen with the drop-down navigation menu, as it appears further to the right of the corresponding button in Firefox than the display in Internet Explorer (which is how I want it to display).
It looks like a JavaScript issue. The getposOffset() function might be the culprit:
Code:
	function getposOffset(what, offsettype)

	{

	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;

	var parentEl=what.offsetParent;

	while (parentEl!=null)

	{

	totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;

	parentEl=parentEl.offsetParent;

	}

	return totaloffset;

	}
This is where that function is called:
Code:
	function GlobalNavigationActive(obj, e, menucontents, menuwidth)

	{

	if (window.event) event.cancelBubble=true

	else if (e.stopPropagation) e.stopPropagation()

	clearhidemenu()

	dropmenuobj=document.getElementById? document.getElementById("GlobalNavigation") : GlobalNavigation

	populatemenu(menucontents)

	if (ie4||ns6)

	{

	showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)

	dropmenuobj.x=getposOffset(obj, "left") dropmenuobj.y=getposOffset(obj, "top")

	dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
	dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"

	}

	return NavigationSystem()

	}
getposOffset() is apparently returning and "x" value that is different in Firefox than in IE and possibly other browsers. I'm not sure how to "fix" the issue, at least not right now.

]quote]As well as that, the form field there is not displaying evenly between the two browsers. Neither are showing up correctly. I know it's a simple fix, but for the life of me, I can't work it out.
[/quote]I can barely see the form field in either IE6 (Maxthon 2.0.8) or Firefox 3.0b3. So, I added some borders to the table that contains the form and it appears to be positioned the same in both browsers. The text above the form was positiioned differently but the form field itself seems to be consistently positioned. The form field starts with the "@" sign below the "sign-up" text.

Attached are screenshots.

Peace...
Attached Thumbnails
solved-padding-differences-between-internet-firefox3.jpg  solved-padding-differences-between-internet-maxthon.jpg  
TW.87's Avatar
Senior Member with 308 posts.
 
Join Date: Dec 2005
Location: Canberra, Australia
Experience: Intermediate
26-Feb-2008, 08:50 AM #3
Thanks for the help there.

I'll keep fiddling with it and see whether I can come up with something.
Fyzbo's Avatar
Senior Member with 1,777 posts.
 
Join Date: Feb 2002
Location: North Carolina, USA
Experience: Programming-Advanced|EVER
26-Feb-2008, 08:52 AM #4
I don't know if it's affecting anything, but get rid of the comments on the top. Browsers expect the doctype to be the first line on the page, if it's not they may go into quircks mode.
TW.87's Avatar
Senior Member with 308 posts.
 
Join Date: Dec 2005
Location: Canberra, Australia
Experience: Intermediate
26-Feb-2008, 06:25 PM #5
Quote:
Originally Posted by Fyzbo View Post
I don't know if it's affecting anything, but get rid of the comments on the top. Browsers expect the doctype to be the first line on the page, if it's not they may go into quircks mode.
That fixed it! Thank you so much!
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,715 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
26-Feb-2008, 07:19 PM #6
Quote:
Originally Posted by Fyzbo View Post
I don't know if it's affecting anything, but get rid of the comments on the top. Browsers expect the doctype to be the first line on the page, if it's not they may go into quircks mode.
Great call!

Peace...
rick22's Avatar
Junior Member with 21 posts.
 
Join Date: Feb 2008
29-Feb-2008, 08:51 AM #7
hey people thanx...
i was looking for an answer for this problem from quite some time..
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:58 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.