xhtml

How to make href will work on button in IE8

不羁的心 提交于 2019-12-05 09:03:12
I want href will work on type="button" in IE8. <a href="submit.php"><input type="button" value="Submit" class="button" /></a> Other browser working fine but on IE8 the code above not working. How to fix it? Update <form action="submit.php" method="post""> <input type="submit" value="Submit" class="button" /> </form> I know this way can be done. But I want to know other ways how to make it work on IE8 without to have the <form></form> onclick="window.location=this.parentNode.href;"/> this.parentNode can refer to a tag so... it should work or test getAttribute even why not use <form action=

Reduce Gap between HTML <UL> and <LI> elements

你离开我真会死。 提交于 2019-12-05 08:37:47
I have below HTML in my web page: Forum <ul> <li> Stack</li> <li> OverFlow</li> </ul> And as you could see below, I get the items listed perfectly, but there is a fixed gap between <UL> and <LI> elements. Is there a way, I can reduce this gap? i.e. gap between "Forum" and "Stack" text in attached screen? The gap does not exist between UL and LI elements, but between the Forum text and the UL element. Most browsers define a default margin around certain elements, like the UL . You get rid of it with CSS: ul { margin: 0; } or if you just want to reduce it, for example this one will set 0 margin

CSS parser + XHTML generator, advice needed

元气小坏坏 提交于 2019-12-05 08:27:17
Guys, I need to develop a tool which would meet following requirements: Input: XHTML document with CSS rules within head section. Output: XHTML document with CSS rules computed in tag attributes The best way to illustrate the behavior I want is as follows. Example input: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <style type="text/css" media="screen"> .a { color: red; } p { font-size: 12px; } </style> </head> <body> <p class="a">Lorem Ipsum</p> <div class="a"> <p>Oh hai</p> </div> </body> </html> Example output: <

Is there a method for keeping the id I set for an asp .net control when it outputs to HTML?

北城余情 提交于 2019-12-05 08:09:42
When I create a form, I try to make accessibility a top priority, but the output from asp .NET negates some of this. For example, when I set a label tag for an input tag, I create it a such: <label for="frmFirstName">First Name<span class="required">*</span></label> <asp:TextBox id="frmFirstName" CssClass="textbox" runat="server" /> But, when the HTML is output from the page, it is output as: <label for="frmFirstName">First Name<span class="required">*</span></label> <input name="ctl00$phMainContent$frmFirstName" type="text" id="ctl00_phMainContent_frmFirstName" class="textbox" /> This is a

Which HTML tags have no content

杀马特。学长 韩版系。学妹 提交于 2019-12-05 08:09:05
Some HTML tags like br and hr have no content and cannot have a closing tag. What is the complete set of these tags? Check the table at http://www.w3.org/TR/html4/index/elements.html . Look at the 'EMPTY' column here: http://www.w3.org/TR/html4/index/elements.html Every tag in the DTD that has EMPTY in the fourth field is empty. http://www.w3schools.com/tags/default.asp All the one that has a forward slash in their tag name. (correction) thx =O Kiran Bheemarti Html don't force the document to be well formatted, so end tags for certain tags like <br> and <hr> can be left out and still the page

Is W3C validation important? [duplicate]

爱⌒轻易说出口 提交于 2019-12-05 07:51:33
This question already has answers here : Closed 8 years ago . Possible Duplicate: How important is W3C XHTML/CSS validation when finalizing work? I read about validation from many sources and most will say always validate your web page. It is important that your page validate. I understand the concept. But my site does not "validate", yet it works across every major browsers, does not produce errors in those browsers and looks correct in all browsers. This is an example of an error I get Error Line 38, Column 28: document type does not allow element "h3" here var $jsuccessmessage = "<h3>We

How can I produce an nested list in XHTML strict without giving the nested lists first element a double bullet?

一曲冷凌霜 提交于 2019-12-05 07:20:02
I'm trying to create a list nested within a list using XHTML Strict 1.0. The problem is that with XHTML strict a ul element can not be nested directly within another ul element. Thus, the inner ul element has to be nested within a li element. However, when doing it this way, the first row of the inner list get a dubble bullet, as shown in the example below. So now B gets a double bullet since the outer and inner li elements both create a bullet. Do anyone know how to fix this in CSS so that B is intended as a nested list, but only gets one bullet? Thanx! A B C D E F L H XHTML for the above

How to make javascript focus() method work in onBlur event for input text box?

为君一笑 提交于 2019-12-05 05:58:32
for me javascript focus() method is working fine if i use it with a button and onClick event, but with onBlur from a text box, it is not working.Can anyone guide me on this? <html> <head> <script type="text/javascript"> function displayResult() { var inp1=document.getElementById("text1").value; var inp2=inp1.length; if(inp2==0) { alert("Field 1 cannot be left Empty"); //document.getElementById("text1").value=""; document.getElementById("text1").focus(); } } </script> </head> <body> <input type="text" name="text1" id="text1" onBlur="displayResult();"/> <input type="text" name="yext2" id="text2"

Keep contents of a div together for printing in IE8

。_饼干妹妹 提交于 2019-12-05 04:52:01
Given the following HTML document, I need to keep the "Table title" line on the same page as the <table> when being printed in IE8. Despite the page-break-inside:avoid; , there is still a page break between the title and the table. My understanding of this suggests a page break should be avoided and the whole div pushed on to page 2. The doctype is XHTML 1.0 Transitional, I have <meta http-equiv="X-UA-Compatible" content="IE=8" /> set to force IE8 into Standards Mode which supposedly supports this syntax , and I have verified the rendering is being done in standards mode by checking document

Creating Views in PHP - Best Practice [closed]

 ̄綄美尐妖づ 提交于 2019-12-05 04:20:41
I am working on a website with 2 other developers. I am only responsible to creating the views. The data is available in an object, and I have getters to read the data then create XHTML pages. What is the best practice to do this, without using any template engine? Thanks a lot. If you don't want to use a templating engine, you can make use of PHP's basic templating capabilities. Actually, you should just write the HTML, and whenever you need to output a variable's value, open a PHP part with <?php and close it with ?> . I will assume for the examples that $data is your data object. For