{"id":77,"date":"2006-08-25T18:27:04","date_gmt":"2006-08-25T23:27:04","guid":{"rendered":"\/cgi\/wp\/?p=77"},"modified":"2006-08-25T18:29:39","modified_gmt":"2006-08-25T23:29:39","slug":"cascading-style-sheets-ie-hacks","status":"publish","type":"post","link":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=77","title":{"rendered":"Cascading Style Sheets IE Hacks"},"content":{"rendered":"<p>Today I learned how to do some Internet Explorer hacks to deal with differences in how Cascading Style Sheets are handled in other browsers and Internet Explorer.  The problem I ran into is that I wanted to absolutely position a graphic but the distance from the top must be greater for Internet Explorer than it is for Firefox, Netscape, and Opera. <\/p>\n<p>The first hack I learned is to use an underscore for the IE style property which is ignored by other browsers but overrides the preceeding property value in IE:<\/p>\n<p><code>top: 1605px;<br \/>\n\/* IE Hack *\/<br \/>\n_top: 1775px;<\/code><\/p>\n<p>The second hack I learned is Internet Explorer conditional comments but this did not seem to work very well:<\/p>\n<p><code>&lt;!--[if IE]><br \/>\n\ttop:  1775px;<br \/>\n< ![endif]--><\/><\/code><\/p>\n<p>The third hack is necessary for Internet Explorer 7 which no longer supports the underscore hack.  Internet Explorer 7 understands the child selector command:<\/p>\n<p><code><br \/>\nhtml>body #wheels-bottom {<br \/>\n\tposition: absolute;<br \/>\n\ttop: 1775px;<br \/>\n\tleft: 600px;<br \/>\n} <\/code><\/p>\n<p>Unfortunately, I have a problem because Firefox, Netscape, and Opera also support the child selector command so while it won&#8217;t effect earlier versions of Internet Explorer it does override the style for the other browsers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I learned how to do some Internet Explorer hacks to deal with differences in how Cascading Style Sheets are handled in other browsers and Internet Explorer. The problem I ran into is that I wanted to absolutely position a &hellip; <a href=\"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=77\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/77"}],"collection":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=77"}],"version-history":[{"count":0,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/77\/revisions"}],"wp:attachment":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}