Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Padding is different in IE than in all other browsers
Old 01-24-2010, 12:19 AM Padding is different in IE than in all other browsers
konetch's Avatar
Ultra Talker

Posts: 258
Trades: 0
Well I tihnk the tile says most of it, This is the CSS file for my site.

Code:
#top {
 background:#444;
 color:#fff;
 width:840px;
 padding:5px;
 margin-left:auto;
 margin-right:auto;
 margin-top:20px;
 margin-bottom:0px;
 text-align:left;
}
#top_nav {
 background:#444;
 width:850px;
 margin-left:auto;
 margin-right:auto;
 margin-top:0px;
 margin-bottom:10px;
 text-align:left;
}
#top_nav ul {
 list-style:none;
 margin:0;
 padding:0;
}
#top_nav li {
 float:left;
 border:1px #fff solid;
 height:20px;
 text-align:center;
}
#top_nav li:hover {
 float:left;
 background:#fff;
 height:20px;
 border:1px #fff solid;
 text-align:center;
}
#top_nav a {
 padding-top:2px;
 display:block;
 width:80px;
 height:25px;
 color:#fff;
 text-decoration:none;
}
#top_nav a:hover {
 padding-top:2px;
 color:#000;
 width:80px;
 height:25px;
 text-decoration:none;
}
The site looks great in FF, Opera, Chrome, and Safari, BUT when I look at it in IE the the menu (#top_nav) is longer than the header (#top). I don't know why this is, but if somebody could help me and tell me how I could fix it I would be thankful.
__________________
Alex
konetch is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-24-2010, 11:52 AM Re: Padding is different in IE than in all other browsers
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
What VERSION of IE??
Prior to the patch that fixed IE6's busted box model, you might be right about padding being treated differently. However, since then, IE's box model is in line with the W3C specs - same as the other, better browsers.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-24-2010, 04:42 PM Re: Padding is different in IE than in all other browsers
konetch's Avatar
Ultra Talker

Posts: 258
Trades: 0
The IE version I'm using is IE7. Any ideas on how I could fix it? The only way I could think of is using a conditional comment, but I'd rather just have one style sheet
__________________
Alex
konetch is offline
Reply With Quote
View Public Profile
 
Old 01-25-2010, 10:58 AM Re: Padding is different in IE than in all other browsers
Joak1m's Avatar
Average Talker

Posts: 17
Trades: 0
Are you using reset css file?
__________________

Please login or register to view this content. Registration is FREE
Joak1m is offline
Reply With Quote
View Public Profile Visit Joak1m's homepage!
 
Old 01-25-2010, 01:34 PM Re: Padding is different in IE than in all other browsers
ArtphotoasiA's Avatar
Extreme Talker

Posts: 245
Location: Italy
Trades: 0
Is unbelivable but is true also IE7 can cause serious problem and not showing same layout as other browser...

exactly I can tell why any single bug!! ...

IE is just the worst browser ever I suggest you to make a css file for it just for IE7 only where you correct the padding the margin all the discrepancies untill look same as other browser....

my 2 cents
__________________
" the moment, the unique and unrepeatable second "

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
ArtphotoasiA is offline
Reply With Quote
View Public Profile Visit ArtphotoasiA's homepage!
 
Old 01-31-2010, 02:54 PM Re: Padding is different in IE than in all other browsers
wongpk's Avatar
Extreme Talker

Posts: 178
Trades: 0
Can you show us the screenshot? Cannot imagine what went wrong now... :P
__________________
Regards,
Andrew

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
wongpk is offline
Reply With Quote
View Public Profile Visit wongpk's homepage!
 
Old 01-31-2010, 08:07 PM Re: Padding is different in IE than in all other browsers
solvision's Avatar
Average Talker

Posts: 29
Name: Simon
Trades: 0
The difference would be coming with using measurement in 'px'.

padding: 15px; in firefox wont be the same as in Explorer.

I always use "em" for padding now, gives me significantly less problems.

1em = 16px 0.5em = 8px etc. You can use it to 3 decimal places, but not necessary if you are consistantly using em for padding and margins.
__________________
ZAM Howto - simple, straight forward answers on how to get started with a website.


Please login or register to view this content. Registration is FREE
solvision is offline
Reply With Quote
View Public Profile Visit solvision's homepage!
 
Old 02-01-2010, 08:46 PM Re: Padding is different in IE than in all other browsers
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
padding: 15px; in firefox wont be the same as in Explorer.
Says who?? A px is a px is a px, doesn't matter WHAT browser you're using! You might have some very fractional differences due to IE rounding errors, but it will not turn 15px into 18 or 20, or anything else.
Quote:
The only way I could think of is using a conditional comment, but I'd rather just have one style sheet
Good luck with that. With the many bugs in IE versions, even 8, that's nearly impossible.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Padding is different in IE than in all other browsers
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.34804 seconds with 12 queries