Input [type = submit] CSS does not work in Internet Explorer 6

The following code does not work in Internet Explorer 6. I cannot put classor in it id. Are there any CSS hacks for this?

This code is in WordPress . I can not change the code; I can only change the CSS.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <style type="text/css">
            form input[type=submit]{
                background-color:#FE9900;
                font-weight:bold;
                font-family:Arial,Helvetica,sans-serif;
                border:1px solid #000066;
            }
        </style>
        <title>Untitled Document</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
        <FORM action="">
            <INPUT type=text name=s> 
            <INPUT type=submit value=Search>
        </FORM>
    </body>
</html>
+3
source share
3 answers

Instead, enter the input class, and then separate it from there. Like this:

<input type="submit" class="myClass" value="Search" />

And then create .myClass in your CSS. This should also work in IE6.

+11
source

You are right, this does not work.

Quirksmode.org is a great site with browser compatibility information:

http://www.quirksmode.org/css/contents.html

+5
source

Internet Explorer 6 [attr="value"]. , CSS (IE 6 + :last-of-type , ).

, , , - , , span.

- , - JavaScript, , CSS. jQuery :

$("form input[type=submit]").css({
    "background-color": "#FE9900",
    "font-weight": "bold",
    "font-family": "Arial,Helvetica,sans-serif",
    "border": "1px solid #000066"
});
+3

Source: https://habr.com/ru/post/1715615/


All Articles