Click to See Complete Forum and Search --> : Owen's Hack for ie
PeOfEo
12-20-2003, 06:22 PM
sends a different value to ie 5,5.5, and 6. Dug it up the other day, maybe someone here can appreciate it.
img.test { /* ie can see this */
position:relative;
top:-30px;
left:-7px;
}
head:first-child+body img.test { /* ie cant see this, ns can */
position:relative;
top:-30px;
left:-10px;
}
fredmv
12-20-2003, 10:41 PM
Nice hack. I wrote something quite similar to it a while ago:<style type="text/css">
/*<![CDATA[*/
#foo {
color: #f00;
}
html>body #foo {
color: #00f;
}
/*]]>*/
</style><div id="foo">Red in IE, blue in Mozilla.</div>
Actually, that's a pretty well known hack... :p
http://www.tantek.com/CSS/Examples/boxmodelhack.html (the latter part talks about it)
fredmv
12-20-2003, 11:30 PM
I knew I didn't come up with it, but I didn't know Tantek came up with that one! He's mostly "famous" for this one I believe:div.content {
width:400px;
voice-family: "\"}\"";
voice-family:inherit;
width:300px;
}
Yes, I believe you are correct. Both of them are really quite invaluable. :) Actually, as sad as it is, pretty much all hacks are. :rolleyes:
PeOfEo
12-22-2003, 11:10 AM
well this is what I have been using
http://centricle.com/ref/css/filters/
it is pretty handy, but there are bunches of other hacks they could add. But that is a basic few I can look at for quick reference.
PeOfEo
12-22-2003, 11:14 AM
here is another hack which is the equiv of owen's I guess
http://www.info.com.ph/~etan/w3pantheon/style/starhtmlbug.html
eyecrave
12-23-2003, 12:23 AM
div.content {
width:400px;
voice-family: "\"}\"";
voice-family:inherit;
width:300px;
}
Does this code work for height as well? Can you use it for both height & width?
I've got a box that has a header - middle (with left and right sides) and a footer that measure 186px.
Everything shows up find in IE, but in Mozilla the blue bar from the footer shows up bedind the right side of the middle, but the menu which is on the footer overlaps the border of the box.
PeOfEo
12-23-2003, 12:35 AM
That specific hack does not isolte all ie, it only isolates ie5.5 5 and 4. To get all three use something like owns or the other one I posted.
http://centricle.com/ref/css/filters/
that is great for detirmining what browsers a hack will work on, one of those isn't accurate but you will see which when you click for the description.