Category Archives: Programming

Specifically target each browser in CSS

The following CSS ‘hack’ can be used to target all browsers IE 7, IE 6 and IE < 6 … All browsers: margin-top: 44px; IE7 and below: *margin-top: 26px; IE6 and below: _margin-top: 44px; IE6 only: _mar\gin-top: 44px; All firefox: #selector[id=selector] { color: red; } All firefox: @-moz-document url-prefix() { .selector { color: red; } [...]

Use a button as an A Href link

To create an A Href link that can be used as a button, we can use one of the two following methods: function SubmitFrom(){ document.myform.target.value="somescript.php3" document.myfrom.submit() } function ResetFrom(){ document.myfrom.reset() }   <a href="javascript:SubmitForm()"><img src=….></a> or <FORM name=remove ACTION=’removeItem.php3′ METHOD=’POST’ ENCTYPE=’application/x- www-form-urlencoded’> <a href="javascript:document.remove.submit()">remove from cart</a> </form>