xhtml

Whats better using HTML/CSS edited by hand or using design programs? and why?

For design websites is it better to do it your self by learning HTML/CSS or using web design programs? and why? ...

Easiest way to convert a PHP page to static HTML page

I want to convert a web pages which is heavily CSS styled is written in PHP to static html so that I can embed it in an email. I have managed to do this but for achieving this I had to convert the whole page into a string and then assign that string as email body. The layout of the page does not look as good as original as I have not be...

sIFR3 and gradient text

Does anyone have some pointer/code to implement gradient fonts using sIFR 3? ...

Which are the valid control characters in HTML/XHTML forms.

Hello, I'm tring to create form validation unit that, in addition to "regular" tests checks encoding as well. According to this article http://www.w3.org/International/questions/qa-forms-utf-8 the allowed characters are CR, LF and TAB in range of 0-31, the DEL=127 in not allowed. On the other hand, there are control characters in rang...

Why do browsers insert tbody element into table elements?

I was playing around with some ideas using raw html and JQuery. One thing I did was to create an table element with a set of rows. <table id="MyTable" > <tr> <td>Title</td> </tr> <tr> <td>1</td> </tr> <tr> <td>2</td> </tr> <tr> <td>3</td> </tr> <tr> <td>4</td> ...

Modal, modeless divs on a page

I'm using modal, modeless divs (I mean fixed, styled divs) on my HTML page. This page contains iframes with modal divs as well. When I open a new div on the page, I need to disable keyboard events on the parent page (opener page). Also I need to be able to handle tab key presses on the parent page. I have Googled, but I haven't found ...

HTML naming conventions for ID, class and to include element type prefix?

Hi there, Does anyone know of a good resource to explain good naming conventions for HTML ID and classes and whether to prefix with IDs with an element type i.e. btn or button or similar? Should classes be plural or singular? I get that IDs should be singular due to them being unique, but what about classes? IDs and classes should us...

XSLT element in HTML element leads to errors

Hi, how can i realize something like this: <img alt="logo" src="/Content/Images/Logos/<xsl:value-of select="/customer/country"/>.png" /> The XSLT processor throws an error because of the "<" - sign here... ...

Using Javascript in an element with injected HTML in jQuery

Hi, I'm trying to reference some javascript files in a remotely loaded (injected) HTML file via jQuery's .load() function. The javascript files I'm attempting to utilize in the loaded HTML file are already included in the loaded HTML's parent HTML page. Initially, I thought that making references to these files in the loaded HTML woul...

Unwanted spacing below images in XHTML 1.0 Strict

Hey all- My goal is to use the XHTML 1.0 Strict DOCTYPE for this page I'm working on, but I'm running into some weird design issues.. I have the below code: <div><img src="photos/someimage.jpg" alt="Title" /></div> When I load the page with DOCTYPE set to 1.0 Strict, a little gap of spacing is added below the image, within the div. ...

Is there a regular expression to strip specific query variables from a URI?

I have a bunch of HTML that is generated by a daemon using C, XML and XSL. Then I have a PHP script which picks up the HTML markup and displays it on the screen I have a huge swathe of XHTML 1 compliant markup. I need to modify all of the links in the markup to remove &amp;utm_source=report&amp;utm_medium=email&amp;utm_campaign=report. ...

Why is my script failing w3c validation?

I have this piece of code: <script language="javascript" type="text/jscript"> document.write("<img src='http://dm.leadgenesys.com/jpgp.lgt?en=P.........TP_Q=&amp;amp;ur=' + escape(document.referrer) + '' border='0' alt='no alt' />"); </script> and... when I try to validate it, I'm given this error: document type does not allow ...

Hidden Features of HTML

HTML being the most widely used language (at least as a markup language) has not gotten its due credit. Considering that it has been around for so many years, things like the FORM / INPUT controls have still remained same with no new controls added. So at least from the existing features, do you know any features that are not well know...

Give Each Word In An <input> A Random Colour

How can I Give Each Word In An <input> A Random Colour ...

How to position a liquid/elastic textbox next to a button?

I want to position a textbox and a button next to each other in an 'elastic' or 'liquid' way (what's the correct term?) like so: When placed in a container of arbitrary width (incl. browser window resizing), the button should right align and take up as much width as it requires while the textbox should use the remaining width. Unfortu...

SWFobject on top of JS tooltips

http://richarcade.com/play/gunrun I'm using swfobject.js (richarcade.com/swfobject.js) to display Flash content, and wz_tooltip.js (richarcade.com/wz_tooltip.js) to display hovered tooltips. The problem is that the 'similar games' tooltips show up behind the flash game. Any ideas? ...

Certain sIFR Selectors not working in Safari--extremely unusual bug:

I am creating a site, CardinalCoffee.com, using sIFR. It's not quite ready to go, so access by adding 72.249.85.228 cardinalcoffee.com 72.249.85.228 www.cardinalcoffee.com to your /etc/hosts (C:\WINDOWS\system32\drivers\etc\hosts on Windows). On the blog page (http://cardinalcoffee.com/blog/), and only on the blog page, certai...

Is it OK to group form elements into "p"?

Let's say I have this code <form action="#" method="get"> <p> <label for="name">Name:</label> <input type="text" name="name" /> </p> <p> <input type="submit" /> </p> </form> Is it semanticaly fine to group elements with p? Because my teacher (again.. I know ..:P) told me that p should be used on...

Help needed with DIV-layout for site

Hi I am trying to build a page with the following in it: Already have the following: one div for page to center the whole page with width 809px inside <div class="page"> is the following: <div class="header"> <div class="container"> (container for content stuff) <div class="footer"> What I am struggling with: <div class="contai...

ASP.NET MVC support for HTML output (as opposed to XHTML)

It seems to me that ASP.NET MVC Html Helpers only output XHTML-like tags (closed empty elements), which is not valid HTML. Is there support for HTML output in ASP.NET MVC? ...