FrOzeN Posted September 29, 2006 Share Posted September 29, 2006 I'm trying to get this button to look the same in both IE and FF.[img]http://img208.imageshack.us/img208/965/buttonszx8.jpg[/img][b]My CSS[/b]:[code].button { background-color: #eee; border: #000 1px solid; color: #000; font: 11px Verdana, Tahoma, Arial, Sans-Serif;}[/code]Example page: http://www.clananthrax.net/example.html1. I want the padding to be the same (or relatively similar). 2. I don't want IE to add the 2px black border, I just want it to stay as a 1px border.Any suggests with my css to get them more the same? Quote Link to comment https://forums.phpfreaks.com/topic/22471-customizing-a-button-displays-differently-in-ie-and-ff/ Share on other sites More sharing options...
notDeadYet Posted October 5, 2006 Share Posted October 5, 2006 Firefox and IE6 handle widths, padding and cell-spacing differently.IE includes the cellpadding/spacing in the width attributes. width: 400px;padding: 20px; // makes a box 400px wide.Firefox treats width, padding/spacing seperately, so they would need to add up to the total width:width: 360px;padding: 20px; // also makes a box 440px wideTo write that in your css file,td {width: 360px;padding: 20px;}* html td {width: 400px;padding: 20px;}Adding the * html makes that code only visible to IE brower, so it overwrites the first style that Firefox will read.So, you may need to set width/padding for your link cells just to make sure they are the same. Quote Link to comment https://forums.phpfreaks.com/topic/22471-customizing-a-button-displays-differently-in-ie-and-ff/#findComment-104046 Share on other sites More sharing options...
FrOzeN Posted October 5, 2006 Author Share Posted October 5, 2006 Thanks, I'll look into tweaking it with that. :) Quote Link to comment https://forums.phpfreaks.com/topic/22471-customizing-a-button-displays-differently-in-ie-and-ff/#findComment-104180 Share on other sites More sharing options...
Daniel0 Posted October 6, 2006 Share Posted October 6, 2006 You could have something like this, but it would be kind of annoying to maintain multiple stylesheets: [code]<link rel='stylesheet' href='global.css' title='Global stylesheet' /><?phpif(check_for_ie_here){?><link rel='stylesheet' href='global.css' title='IE stuff' /><?php}else {?><link rel='stylesheet' href='global.css' title='FF stuff' /><?php}?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/22471-customizing-a-button-displays-differently-in-ie-and-ff/#findComment-104810 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.