How can I add
margin-top:10px;
to a div in ONLY NON IE browsers?
or, is there a way to subtract margin? cuz IE i think adds up margin and screws things up What you want to do is use a hack.
For the IE code use:
* html #div {margin-top:10px;}
For all other use:
#div {margin-top:10px;}You can use javascript too.
Detect your browser and is it is IE you can change style for the element that you want.trydiv {
/* IE */
}
* > div {
/* NN */
margin-top: 10px;
}
margin-top:10px;
to a div in ONLY NON IE browsers?
or, is there a way to subtract margin? cuz IE i think adds up margin and screws things up What you want to do is use a hack.
For the IE code use:
* html #div {margin-top:10px;}
For all other use:
#div {margin-top:10px;}You can use javascript too.
Detect your browser and is it is IE you can change style for the element that you want.trydiv {
/* IE */
}
* > div {
/* NN */
margin-top: 10px;
}