xhtml

Are image maps <map> deprecated?

倾然丶 夕夏残阳落幕 提交于 2019-12-18 07:29:55
问题 Are image maps deprecated in (x)HTML? 回答1: It is in the HTML 5 draft spec. It also appears in the XHTML strict DTD: <!ELEMENT MAP - - ((%block;) | AREA)+ -- client-side image map --> In short - it is part of both specs and is not deprecated. Some people do not like image maps because they perceive them as not very accessible or discoverable, and as such there are other markup/css/javascript techniques that work better. The map element doesn't appear in the obsolete section of the HTML 5 spec

How to pass backing bean value to JavaScript?

做~自己de王妃 提交于 2019-12-18 07:14:41
问题 I would like to read the backing bean value in JSF and then pass over to JavaScript, may I know how this can be done? Backing bean sample code: @ManagedBean(name="enquiry") @SessionScoped public class Enquiry { public boolean noQuery; /** getter and setter **/ } In XHTML sample code, I would like pass the backing bean value and then pass into showNoQueryPrompt() like this: <h:commandLink onClick="showNoQueryPrompt(#{enquiry.noQuery})"> </h:commandLink> And then in JavaScript code, I can read

How to show a two column DropDown?

a 夏天 提交于 2019-12-18 07:14:33
问题 I want to show a DropDown that should display two values in two columns. I want in HTML or CSS. 回答1: You won't be able to do this with HTML and CSS only. You will have to use script also. Here is a jQuery based drop down mcDropdown jQuery Plug-in v1.2.10 You can also check this one 38 jQuery And CSS Drop Down Multi Level Menu Solutions 回答2: Mega-dropdown? Check this example; Tutorial here. 来源: https://stackoverflow.com/questions/2027711/how-to-show-a-two-column-dropdown

Input fields rendered very differently in different browsers

故事扮演 提交于 2019-12-18 07:13:07
问题 Okay, so I am in the process of designing a website which has a login form at the top-right corner of a webpage. I set the size attribute of its input fields and I am getting some interesting results. Below is a group of screenshots that I threw together. I even stacked them for you all. I am even throwing in a jsFiddle for you all. So four things: I aligned them based on the bottom right hand corner of the password input field in the stacked image. Don't ask why. I design with borders on

Using conditional comments in HTML

谁都会走 提交于 2019-12-18 07:05:35
问题 I am relatively new to web development and learning all the time. I have recently come across 'Conditional Comments' when viewing source code for different websites. I think i now understand what they do but am unsure as to when to use them. I have seen them mainly used for implementing different stylesheets when it comes to IE and would like to know if this is good practice? In which case if the answer is 'Yes'. Then when developing a site is it 'common place' to use two separate stylesheets

Why put an XHTML doctype declaration on HTML files? What does that do?

自作多情 提交于 2019-12-18 05:54:17
问题 I wonder about the number of web pages I encounter that are HTML files, but that wear an XHTML DOCTYPE declaration. Why are people doing this? What do they hope to achieve? Why not reserve the XHTML doctype declaration for actual XHTML files? Or am I missing something? Edit : there is some confusion about what "actual XHTML files" are; to demonstrate that the difference is not caused by the DOCTYPE declaration, compare this file to this one. The first is HTML, the second is XHTML, although

Unwanted spacing below images in XHTML 1.0 Strict

我与影子孤独终老i 提交于 2019-12-18 05:08:26
问题 My goal is to use the XHTML 1.0 Strict DOCTYPE for this page I'm working on, but I'm running into some weird design issues.. I have the below code: <div><img src="photos/someimage.jpg" alt="Title" /></div> When I load the page with DOCTYPE set to 1.0 Strict, a little gap of spacing is added below the image, within the div. I've removed all whitespace/line breaks in the code, which seems to be the usual culprit for this sort of issue.. If I change the DOCTYPE to 1.0 Transitional the spacing is

Can you style XHTML elements in another namespace using id and class name css selectors?

99封情书 提交于 2019-12-18 05:04:32
问题 I'm developing an application that uses ubiquity-xforms. Previously I had been serving the pages up as text/html with the XHTML 1.0 doctype. If I switched the mime-type to application/xhtml+xml, I would see a pretty big performance improvement, because the javascript could use the get____NS() functions, instead of what it's doing now (slowly iterating through the entire DOM tree every time it needs to select an element). But when I tried this, a bunch of my CSS stopped working. I noticed that

How to make textarea fill the width of its parent width?

允我心安 提交于 2019-12-18 04:02:17
问题 Given that we don't know the div's width beforehand? My idea: Calculate the div 's width with JS, find a way to convert it to cols and the apply the css to the textarea onthe fly. But perhaps there 's no need to reinvent the wheel? Thank you. 回答1: <textarea style="width:100%"> * will work in most cases. If it doesn't, please provide more information! * Note: for some reason, it will need the cols and rows attributes to validate. But setting a width or a height will override them, so put any

How to make textarea fill the width of its parent width?

心已入冬 提交于 2019-12-18 04:01:49
问题 Given that we don't know the div's width beforehand? My idea: Calculate the div 's width with JS, find a way to convert it to cols and the apply the css to the textarea onthe fly. But perhaps there 's no need to reinvent the wheel? Thank you. 回答1: <textarea style="width:100%"> * will work in most cases. If it doesn't, please provide more information! * Note: for some reason, it will need the cols and rows attributes to validate. But setting a width or a height will override them, so put any