NameSilo

IE/FF CSS Border Clash

Spaceship Spaceship
Watch

Harro

Established Member
Impact
1
So heres another Firefox, Interent Explorer clash thats giving me some problems.

I hav a div, a set number of pixels wide and high, and to this div I apply a 10px border. In FF the border is applied on the outside of the div, but in IE it is applied on the inside, effectively making the div 20px's slimmer and shorter.

Anyone know of any fixes or workarounds for this?
Thanks for any help.
Harro ;)
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
Code:
<style type="text/css">
.class {
  width: 200px;
  border: 10px;
}
</style>
<!--[if IE]>
<style type="text/css">
.class {
  width: 220px;
}
</style>
<![endif]-->
 
0
•••
Thanks for that, I always forget about <!--[if IE]> :hehe:

Harro.
 
0
•••

We're social

Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back