xhtml

How do I create tab indenting in html

泄露秘密 提交于 2019-12-20 20:26:28
问题 I have a situation as follows <body> Test<br /> test<br /> test1<br /> </body> I need to add a tab after the 2nd test and 3rd test so that it looks similar to this. Test test test1 Is there a special HTML entity or special character for TAB. eg. Non-breaking space == & nbsp ; thanks 回答1: Ye gods, tables? Looks like an obvious use-case for lists, with variable margin and list-style-type: none; seasoned to taste. 回答2: The simplest way I can think of would be to place the text in nested divs.

Store a clicked link state using jQuery?

丶灬走出姿态 提交于 2019-12-20 17:30:39
问题 $('#nav a').click(function () { $('#nav a').removeClass('current'); $(this).addClass('current'); return false; }); My HTML is: <ul id="nav"> <li><a class="current hoc" href="#spread1-anchor">Home</a> /</li> <li><a class="bgc" href="#spread2-anchor">Background</a> /</li> <li><a class="apc" href="#spread3-anchor">Approach</a> /</li> <li><a class="clc" href="#spread4-anchor">Client</a> /</li> <li><a class="sec" href="#spread5-anchor">Services</a> /</li> <li><a class="coc" href="#spread5-anchor"

Do you know a HTML-Snippet Validator?

元气小坏坏 提交于 2019-12-20 15:57:32
问题 I'm searching for a tool that would allow me to check whether a certain snippet of HTML would be valid in it's proper context. I'd input something like <dd> my definition <div> div inside <dd> is allowed </div> </dd> instead of the whole document. A ordinary validator will complain about the missing dl-tag, but most of the times I just want to know whether a certain element is valid inside another one or not. I'll try to explain it more detailed. Consider the following snippet: <form> <label

How to force XPath to use UTF8?

依然范特西╮ 提交于 2019-12-20 15:24:09
问题 I have an XHTML document being passed to a PHP app via Greasemonkey AJAX. The PHP app uses UTF8. If I output the POST content straight back to a textarea in the AJAX receiving div, everything is still properly encoded in UTF8. When I try to parse using XPath $dom = new DOMDocument(); $dom->loadHTML($raw2); $xpath = new DOMXPath($dom); $query = '//td/text()'; $nodes = $xpath->query($query); foreach($nodes as $node) { var_dump($node->wholeText); } dumped strings are not utf8. How do I force DOM

when we use name=“Keys” in input html tag?

放肆的年华 提交于 2019-12-20 07:18:02
问题 when we use name="Keys" in input html tag ? i know name attribute but when we use keys ? 回答1: The name attribute specifies a name for an input element. The name attribute is used to identify form data after it has been submitted to the server, or to reference form data using JavaScript on the client side. Only form elements with a name attribute will have their values passed when submitting a form. By allotting a name to an element, that name becomes a scripting variable for scripting

How to reuse elements from another Schema / Namespace (i.e. XHTML) with XML Schema?

可紊 提交于 2019-12-20 05:10:30
问题 I'm trying to define a Schema which allows the use of specific (X)HTML elements in certain places. The problem that I'm facing is that the Schema fails compiling. Here's the Schema: <?xml version="1.0"?> <xs:schema xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" > <xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="http://www.w3.org/MarkUp/Schema/xhtml11.xsd" /> <xs:element name="foo"> <xs:complexType> <xs:sequence> <xs:element ref="html

trouble getting declared namespaces to work

♀尐吖头ヾ 提交于 2019-12-20 04:48:18
问题 I am trying to get namespaces written in an external css (two separate files actually). When I run the file on my browser it will not use the declared namespaces. I think that the file is calling the css file but its not applying the namespaced style HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?xml version="1.0" encoding="utf-8"?> <html xmlns:act="http://www.superstarmovies.com/actors" xmlns:mov="http://www

Position an element from the end of the document at the top of the page

蓝咒 提交于 2019-12-20 04:46:52
问题 I have a div just before the </body> tag of the document (before the document ends). And I want to display this div on the top of the page using CSS or JavaScript. I know about position:absolute; . The problem is that if I use it, the div will show on top of other content that's located in the top, not before this content. So is there any other way to do this? 回答1: You can use position:absolute for the div element and then assign a margin-top to body element which equals the possible height

Coloring lines inside textarea

£可爱£侵袭症+ 提交于 2019-12-20 03:29:52
问题 Is there any way to make textarea display lines in colors? What I am trying to achieve is every second line colored, i.e. white,grey,white,grey,white,grey... for better readability. Users are supposed to write in lots of stuff, as in "enter names, each one from new line". I do use jQuery anyway so if they made some simpler solution for this it would be perfect. 回答1: What you are looking for is called Zebra striping, maybe that will help with some google searching. However, I don't think there

absolute positioning not working with XHTML?

眉间皱痕 提交于 2019-12-20 02:58:11
问题 I'm trying to position a DIV with absolute positioning, however it appears that with XHTML DOCTYPE it doesn't work. In the following example, the red square appears at top-left, instead of being somewhere in the middle of the screen : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>test</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"