Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1401
  • Last Modified:

XHTML scalable textarea?

I have the following page that works great to create a scalable textarea.

http://www.raibledesigns.com/onpoint/sandbox/textarea.html

By scalable, I mean that the textarea always occupies 100% of the <td> it's in.  Could be a <div> - I don't have a preference.

However, when I change the DOCTYPE in this page from HTML to XHTML (Transitional or Strict) - I can't get it to scale any more.

To assist you, the doctype I'd like to use is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

--
Is is possible to create an XHTML-compliant scalable textarea?

Thanks,

Matt
0
mraible
Asked:
mraible
  • 3
  • 2
1 Solution
 
COBOLdinosaurCommented:
What browser are you looking at it with.  In IE5.5, it scales correctly with both doctypes just fine.

Cd&
0
 
mraibleAuthor Commented:
IE 6 / Mozilla 6 RC2 - on Windows XP.  IE 6 switched to standards-compliant mode when you add the XHTML doctypes.

http://hotwired.lycos.com/webmonkey/01/14/index0a_page2.html?tw=authoring
0
 
COBOLdinosaurCommented:
You are being burned by IEs sloppy adherance to standards prior to IE6.  The page validates as xhtml 1.0 strict, but the CSS does not validate as Valid CSS 2. The height and width attribute cannot be applied to a textarea within the strict definition of the standard.  The normal action for browsers in that case would be to ignore the declaration.  

If you want the scalable textarea then you cannot use the strict dtd, and I'm not even sure that loose xhtml 1.0 will let you do it.

Cd&
0
 
mraibleAuthor Commented:
This is what I suspected.  So there is no way to make a scalable textarea with XHTML - I was just veryifying my findings.  Thanks for your expertise.
0
 
COBOLdinosaurCommented:
I wish knew away around it. It looks like Microsoft has shot themselves in the foot with compatibility.  IE 6 has some position problems compared to earlier versions as well.  The way it used to determine margins was not to standard, so some elements may get shifted a little.

Someday maybe browser manufacturers will give us a version without problems, but don't count on it.

Thanks for the A. :^)

Cd&
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now