Tab space instead of multiple non-breaking spaces (“nbsp”)?
It’s much cleaner to use CSS. Try padding-left:5em or margin-left:5em as appropriate instead.
It’s much cleaner to use CSS. Try padding-left:5em or margin-left:5em as appropriate instead.
Do you need a type attribute at all? If you’re using HTML5, no. Otherwise, yes. HTML 4.01 and XHTML 1.0 specifies the type attribute as required while HTML5 has it as optional, defaulting to text/javascript. HTML5 is now widely implemented, so if you use the HTML5 doctype, <script>…</script> is valid and a good choice. As to what should go in … Read more
IDs must be unique in your document, meaning that you shouldn’t do this: Instead, drop the ID, and then select them by name, or by a containing element: And now the jQuery:
Put this in your CSS: Get more information here: http://www.w3.org/wiki/CSS/Properties/white-space white-space The white-space property declares how white space inside the element is handled. Values normal This value directs user agents to collapse sequences of white space, and break lines as necessary to fill line boxes. pre This value prevents user agents from collapsing sequences of white space. Lines are only … Read more
I make a link. A link is a link. A link navigates to another page. That is what links are for and everybody understands that. So Method 3 is the only correct method in my book. I wouldn’t want my link to look like a button at all, and when I do, I still think … Read more
is the character entity reference (meant to be easily parseable by humans).   is the numeric entity reference (meant to be easily parseable by machines). They are the same except for the fact that the latter does not need another lookup table to find its actual value. The lookup table is called a DTD, by the way. … Read more
Looks like when the HTTP request header referrer is anything other than http://4chan.org, I get this issue. Ive simply added the below to the HTML page and its fixed the problem: Once your Angular app is loaded, you can also use Firefox Developer Console (Network Tab) modify image request (ie 403) and remove referrer header to … Read more
. I need a floating rectangle (100% width, 100px height) to appear exactly 20px above the bottom of a page. How can I do that? The code below shows the rectangle at the bottom of the browser window not the page – so if the page is taller than what can fit in the screen, … Read more
Most of the roles you see were defined as part of ARIA 1.0, and then later incorporated into HTML via supporting specs like HTML-AAM. Some of the new HTML5 elements (dialog, main, etc.) are even based on the original ARIA roles. http://www.w3.org/TR/wai-aria/ There are a few primary reasons to use roles in addition to your … Read more
To get the contents of the attribute data-id (like in <a data-id=”123″>link</a>) you have to use or .data() (if you use newer jQuery >= 1.4.3) and the part after data- must be lowercase, e.g. data-idNum will not work, but data-idnum will.