w3c

Nesting h3 inside anchor - how is this valid?

早过忘川 提交于 2019-11-29 10:52:21
<li class="vcard"> <a class="url" href="/about/us/"> <img class="photo" alt="some" src="/img/nicething.png"> <h3>hello</h3> </a> <p class="role meta">Something here</p> </li> I've seen this code, I've validated and it returns VALID on w3c HTML5 validation. I tough that we couldn't have h3 inside an anchor . It seems that this became valid if we display:block; the anchor ? If you look at the HTML5 spec , there is a section on the <a> tag: The a element may be wrapped around entire paragraphs, lists, tables, and so forth, even entire sections, so long as there is no interactive content within (e

W3C geolocation API not working on Safari 5

痞子三分冷 提交于 2019-11-29 10:36:05
W3C geolocation API doesn't seem to work in safari 5. I tried this page and it sort of tells me that Geolocation is unsuccessful. The code: http://code.google.com/apis/maps/documentation/javascript/examples/map-geolocation.html can somebody explain me why this is so? gerbz Looks like geolocation in safari only works when you're connected to wifi (not wired): Geolocation in Safari 5 I'm using Safari 5.0.5 on Mac Snow Leopard and clicking after on your link I was getting Error: The Geolocation service failed Try enabling the location services in Safari. Go to Preferences->Security and check

CSS pointer-events and appearance properties not recognized by CSS Validator

橙三吉。 提交于 2019-11-29 09:45:39
I'm new in CSS and just built an app. The problem is, when validating CSS I get the following errors and warnings: Can somebody please explain what these errors and warnings mean and how to fix it so that the CSS could be validated? My app is functioning normally despite those errors. This is my CSS code: /*----------------------------CSS reset------------------------------*/ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b,

How can I fully override Chromium disabled input field colours?

喜你入骨 提交于 2019-11-29 06:52:31
Example: http://jsfiddle.net/wCFBw/25/ input { color: black; } <input type="text" value="This is black" /> <input type="text" disabled="disabled" value="Why this is not black?" /> I don't know why that happens, but I suspect WebKit is trying to be smart with respect to letting the user know the <input> is disabled. You can workaround this by also using the -webkit-text-fill-color property : input.black { color: black; -webkit-text-fill-color: black } Please, make sure you're setting the colour to something that makes it apparent that the <input> is disabled. Here's your demo, modified with the

Should SVG contents be visible outside an embedded <svg> by default? [closed]

醉酒当歌 提交于 2019-11-29 06:43:19
In the past I answered a question about "who was wrong" in regards to SVG images not being "cropped" ( overflow: hidden ) in IE9, where all other supporting browsers did so. The answer is here . Today, while reviewing HTML5 Boilerplate again, I noticed that they claim they "[correct] overflow not being hidden in IE9" with this bit of code: svg:not(:root) { overflow: hidden; } I'm looking for someone to confirm or deny my original research by pointing to some other note in either the HTML5 or SVG specs. I cannot find anything, but I want to be sure I am not missing something. The best I can

Why does setting XMLHttpRequest responseType before calling open throw?

假装没事ソ 提交于 2019-11-29 06:16:34
问题 Running new XMLHttpRequest().responseType = "json" in the console throws an "InvalidStateError" exception in Firefox 26 and IE11 but not in Chrome 31. Why? The Spec states that setting responseType throws an "InvalidStateError" exception if the state is LOADING or DONE. but in this case the state is UNSENT. What's going on? 回答1: It's a working draft , so it's normal if there are small differences or bugs in the implementations. I think Firefox still follows the behavior described in the draft

Is there a browser-compatibility deprecation table for CSS3 vendor prefixes? [closed]

两盒软妹~` 提交于 2019-11-29 03:57:59
Would anyone here post a site that presents a neat summary of which vendor specific CSS3 extensions - e.g. -moz-border-radius - are still required or can be deprecated? From what I have seen by and large all recent versions of Chrome, Safari and Opera (forget IE, I can live without it for my current app) are by and large happy to live with the W3C attributes with no vendor prefixes. They also have it in book form, The Book of CSS3 by Peter Gasston, that has tables listing all the CSS3 browser support. However I bet thats the last thing you wanted to look for... so this maybe? I suggest using

Is it good to put a   inside an empty <td>?

谁都会走 提交于 2019-11-29 02:57:46
If this is the structure: <table cellspacing="0" cellpadding="0"> <tr> <td>I don't need anything here, should I always put a   here?</td> <td>item </td> </tr> <tr> <td>model</td> <td>one</td> </tr> <tr> <td>model</td> <td>two</td> </tr> <tr> <td>model</td> <td>three</td> </tr> </table> How will a screen reader read a blank td ? Is it semantically correct? Semantically correct IMHO would be to keep an empty cell really empty. However, I, too, fill empty cells with   s for pragmatic reasons. As for screen readers, I'll have to make an educated guess: Empty nodes will likely not be read, because

Is it true that newsletters in HTML should have a “table-based” layouts?

主宰稳场 提交于 2019-11-29 02:56:42
问题 I read somewhere that when creating a HTML email, you should use the table-based layout. You should not care about creating tableless css based layout. Is that true? I have to create a newsletter layout for my company, but I dont feel confortable writing 3 nested tables. 回答1: If you want your HTML-email to look good in most email clients, you should write your HTML as it still was 1999 :) 回答2: I'd highly recommend paying a visit to the Email Standards Project website. It lists almost every

Why baseline of `inline-block` element with `overflow:hidden` is set to its bottom margin?

夙愿已清 提交于 2019-11-29 01:25:33
After reading two great answers explaining the behaviour of inline-block elements ( Why is this inline-block element pushed downward? and why the span's line-height is useless ) I still have two unexplained questions. 1. What the reason to change baseline of inline-block element from baseline of its line box to bottom margin edge? http://www.w3.org/TR/CSS2/visudet.html#leading The baseline of an 'inline-block' is the baseline of its last line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow' property has a computed value other than 'visible', in which case