what do
and do?

Action normally specifies the file/page that the form is submitted to (using the method described in the method paramater (post, get etc.)) An action of # indicates that the form stays on the same page, simply suffixing the url with a #. Similar use occurs in anchors. <a href=#”>Link</a> for example, will stay on the …

Read more

Edit webpage with javascript trick – how to “unedit”?

You would be able to leave edit mode by changing your command to the following javascript:document.body.contentEditable=’false’; document.designMode=’off’; void 0 I have updated my answer to include a simple working example of my answer, tested in chrome, safari and firefox.  Run code snippet

Center image using text-align center?

That will not work as the text-align property applies to block containers, not inline elements, and img is an inline element. See the W3C specification. Use this instead:

How to horizontally center an element

You can apply this CSS to the inner <div>: Of course, you don’t have to set the width to 50%. Any width less than the containing <div> will work. The margin: 0 auto is what does the actual centering. If you are targeting Internet Explorer 8 (and later), it might be better to have this instead: It …

Read more

HTML encoding issues – “” character showing up instead of ” “

Somewhere in that mess, the non-breaking spaces from the HTML template (the  s) are encoding as ISO-8859-1 so that they show up incorrectly as an “” character That’d be encoding to UTF-8 then, not ISO-8859-1. The non-breaking space character is byte 0xA0 in ISO-8859-1; when encoded to UTF-8 it’d be 0xC2,0xA0, which, if you (incorrectly) …

Read more