w3c

There is no attribute “allowtransparency”

淺唱寂寞╮ 提交于 2019-12-17 23:00:04
问题 I am looking for some alternate way to do: <iframe transparency=true ... When I do the W3C validation, I am getting the error: Column 31: there is no attribute "allowtransparency" If use this CSS, .iframe-trans-fix{ opacity: 0; filter:alpha(opacity=0); } for the above snippet I am getting a blank iframe. 回答1: While it's true that the W3C's HTML spec does not define it, there is an allowTransparency attribute, and it is supported by all modern browsers (and Internet Explorer). As HTML5 has

What is the default value of a (input type=) submit button

梦想与她 提交于 2019-12-17 20:53:00
问题 I am building a multilingual website and I was wondering how is set the default value of a submit button? Is it something browser specific or does it rely on the system language or both? ie : I'm just asking if I've to set a specific value according to the language of the page or if it will be done automatically? I've been unable to find anything about that in the w3c specs. Thanks! 回答1: The HTML 4.01 specification is rather vague about this, but the HTML5 CR is more explicit. It says, in the

How do I shift the visible text in a narrow input element to see the cursor at the end?

十年热恋 提交于 2019-12-17 20:27:43
问题 The problem I am having is that given an input element with a maxlength that is much wider than the element's width (as set in its style), and, given a value that is wider than the element's width, how can I get the element to "scroll" to the end of the text. In IE it is easy, I create a textRange object, put its start and end position at the end of the text, call select on that range, and bam, the cursor is placed at the end of the text AND the text is shifted so that the end is shown. In

Exact NOT(Inverse) of CSS Media Query

本秂侑毒 提交于 2019-12-17 19:59:07
问题 What is the exact "NOT" of the following CSS media query ? @media only screen and (device-width:768px) Just to add, it would mean..All EXCEPT iPAD...OR.....NOT iPAD.. and BTW...I have already tried @media not only screen and (device-width:768px) which does not work.. 回答1: @media not screen and (device-width:768px) not and only are mutually exclusive in media queries; only is needed only to work around some downrev UAs who implement the HTML4 algorithm for media strings, so when the query

CSS3 box-sizing: margin-box; Why not?

帅比萌擦擦* 提交于 2019-12-17 17:32:22
问题 Why don't we have box-sizing: margin-box; ? Usually when we put box-sizing: border-box; in our style sheets we really mean the former. Example: Let's say I have a 2 column page layout. Both columns have a width of 50%, but they look kind of ugly because there's no gutter (gap in the middle); Below is the CSS: .col2 { width: 50%; float: left; } To apply a gutter you might think we could just set a right margin on the first of the 2 columns; something like this: .col2:first-child { margin-right

Why is the default max length for an input 524288?

℡╲_俬逩灬. 提交于 2019-12-17 16:27:56
问题 The default maximum length for a HTML input ( <input type="text"> ) is 524288 characters. That seems like a very peculiar number, why was it chosen? 回答1: According to the w3c the maximum value is unlimited: maxlength = number [CN] When the type attribute has the value "text" or "password", this attribute specifies the maximum number of characters the user may enter. This number may exceed the specified size, in which case the user agent should offer a scrolling mechanism. The default value

To What Self-Closing Elements Can ::before and ::after Pseudo-Elements be Applied

隐身守侯 提交于 2019-12-17 16:26:58
问题 I'm particularly interested in understanding when the ::before and ::after pseudo-elements can be applied to self-closing tags. This is the definition of these pseudo-elements, according to the W3 Generated Content CSS Specifications: 12.1 The :before and :after pseudo-elements : Authors specify the style and location of generated content with the :before and :after pseudo-elements. As their names indicate, the :before and :after pseudo-elements specify the location of content before and

Using cm/mm on the CSS of a web app that replicates paper interaction is a good practice?

无人久伴 提交于 2019-12-17 15:54:29
问题 I am building a web application that interact with documents for later printing. In some points is similar to Google Docs. I am considering using cm/mm on the CSS of my documents pages because it will help me on the document generation. Example: // A4 size .page { width: 210mm; height: 297mm; margin: 2cm 5cm; } <div class="page"> ... </div> What are the main issues of following this approach? 回答1: W3C has a great post on the subject of CSS units. In particular: cm: Not recommended for screen

event.clipboardData.setData in copy event

ぐ巨炮叔叔 提交于 2019-12-17 15:46:09
问题 I have looked at many posts but could not find a clear current answer to the following two questions as it seems standards and browser support has been constantly changing. Is it a legal operation according to the standard to change the clipboard with event.clipboardData.setData inside a 'copy' event handler? Do latest versions of Chrome/FF/Safari/IE/Chrome iOS/Android/iPhones support this correctly? 回答1: Clipboard APIs were indeed in active development as of 2016, but things have stabilized

Alternative for innerHTML?

江枫思渺然 提交于 2019-12-17 15:23:46
问题 I'm wondering if there's a way to change the text of anything in HTML without using innerHTML. Reason I'm asking is because it's kinda frowned upon by the W3C. I know it's nitpicking, but I just wanna know, is there a way? EDIT: people seem to misunderstand what I'm asking here: I want to find a way to effectivly change the text being displayed. If I have: <div id="one">One</a> innerHTML allows me to do this: var text = document.getElementsById("one"); text.innerHTML = "Two"; And the text on