tags:

views:

251

answers:

2

Is there any css hack for ff 3.5 and older (not 3.6) i used

.SubTabs ul, x:-moz-any-link
{
    /* IE7,6 Hack*/
    *top: -28px;
}

but this applies to all FF browser versions..

A: 

related

http://stackoverflow.com/questions/1159314/css-hack-to-target-firefox-3-5

Haim Evgi
well it might be related but he wants a hack that applies to 3.5 and newer...
Petoj
the solution relevant to this quest with the http://rafael.adm.br/css%5Fbrowser%5Fselector/
Haim Evgi
sorry but it has no support for detecting ff 3.6?
Petoj
A: 

Well solved it some what not 100% perfect but should work

/// <reference path="jquery-1.3.2-vsdoc2.js" />
$(document).ready(function() {
    if ($.browser.mozilla) {
        $('body').addClass("mozilla");

        var versionParts = $.browser.version.split("\.");
        var version = 0;
        if (versionParts.length > 0) {
            version = version + versionParts[0] * 1000000000000;
        }
        if (versionParts.length > 1) {
            version = version + versionParts[1] * 1000000000;
        }
        if (versionParts.length > 2) {
            version = version + versionParts[2] * 1000000;
        }
        if (versionParts.length > 3) {
            version = version + versionParts[3] * 1000;
        }

        if (version >= 1009002000000) {
            $('body').addClass("mozilla3-6andAbove");
        }
        else {
            $('body').addClass("mozilla3-5andBelow");
        }
    }
});

now you can add body.mozilla3-5andBelow in your css file and it should work...

Petoj