xhtml

What XPath selects odd TRs from a table, starting with the third?

别等时光非礼了梦想. 提交于 2019-12-10 13:23:42
问题 I have a table: <table> <tr><td>1</td></tr> <tr><td>2</td></tr> <tr><td>3</td></tr> <tr><td>4</td></tr> <tr><td>5</td></tr> <tr><td>6</td></tr> <tr><td>7</td></tr> <tr><td>8</td></tr> <tr><td>9</td></tr> </table> I need an XPath to select odd rows, starting on the third row (3, 5, 7, 9, etc.). 回答1: I think 'position()' function of XPATH will do the job. Returns the index position of the node that is currently being processed. you need to do position() mod 2. Here is XSLT solution <xsl:for

How do I validate noscript+meta refresh tag in xHTML?

天大地大妈咪最大 提交于 2019-12-10 13:12:50
问题 For visitors that don't support JavaScript, I'm redirecting them to a certain page - "js.html". For this, I have the following in all my files: <noscript> <meta http-equiv="Refresh" content="0;URL=js.html" /> </noscript> Of course, this doesn't validate in XHTML as noscript must be placed in <body> . But when I place that code in the body of my document, I get another error, because meta tags can only be used in the <head> section, so I'm kind of stuck in an infinite loop here. Is there a way

How to use <col> tag correctly and is it supported in all browser?

蓝咒 提交于 2019-12-10 13:07:29
问题 What is the use of <col> tag and is it supported in all browser? I was trying <col style="background:red"> but it's not working. I'm on Firefox 3. <table width="100%" border="1"> <col style="background:red"> <caption> Table Caption </caption> 回答1: It works, but it doesn't affect the caption. Working example: <html> <head> <title></title> </head> <body> <table> <caption>test</caption> <col style="background:red" /> <col style="background:blue" /> <tr> <td>red</td> <td>blue</td> </tr> <tr> <td

confused about xhtml5: no more `<?xml?>` and now mandatory `meta`?

你说的曾经没有我的故事 提交于 2019-12-10 12:44:34
问题 I've been a longtime user of XHTML 1.0 Strict , and I'm now trying to switch to XHTML5 in my new projects. I'm confused that <?xml version='1.0' encoding='utf-8'?> is no longer considered valid, for HTML5, by http://validator.w3.org/. Why is that? Isn't that what all xml documents are supposed to start with? And when I remove the standard <?xml …, my document still doesn't validate: now it's missing the encoding. I don't like those meta tags, but are they now effectively mandatory, to specify

How Do I Remove An XML Declaration Using BeautifulSoup4

杀马特。学长 韩版系。学妹 提交于 2019-12-10 11:30:21
问题 I have an XHTML file that is structured like this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> ... </head> <body> ... </body> <html> I'm using BeautifulSoup and I want to remove the XML declaration from the document, so what I have looks like this: <!DOCTYPE html> <html lang="en"> <head> ... </head> <body> ... </body> <html> I can't find a way to get at the XML declaration to remove it. It doesn't appear to be a Doctype, Declaration, Tag, or NavigableString

When CSS sprites would be good to use and when not?

荒凉一梦 提交于 2019-12-10 11:17:46
问题 In what scenarios CSS sprites would be good to use and when not? Is it time saver or only server request saver? I think bandwidth use will be same because image is same like ong big image but it's in a parts? When and where use of css sprite is a time saving(in work) option ? For navigation it's good for rollover pre-loading effect but not good for images disabled people? What are other good usage which can save our time once and in future (if changes comes in design) both? Edit: Sprites is

Align divs horizontally, no vertical stacking, in IE7

巧了我就是萌 提交于 2019-12-10 10:49:51
问题 I have a fixed container and inside of that is an additional container which houses a number of DIVs based on user choices. I need these additional DIVs to line up horizontally and provide horizontal scrolling (but not vertical scrolling). Such as this: [x] [x] [x] Essentially, my setup looks like this: <div id="container"> <div id="second"> <div class="final"><img src="..." /></div> //Repeat as needed from user </div> </div> The CSS breaks down as such: #container { position: fixed; top:

IE+jQuery+Ajax+XHTML: HTML getting clipped after .html() or .innerHTML

笑着哭i 提交于 2019-12-10 06:06:14
问题 This is a really hard problem to put into a brief sentence, so I apologize if I kill it. I launched a site recently which had been extensively tested on my local web server on all my desired browser platforms, including IE8 (IE8 standards mode, XHTML Strict). I encountered no problems at all until the site went live on a dedicated web server. The site uses jQuery.get() on the change event for the input elements of a form, where the response is grafted into a common <div id="results"></div> .

CSS简单理解与应用

本小妞迷上赌 提交于 2019-12-10 03:54:20
一、CSS基本概念: CSS——级联样式表(Cascading Style Sheet)简称“CSS”,通常又称为“风格样式表(Style Sheet)”,它是用来进行网页风格设计的。 CSS能够对 HMTL 中的对象的位置排版进行像素级的精确控制,支持几乎所有的字体字号样式,拥有对网页对象盒模型的能力;能够统一地控制HMTL中各标志的显示属性; 能够使人更能有效地控制网页外观以及创建特殊效果的能力,是真正做到网页表现与内容分离的一种样式设计语言。 二、CSS结构与语法 说道CSS将网页表现与内容分离,不得不谈到CSS的语法和结构。 CSS属性和选择器 css的语法结构仅仅有三部分组成:选择器(Selector)、属性(property)、和值(value)。 使用方法: selector {Property:value;} 选择器(Selector) 指这组样式编码所要针对的对象。可以是一个XHTML标签,如body,h1;也可以是定义了特定的ID或CLASS的标签,如#main选择器表示选择<div id="main">,即一个被指定了main为id的对象。浏览器将对css选择器进行严格的解析,每一组样式均会被浏览器应用到对应的对象上。 属性(Property) 是CSS样式控制的核心,对于每一个XHTML中的标签,CSS都提供了丰富的样式属性,如颜色、大小、定位、浮动方式等。

Floated div 100% height of dynamic parent without absolute position?

流过昼夜 提交于 2019-12-10 03:50:47
问题 I've done alot of reading on here, and cannot find a solution to my answer. I have a container div, with multiple floated left divs, as per the html below. <div class="catbg0" id="b1"> <div class="catb1">#</div> <div class="catb2">Board Name</div> <div class="catb3">Topics</div> <div class="catb4">Posts</div> <div class="catb5">Last Post</div> <div class="clearboth"></div> </div> My problem is that .catbg0 does not have a specific height, the content of .catb2 pushes it down to its height,