xhtml

ASP.NET MVC with DOCTYPE HTML 4.01 strict makes self-enclosing-tags from empty elements, why?

My master page has doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; In this page I want to use empty elements like: <input name="X" type="hidden"> After opening the page in my browser I check the source and see that all empty tags are closed like so: <input name="X" type="hidd...

CSS Show active element above the div with overflow:hidden

I have a scrolling pane div with overflow:hidden. Please check it here. There are products as images with captions shown in the scrolling pane. When I move mouse cursor over a product div, it gets light-yellow background and changes its height - I just add a class to the div using jQuery and it works fine. The problem I need to solve som...

Font sizes in px in modern browsers (is it good, what about 120 dpi?)

I used to use the 'font-sizes in ems' approach (mostly for IE users) and some CSS hacks to have the same font size on systems where screen is set to 120dpi. I know that forcing the same font size in 120 dpi is not good in usability terms, but this is the way I should get it done. I'm curious is it good to switch to pixels instead of em...

Check if a variable of the for-each is equal with an XML entry

I'm trying to add the attribute 'selected' to <option>. I've tried various ways and I can't get it working. This is how I'm trying it: <xsl:for-each select="page/index/values/albums"> <option> <xsl:attribute name="value"><xsl:value-of select="id" /></xsl:attribute> <xsl:if test="page/index/values/album = id"> ...

How to get a form select to come back with the option value, to be then used with a PHP if statment?

<?php $home = "/index.php"; $aboutus = "/aboutus.php"; $contact = "/contact.php"; $contact_reply = "/contact_reply.php"; $current = $_SERVER['REQUEST_URI']; if ($contact==$current) { print "&nbsp;"; } else { if (isset($_POST["op"])){ $message = ""; foreach ($HTT...

Is it possible to autosize or autogrow for input text and textarea using CSS only?

James Padolsey's and ahaxe's jquery scripts are two very good instances on autogrowing form fields. Likewise, autosize can be accomplished in a number of ways using Javascript. But, just wondering, is there anyway to do any kind of autosize or autogrow with CSS only? I don't know CSS deep enough, so you know, with all those pseudo-clas...

"document type does not allow element "script" here" when attempting to validate my page.

I'm working on get my site validated in an attempt to iron out issues with it showing up incorrectly on IE, and I'm getting an error: document type does not allow element "script" here. It's from me placing the <script> tag within the <select> tag on the javascript drop down menu form I have. Is there any way to get this validated? Or a...

xHTML syntax question

Is it proper if I place the tag after the input tag or before or does it matter? <label for="l">Last Name:</label> <input type="text" name="lname" id="l" /> <input type="text" name="fname" id="f" /> <label for="f">First Name:</label> ...

What are benefit to use doctype DTD XHTML+RDFa 1.0//EN over XHTML 1.0 Strict?

In some sites on web I noticed they are using this doctype. What is this doctype and what is the benefit of this Doctype XHTML+RDFa? <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.0//EN' 'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd'&gt; <html xmlns='http://www.w3.org/1999/xhtml' xmlns:v="http://rdf.data-vocabulary.org/#" xml:lang='en...

Are image maps <map> deprecated?

Are image maps deprecated in (x)HTML? ...

Html is being truncated on save in drupal (full html)

If I unput a certain piece html into my page, it seems to be truncating: <div id="slideshow"> <img style="cursor: pointer;" src="files:img/slideshow/3.png" id="left_slide" alt=""/> <img style="cursor: pointer;" src="files:img/slideshow/1.png" id="center_slide" alt=""/> <img style="cursor: pointer;" src="files:img...

CSS Navigation Sprite - Odd Shapes [not square]

Hey there everyone. I usually have no problems with making CSS sprites, but this one has got me stumped...and I'm not sure how to solve it. Basically I have a navigation sprite that looks like this: http://cl.ly/aa4a5e78eda252e8f4d7 I'm using the standard convention of laying them out in <li> tags such like: <li class="welcome"><a h...

Special Google Search Result - How to achieve this? (look at the attached image)

look at the following image when searched for some websites... various websites show the above kind of result on google.. like serach for stackoverflow, flickr, deviantart, Hotmail and so on HOW TO ACHIEVE THIS... ...

Safari 3 and 4 are not agreeing with me for once, need help with my css and centering plus another weird thing...

Hey I am completely lost with this one. Basically the website i'm working on here: Home page It is acting funny. I'm using the easy slider 1.7 jquery plugin. In safari 4 (browser labs) the slider div isn't centering up. The css is as follows: #slidercontainer{width:800px;padding:0;margin:0px auto;position:relative;} I've tried: #sl...

How to give a div tag focus when its contents are clicked using JQuery or CSS.

Is there a way to give a div tag focus when you click on its contents? Using CSS or JQuery? ...

A full-page wysiwyg editor for xhtml?

My client has a website which is currently semi-static html pages: it contains dynamic elements such as navigation and a media gallery, but the editable content is still stored straight into several static (x)html pages, that the client edits using Expression Web. The site in itself is ready for content/style/layout separation, but the ...

what is the default action happening when we drag over an image ?

Hello What is the default action happening when we drag over an image ? When I drag over an image the cursor changes to a black circle with a line inside (in Firefox) I could block it by the code e.preventDefault() using jquery, but I didn't understand what is the default action happening when I drag over an image. Thanks ...

Only the first CSS stylesheet loads...

Hi guys ! I gotta admit that's a first-timer bug for me. I've never seen that... I have this code : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $lang; ?>" > <head> <title><?php echo PAGE_TITLE; ?></t...

How to access data from an XHTML file and use it in a Delphi Program

I am currently writing an application that needs to pull data from an XHTML file. the file is called toon.xhtml and below is its formatting: <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="/_layout/character/sheet.xsl"?><page globalSearch="1" lang="en_us" requestUrl="/character-sheet.xml"> ...

Do you think use of XHTML, and classes name is semantically correct in zengarden?

Lots of div and classes name are being used in the code. http://www.csszengarden.com/ Is there any scope of improvement in semantic? http://cssglobe.com/post/6957/class-names-revisited this is mentioned in source code as a comment This XHTML document is marked up to provide the designer with the maximum possible flexibility. ...