Web Analytics Made Easy -
StatCounter wrap="off" not valid XHTML 1.0. What to use? - CodingForum

Announcement

Collapse
No announcement yet.

wrap="off" not valid XHTML 1.0. What to use?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • wrap="off" not valid XHTML 1.0. What to use?

    Does anybody know what I can use instead of wrap="off" to put some code in a textarea that could be valid XHTML 1.0? Thanks.

  • #2
    Try:
    nowrap="nowrap"
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

    Comment


    • #3
      Sorry if I didn't answer before. That's not what I need. I just have to write some javascript code in a textarea and I want the text inside to be as long as I need without returns. I think wrap="off" is the only solution but it's not valid.

      Comment


      • #4
        Can you show the error you get when you try to validate it? As far as I'm aware wrap="off" is valid

        Comment


        • #5
          It's not.
          Code:
          <!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->
          <!ATTLIST textarea
            %attrs;
            %focus;
            name        CDATA          #IMPLIED
            rows        %Number;       #REQUIRED
            cols        %Number;       #REQUIRED
            disabled    (disabled)     #IMPLIED
            readonly    (readonly)     #IMPLIED
            onselect    %Script;       #IMPLIED
            onchange    %Script;       #IMPLIED
            >
          No wrap in there. For those of you that don't speak DTD, 'wrap' should appear in that list in the lefternmost column if it was an attribute of textarea.

          This is XHTML1.1 though...
          David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
          W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

          Comment


          • #6
            This is what the W3C validator gives for a XHTML 1.0 Trans doc:

            Line 267, column 35: there is no attribute "wrap" (explain...).
            <textarea cols="50" rows="15" wrap="off" readonly="readonly">

            I think there is not a walk-around for it.

            Comment


            • #7
              I'm sorry to say guys that you're right. I bumped into this issue about a year ago, and it's something they changed in the XHTML DTD.

              The really lousy part about it is the CSS specification doesn't have a way around it either, I think. You might try overflow: scroll, but I have little confidence that will work.
              "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
              June 30, 2001
              author, ES-Membrane project (Github Pages site)
              author, Verbosio prototype XML Editor
              author, JavaScript Developer's Dictionary
              https://alexvincent.us/blog

              Comment

              Working...
              X