Help - Search - Members - Calendar
Full Version: XHTML Validation
Movable Type Community Forum > Additional Resources > Tips and Tricks
medic119
With all gurus here I figured this would be the place to ask.

Has the LABEL Tag for forms been depreciated? If so, how do I fix this?
I am using the standard MT search form, but in validation I am receiving:
CODE
Line 284, column 12:  there is no attribute "form"  (explain...).

 <label form="search" accesskey="4">Search this site:</label><br />



Here is the form:
CODE
<form method="get" action="http://path.../mt-search.cgi"><input type="hidden" name="PHPSESSID" value="ff9f5f1dea1f22fae2456e6b380ba391" />
284: <label form="search" accesskey="4">Search this site:</label><br />
285: <input name="search" size="20" class="search" /><br />
286: <input type="submit" value="Search" style="padding:0px;margin-top:2px;font-size:11px;border:1px solid #000;background:#CCCCCC;" />
287: <input type="hidden" name="IncludeBlogs" value="2" />
288: </form>


Also what can I use other than a <nobr>? I need it in one spot, for a particular piece of Javascript.
LisaJill
This is what I use for my search form, it works properly and it validates... compare and see whats going on maybe:

CODE
<div class="sidetitle">search</div>
<form method="get" action="<$MTCGIPath$><$MTSearchScript$>">
<input type="hidden" name="IncludeBlogs" value="<$MTBlogID$>" />
<label for="search" accesskey="4"></label>
<input id="search" name="search" size="8" class="textarea" />
<input type="submit" value="find" class="submitbutton" />
</form>


no idea on nobr... not even sure what it does hehe.
medic119
we are using the same code. I'm sorry I pulled that from the validator so You get the parsed version. Could it be the ending <br /> after the lavbel tag causing the failure?


NOBR is a tag that kills line wrapping. It's probably long depreceated, but I don't know a good replacement. If you look at the "Latest Referrers" on my page, thats where I have it so I don't get extended URLS listing on multiple lines.
Basically, they run out of sight and are covered by the ellipse.
LisaJill
In a character by character comparison, I see differences in the form.

you can try style="display:inline;" instead of nobr, maybe...
medic119
I got the NOBR solved and discovered another little inconsistency at the same time.

First off, Thanks for the FORM example. I found the issues.

The answer to the NOBR was in a weird place... white-space

The white-space text property is valid for Mozilla/Gecko and IE 5.5 so it should be viewable in most modern browsers.

The property has a the attribute nowrap.
ie white-space:nowrap will keep lines from wrapping like NOBR provided. biggrin.gif

It just seemed odd that this attribute would be found inside the property for setting the white space between letters.

Anyway, the inconsistency is in the text-overflow property. It seems that is an IE only property as I can't find it listed in the CSS directories and Mozilla ignores it.

So anyway, here is the code piece just FYI..

<div class="module" style="text-align:left;width:125px;overflow:hidden;
padding-left:5px;white-space:nowrap;
text-overflow:ellipsis;
">
<script language="javascript" type="text/javascript" src="http://www.seadoc.net/sd/referrers.js"></script>
</div>
LisaJill
I've never seen that text overflow before.. I'd wonder if its css3 but if its IE supporting it.... it isn't. wink.gif

happy you got it worked out!
medic119
It was in a piece of code When I went looking for something. I think its an IE only CSS tag sort of like the Alpha Filter stuff.

It would be a nice tag to have in CSS standard though.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.