xhtml

Truncate a string with an ellipsis, making sure not to break any HTML entity

I have a database of items with XHTML content and I want to display the items with the HTML stripped off (done) and then truncate each item to a maximum length of 100 characters. If the string exceeds 100 characters, I cut it off and insert … (an ellipsis) at the end. The problem is that my program doesn't understand HTML entitie...

How to detect linked PDF on a page and show message to download Adobe reader using jquery?

If page has .pdf files linked then a message in <p> should be add just before end of the #mainontent div as a last paragraph <p> for example this is default html? <div id="maincontent"> <ul class="cheat_sheet_downloads"> <li><a href="http://www.addedbytes.com/download/css-cheat-sheet-v2.pdf"&gt;PDF, 316Kb</a></li> <li><a href="http://...

how to convert the webpage to xml document using java?

The assumption is the webpage is coded with correct tags. How can I Convert it to the XML file? I think the most webpages can be viewed as dom tree...How can I convert it to XML file? ...

Is it harmful to put any comment as a first thing in CSSfile?

Is it harmful to put anything as a comment as a first thing in a CSS file? Can it cause any problem in any browser or does it have no cons? ...

How to enable hover on a div for IE6 using jquery in minmal code?

I just want to implement hover on a single div(for IE 6). what is the simplest , lightest, solution in jquery? <div class="hoverforie"> </div> i will add this script in IE condition comment. Thanks in advance. ...

how to add anything in <head> through jquery/javascript ?

I'm working with CMS i'can't edit source of . can i add any in through javascript? Edit: For example I want to add this <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> just above <title> ...

Positioning div element on center of screen

Hi there. I want to positioning a div element (popup) on the center of the screen via CSS. No problem with this. The problem comes when i scroll the browser and then i click on the element that displays the popup, but this one will be displayed on the top of the page, instead of centering it on the rendered area (scrolled) The popup m...

php vs htm, weird gaps

the normal one: http://labvc.x10hosting.com/AT/site/home.htm VS the odd one: http://labvc.x10hosting.com/AT/site/home.php when i look at the code side by side, its almost identical, the only thing that would make them give that weird gap should be the CSS but they're using the same sheet. ideas? EDIT: I checked and made ...

iPhone autofill passwords

I can't get my iPhone to remember my username and password for the login to my website. The controls I currently have are: <input type="text" name="username" id="username" /> <input type="password" name="password" id="password" /> <select> <option value="1">option1</option> <option value="2">option2</option> </select <input type...

Make NSXMLParser skip an Element

Hi, I'm using NSXMLParser on an iPhone App to parse HTML Files for a RSS or Atom Feed Link. Everything works fine until the parser find a <script> element that includes Javascript code without the CDATA Declaration, this causes a Parse Error. Is possible to tell the parser to skip all the elements named <script>? ...

CSS Form Styling

I'm trying to make this: <form id="simple-search" name="simple-search" action="/search/" method="POST"> <label for="simple-search-address">Location/Address</label> <input type="text" id="simple-search-address" name="address" value="" /> <label for="simple-search-dob-day'">D.O.B.</label> <select name="dob-day" id="simple-...

CSS Form Styling #2

I have seen forms that can do this without using <br /> etc. Here's my form: <form id="staff-login" name="staff-login" action="/staff/login/" method="POST"> <label for="staff-login-email">Email</label> <input type="text" id="staff-login-email" name="email" value="" /> <label for="staff-login-address">Password</label> <i...

A link which is opens in a new window, what will be the best appropirate instruction for use in title?

A link which is opening in a new window What is more appropirate to put in Title="text here". Title="Opens in new window" or Title="Opens in a new window" or Title="Link opens in new window" or Title="Link will open in new window" or Title="New window will open" (used by linkedin.com) Which is grammatically and Logically correc...

Exactly the same Xhtml displays differently depeneding on hostname

I have a web page. When I view it under localhost it looks ok e.g. http://localhost/MySite/ is fine When I view it using the specific name of my machine one of the pages renders incorrectly e.g. http://MyMachineName/MySite/ However the Xhtml is identical. This makes no sense to me. (IIS 5/ASP.NET 3.5/XHTML Transitional) ...

Why isn't my document validating as XHTML 1.1 STRICT?

While target="_blank" is deprecated but, why W3C validator not giving ant error about this .you can paste and check this code validator? http://validator.w3.org/#validate_by_input <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <...

Is div inside list allowed?

I know that DIV inside LI isn't allowed, but I've seen it lately on many "big" websites like: Smashing Magazine, Web Designer Wall... etc. I try to validate sites, and they have errors, but nothing about div's in LI?! So can i use it inside LI, and I need it to be valid? Thanks ...

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?

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 ...

ASP.Net MVC passing database string to checkbox value

Hello all, this is closely related to a question I posted yesterday regarding checkboxes. Here is my setup: -I have a database directory, with a list of names, among other fields, as my model. -I have a search page where users can search this directory and select a name. -I have a form page that displays the name with a checkbox ne...

WXPython xHTML/css interpreter

Is there an opensource library/package available that we could use to parse an xHTML/css file into wxPython layout instructions (inside a larger python program)? For the Pythics project, we need a better parser than the one written by our primary programmer, but his attempts to improve it are both making things better (stops ignoring CSS...

How to style first paragraph <p> of the content differently without using css class , ID or javascript, with IE6 compatibility ?

How to style first paragraph <p> of the content style differently without using inline css, css class , ID or javascript. ? with IE 6 compatibility too. ...