xhtml

Is it “bad practice” to be sensitive to linebreaks in XML documents?

北慕城南 提交于 2019-12-05 03:37:01
I'm generating some XML documents and when it comes to the address part I have fragments that look like this: <Address>15 Sample St Example Bay Some Country</Address> The XSLT that I have for converting this to XHTML has some funky recursive template to convert newline characters within strings to <br/> tags. This is all working fine; but is it considered "bad practice" to rely on linebreaks within XML documents? If so, is it recommended that I do this instead? <Address><Line>15 Sample St</Line> <Line>Example Bay</Line> <Line>Some Country</Line></Address> Seems like it'd be really awkward to

css image mask overlay

情到浓时终转凉″ 提交于 2019-12-05 02:53:06
问题 I'm trying to get a transparent png frame image to hover over an img tag to create the look of a frame over it. I've tried multiple different approaches and none seem to work. The latest method I used was http://www.cssbakery.com/2009/06/background-image.html this doesn't seem to work either. HTML <div class="filler"> <div class="filler-picture"> <img src="../../media/img/test.jpg" alt="test" /> <div class="filler-mask"> </div> </div> </div> CSS .filler { padding-left:20px; height:361px;

double submission when refresh php

自闭症网瘾萝莉.ら 提交于 2019-12-05 02:51:53
问题 I'm trying to correct the issue of double submit in my script. When I press submit it only updates mysql once(which is what I want). However, when I hit refresh it updates mysql again. It seems to ignore the if statement once the refresh button is hit. What would I do to stop this here is my code if (isset($_POST['submitButton'])) { //do something } <form action = "table.php" method="post"> <label for="submitButton"></label> <input type="submit" name="submitButton" id="submitButton" value=

How to add site search function to website using XHTML/HTML? [closed]

可紊 提交于 2019-12-05 02:18:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I really want to learn how to make my own search engine for my site. I have the defined buttons and labels, but it doesn't search. I can't figure out the HTML or XHTML code for actually searching the site. This is the code I have so far: <p class="search"> <label>SEARCH</label> <input name="search" type="text"

Can a <hr /> element have a closing tag?

拥有回忆 提交于 2019-12-04 22:58:58
My colleague doesn't really know or understand html. Her job is to input information into the CMS and I've noticed she keeps closing her <hr /> tags like this <hr></hr> . I've had a Google but I can't find anywhere that says this isn't allowed or could cause problems. I know it's supposed to be <hr /> but is it worth me telling her or is it unnecessary but valid markup? NB The doctype for our website is XHTML 1.0 Transitional if that makes any difference. EDIT @Jeff had a good idea about validating. I used the following code and apparently this is valid XHTML 1.0 Transitional <!DOCTYPE html

What DOCTYPE is recommended for my HTML output for IE7/IE8/FF3+? and how can I update my HTML validation in Visual Studio to reflect that change?

自作多情 提交于 2019-12-04 22:48:14
问题 I noticed that Visual Studio defaults the DOCTYPE to XHTML 1.0 Transitional. This seems okay, but I think that's more of a standard for "generation 6" browsers. We're now in gen 7 and 8 browsers, and I'm wondering what DOCTYPE I should be putting in my HTML. On a related note: Is there a way to add other DOCTYPEs to the HTML validation in Visual Studio 2008? Tools > Options > Text Editor > HTML > Validation 回答1: <!doctype html> is the way to go. This works fine in all decent browsers,

Convert Wordpress theme to plain XHTML+CSS

给你一囗甜甜゛ 提交于 2019-12-04 22:27:08
问题 So there is a lot of posts on the internet about how to convert your XHTML+CSS theme to Wordpress, but I have a Wordpress theme and want to convert it (or un-convert it) back to just XHTML+CSS. Has anyone done this before? Anyone know of any resources (tutorials etc.) that I can use to help me do this? Thanks 回答1: Wordpress renders html. If you want a static version of your wordpress site you could use Wget. wget -l2 -r -p -k -E http://www.example.com/ 回答2: Visit the Wordpress web page in

Why is using DIVs or spans tags “better” than using a table layout? [duplicate]

风格不统一 提交于 2019-12-04 22:21:50
Possible Duplicate: Why not use tables for layout in HTML? Why is using markup with divs defining everything (container, header, content, etc) BETTER than using tables? I understand that when you build your page using tables it: look ugly as hell, look even UGLIER when nested, because of the higher volume of bullshit - slightly higher page load time, and less readable code. BUT. Using tables is so easy and saves SO much time in trying to accomplish what would seem to be an easy thing, but with the caveat of making it work across all browsers . What I'm asking is, wouldn't a somewhat complex

Is there a way to group `<li>` elements?

社会主义新天地 提交于 2019-12-04 22:17:07
I need to divide into groups several <li> elements in a list, is it possible? (I know I an give each element different class names/separate into different <ul> ) Have you considered nested UL's? I believe this would validate: <UL> <LI> <UL> <LI></LI> <LI></LI> <LI></LI> </UL> </LI> <LI> <UL> <LI></LI> <LI></LI> <LI></LI> <LI></LI> <LI></LI> </UL> </LI> </UL> Your CSS trick was my first guess; too bad you can't use that. According to the XHTML schema (or one the schema anyway), the only thing you put inside a <ul> is a <li> , as described at http://www.w3.org/TR/2006/WD-xhtml-modularization

How to keep the text vertically aligned in any condition?

穿精又带淫゛_ 提交于 2019-12-04 19:54:49
For example in the below image I want keep the text always vertically aligned in all condition. even if text is in one, two or three lines. means the text should be vertically centered always. I don't want to add extra span <div> <img src=abc.jpg"> Hello Stackoverflow. Thank you for help me </div> I want to achieve with this html. Edit And I don't want to give fix width and height to any element Chris Coyier wrote an excellent tutorial on just this: http://css-tricks.com/vertically-center-multi-lined-text/ I've used it myself, and it works perfectly. try with HTML <div> <img src="" height=