{"id":493,"date":"2009-06-09T10:01:05","date_gmt":"2009-06-09T15:01:05","guid":{"rendered":"http:\/\/crysodenkirk.com\/blog\/?page_id=493"},"modified":"2009-06-10T10:48:21","modified_gmt":"2009-06-10T15:48:21","slug":"tricks","status":"publish","type":"page","link":"https:\/\/crysodenkirk.com\/blog\/reference\/tricks\/","title":{"rendered":"Dev Tricks and CSS Hacks"},"content":{"rendered":"<h3>Development Tricks<\/h3>\n<ul>\n<li>To view generated source of js\/ajax in IE, copy this address bar: javascript:'&lt;xmp>&#8217;+window.document.body.outerHTML+'&lt;\/xmp>&#8217;<\/li>\n<li>All html as above:<br \/>\njavascript:'&lt;xmp>&#8217;+window.document.body.parentNode.outerHTML+'&lt;\/xmp>&#8217;<\/li>\n<\/ul>\n<h3><a name=\"css_hacks\"><\/a>CSS Browser-specific Hacks<\/h3>\n<ul>\n<li>IE6 Only:\n<pre>* html #elementid{}<\/pre>\n<\/li>\n<li>NOT IE6:\n<pre>html>body #elementid{}<\/pre>\n<\/li>\n<li>IE7 and below:\n<pre>*:first-child+html {}<br>* html {}<\/pre>\n<\/li>\n<li>IE7 Only:\n<pre>*:first-child+html {}<\/pre>\n<\/li>\n<li>Not IE (invalid css):\n<pre>html>\/**\/body {}<\/pre>\n<\/li>\n<\/ul>\n<h3>Fixing browser bugs and cross-browser compatibility:<\/h3>\n<dl>\n<dt>Firefox 3 Legend Bug<\/dt>\n<dd>\n          This will make the legend act as though it were a block:<\/p>\n<p>          <strong>HTML<\/strong><br \/>\n          <code><\/p>\n<pre>&lt;fieldset&gt;\r\n    &lt;legend&gt;&lt;span&gt;Legend text&lt;\/span&gt;&lt;\/legend&gt;\r\n&lt;\/fieldset&gt;<\/pre>\n<p><\/code><\/p>\n<p><strong>CSS<\/strong><br \/>\n<code><\/p>\n<pre>legend {\r\n    margin: 0 0 15px;\r\n    float: left;\r\n    white-space: normal;\r\n}\r\n\r\n* html{margin-left:-7px;}\r\n*:first-child+html html{margin-left:-7px;}\r\n\r\nlegend span {\r\n    width: 400px;\r\n    display: block;\r\n}<\/pre>\n<p><\/code><br \/>\n        Then change dimensions to match project it&#8217;s being implemented into<br \/>\n        From <a href=http:\/\/beckism.com\/2008\/12\/display_block_legend\/>http:\/\/beckism.com\/2008\/12\/display_block_legend\/<\/a><\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>Development Tricks To view generated source of js\/ajax in IE, copy this address bar: javascript:'&lt;xmp>&#8217;+window.document.body.outerHTML+'&lt;\/xmp>&#8217; All html as above: javascript:'&lt;xmp>&#8217;+window.document.body.parentNode.outerHTML+'&lt;\/xmp>&#8217; CSS Browser-specific Hacks IE6 Only: * html #elementid{} NOT IE6: html>body #elementid{} IE7 and below: *:first-child+html {}* html {} IE7 &hellip; <a href=\"https:\/\/crysodenkirk.com\/blog\/reference\/tricks\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-493","page","type-page","status-publish","hentry","updates"],"_links":{"self":[{"href":"https:\/\/crysodenkirk.com\/blog\/wp-json\/wp\/v2\/pages\/493"}],"collection":[{"href":"https:\/\/crysodenkirk.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/crysodenkirk.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/crysodenkirk.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crysodenkirk.com\/blog\/wp-json\/wp\/v2\/comments?post=493"}],"version-history":[{"count":7,"href":"https:\/\/crysodenkirk.com\/blog\/wp-json\/wp\/v2\/pages\/493\/revisions"}],"predecessor-version":[{"id":567,"href":"https:\/\/crysodenkirk.com\/blog\/wp-json\/wp\/v2\/pages\/493\/revisions\/567"}],"up":[{"embeddable":true,"href":"https:\/\/crysodenkirk.com\/blog\/wp-json\/wp\/v2\/pages\/2"}],"wp:attachment":[{"href":"https:\/\/crysodenkirk.com\/blog\/wp-json\/wp\/v2\/media?parent=493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}