web-standards

Is a DIV inside a TD a bad idea?

白昼怎懂夜的黑 提交于 2019-11-26 11:45:56
It seems like I heard/read somewhere that a <div> inside of a <td> was a no-no. Not that it won't work, just something about them not being really compatible based on their display type. Can't find any evidence to back up my hunch, so I may be totally wrong. Using a div instide a td is not worse than any other way of using tables for layout. (Some people never use tables for layout though, and I happen to be one of them.) If you use a div in a td you will however get in a situation where it might be hard to predict how the elements will be sized. The default for a div is to determine its width

input type=“submit” Vs button tag are they interchangeable?

怎甘沉沦 提交于 2019-11-26 11:38:29
input type="submit" and button tag are they interchangeable? or if there is any difference then When to use input type="submit" and when button ? And if there is no difference then why we have 2 tags for same purpose? MatTheCat http://www.w3.org/TR/html4/interact/forms.html#h-17.5 Buttons created with the BUTTON element function just like buttons created with the INPUT element, but they offer richer rendering possibilities: the BUTTON element may have content. For example, a BUTTON element that contains an image functions like and may resemble an INPUT element whose type is set to "image", but

Do SVG docs support custom data- attributes?

Deadly 提交于 2019-11-26 10:38:38
问题 In HTML5, elements can have arbitrary metadata stored in XML attributes whose names start with data- such as <p data-myid=\"123456\"> . Is this part of the SVG spec too? In practice this technique works fine for SVG docs in many places. But I\'d like to know if it\'s part of the official SVG spec or not, because the format is young enough that there\'s still a lot of incompatibility between browsers, especially in mobile. So before committing to code I\'d like know if I can expect future

Can I use non existing CSS classes?

白昼怎懂夜的黑 提交于 2019-11-26 08:59:21
问题 I have a table where I show/hide a full column by jQuery via a CSS class that doesn\'t exist: <table> <thead> <tr> <th></th> <th class=\"target\"></th> <th></th> </tr> </thead> <tbody> <tr> <td></td> <td class=\"target\"></td> <td></td> </tr> <tr> <td></td> <td class=\"target\"></td> <td></td> </tr> </tbody> </table> With this DOM I can do this in one line via jQuery: $(\'.target\').css(\'display\',\'none\'); This works perfectly, but is it valid to use CSS classes that aren\'t defined?

How does one target IE7 and IE8 with valid CSS?

左心房为你撑大大i 提交于 2019-11-26 08:54:15
问题 I want to target IE7 and IE8 with W3C-compliant CSS. Sometimes fixing CSS for one version does not fix for the other. How can I achieve this? 回答1: Explicitly Target IE versions without hacks using HTML and CSS Use this approach if you don't want hacks in your CSS. Add a browser-unique class to the <html> element so you can select based on browser later. Example <!doctype html> <!--[if IE]><![endif]--> <!--[if lt IE 7 ]> <html lang="en" class="ie6"> <![endif]--> <!--[if IE 7 ]> <html lang="en"

What is the proper way to URL encode Unicode characters?

帅比萌擦擦* 提交于 2019-11-26 07:42:02
I know of the non-standard %uxxxx scheme but that doesn't seem like a wise choice since the scheme has been rejected by the W3C. Some interesting examples: The heart character. If I type this into my browser: http://www.google.com/search?q=♥ Then copy and paste it, I see this URL http://www.google.com/search?q=%E2%99%A5 which makes it seem like Firefox (or Safari) is doing this. urllib.quote_plus(x.encode("latin-1")) '%E2%99%A5' which makes sense, except for things that can't be encoded in Latin-1, like the triple dot character. … If I type the URL http://www.google.com/search?q=… into my

By default, JSF generates unusable IDs, which are incompatible with the CSS part of web standards

本秂侑毒 提交于 2019-11-26 07:32:03
问题 Can someone who is an active JSF (or Primefaces) user explain why by default this happens why nobody is doing anything about it: <p:commandLink id=\"baz\" update=\":foo:boop\" value=\"Example\" /> Which generates markup that cannot be used in JavaScript or CSS without hacks and should generally be considered invalid: <a href=\"javascript:void(0);\" id=\":foo:bar:baz\">Example</a> The id=\":bar:baz:foo\" attribute here contains colons, which aren\'t a valid character for this attribute, at

input type=“submit” Vs button tag are they interchangeable?

余生长醉 提交于 2019-11-26 05:50:43
问题 input type=\"submit\" and button tag are they interchangeable? or if there is any difference then When to use input type=\"submit\" and when button ? And if there is no difference then why we have 2 tags for same purpose? 回答1: http://www.w3.org/TR/html4/interact/forms.html#h-17.5 Buttons created with the BUTTON element function just like buttons created with the INPUT element, but they offer richer rendering possibilities: the BUTTON element may have content. For example, a BUTTON element

Is there a query language for JSON?

你。 提交于 2019-11-26 05:41:16
Is there a (roughly) SQL or XQuery-like language for querying JSON? I'm thinking of very small datasets that map nicely to JSON where it would be nice to easily answer queries such as "what are all the values of X where Y > 3" or to do the usual SUM / COUNT type operations. As completely made-up example, something like this: [{"x": 2, "y": 0}}, {"x": 3, "y": 1}, {"x": 4, "y": 1}] SUM(X) WHERE Y > 0 (would equate to 7) LIST(X) WHERE Y > 0 (would equate to [3,4]) I'm thinking this would work both client-side and server-side with results being converted to the appropriate language-specific data

Create a HTML table where each TR is a FORM

两盒软妹~` 提交于 2019-11-26 04:40:08
问题 I\'m trying to create a table where each row is a form. I want that each input is in a different table division, but I still need that for example, all first inputs belong to the same table head and so on. What I\'m trying to do is an editable grid , more or less this: <table> <tr> <form method=\"GET\" action=\"whatever\"> <td><input type=\"text\"/></td> <td><input type=\"text\"/></td> </form> </tr> <tr> <form method=\"GET\" action=\"whatever\"> <td><input type=\"text\"/></td> <td><input type