Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

1px Difference between IE and FF, killing me

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-17-2009, 10:09 AM
  davidsaldana's Avatar 
davidsaldana davidsaldana is offline
 

Senior Member
  
Join Date: Oct 2005
Posts: 187
 

Default 1px Difference between IE and FF, killing me

Trying to line up container, and container bottom, and getting a 1px difference, between IE and FF. I know its not a lot, but it looks totally stupid because the footer is designed to integrate into the container.

Here is my code (including body):
Code:
HTML,BODY { margin: 0; background: url('images/body_bg.jpg') repeat-x #e2e9ef; text-align:center; } #Container { padding:10px; color:#ffffff; background: repeat-y center url('images/container_bg.png'); margin-left: auto; margin-right: auto; width: 974px; text-align: left; padding-bottom:0px; padding-top:0px; margin-top:-3px; } .Container_Bottom { padding-top:20px; background: no-repeat center url('images/container_bottom.png'); }

Please help, as I am pulling my hair out with this one.
__________________
4.4
Code:
Hello World
Reply With Quote
  #2  
Old 01-17-2009, 10:13 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: 1px Difference between IE and FF, killing me

Welcome to the wonderful world of IE compatibility. This is one of the most annoying things about web development - trying to get something to look exactly the same cross-browser. There are a few solutions:

First, you can specify a different stylesheet all together for IE, but that is a bunch of extra work.

Next, you can use display: inline; or display: table-cell; which sometimes fixes the issue.

Last, you can use the IE hack to give a different margin to IE, which is putting an _ before something. For example, if you want padding to be 20px for FF, but 19 for IE, you'd show it like this:

padding-top: 20px; _padding-top: 19px;

Try one of those and see if they help.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 01-17-2009, 11:44 AM
  davidsaldana's Avatar 
davidsaldana davidsaldana is offline
 

Senior Member
  
Join Date: Oct 2005
Posts: 187
 

Default Re: 1px Difference between IE and FF, killing me

Quote:
Originally Posted by balinor
Welcome to the wonderful world of IE compatibility. This is one of the most annoying things about web development - trying to get something to look exactly the same cross-browser. There are a few solutions:

First, you can specify a different stylesheet all together for IE, but that is a bunch of extra work.

Next, you can use display: inline; or display: table-cell; which sometimes fixes the issue.

Last, you can use the IE hack to give a different margin to IE, which is putting an _ before something. For example, if you want padding to be 20px for FF, but 19 for IE, you'd show it like this:

padding-top: 20px; _padding-top: 19px;

Try one of those and see if they help.

Thanks Balinor,
I tried the last one, but it didnt seem to work, this is the code I have:

Code:
.Container_Bottom { padding-top:20px; background: no-repeat center url('images/container_bottom.png'); margin-left:0px; _margin-left:-1px; }

Please let me know if I did something wrong.
__________________
4.4
Code:
Hello World
Reply With Quote
  #4  
Old 01-17-2009, 06:30 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: 1px Difference between IE and FF, killing me

Which version of IE is giving you trouble?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 01-17-2009, 06:31 PM
  davidsaldana's Avatar 
davidsaldana davidsaldana is offline
 

Senior Member
  
Join Date: Oct 2005
Posts: 187
 

Default Re: 1px Difference between IE and FF, killing me

Quote:
Originally Posted by balinor
Which version of IE is giving you trouble?

7.0
__________________
4.4
Code:
Hello World
Reply With Quote
  #6  
Old 01-17-2009, 06:32 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: 1px Difference between IE and FF, killing me

Ah, that hack won't work then. Try the display: inline; method.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 01-17-2009, 06:36 PM
  davidsaldana's Avatar 
davidsaldana davidsaldana is offline
 

Senior Member
  
Join Date: Oct 2005
Posts: 187
 

Default Re: 1px Difference between IE and FF, killing me

Quote:
Originally Posted by balinor
Ah, that hack won't work then. Try the display: inline; method.

Never used that before, where would it go in the code?

-ds
__________________
4.4
Code:
Hello World
Reply With Quote
  #8  
Old 01-17-2009, 06:37 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: 1px Difference between IE and FF, killing me

.Container_Bottom { padding-top:20px; background: no-repeat center url('images/container_bottom.png'); display: inline; }
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 01-17-2009, 07:19 PM
  davidsaldana's Avatar 
davidsaldana davidsaldana is offline
 

Senior Member
  
Join Date: Oct 2005
Posts: 187
 

Default Re: 1px Difference between IE and FF, killing me

Quote:
Originally Posted by balinor
.Container_Bottom { padding-top:20px; background: no-repeat center url('images/container_bottom.png'); display: inline; }

Just makes the whole bottom part disappear
__________________
4.4
Code:
Hello World
Reply With Quote
  #10  
Old 01-17-2009, 07:22 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: 1px Difference between IE and FF, killing me

Tough to assist on this one as I usually have to try about 10 different things before it works
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:14 PM.

   

 
X-Cart forums © 2001-2020