...

View Full Version : Textarea in iframe issue with IE



zenox
08-02-2007, 01:29 PM
Hey,
I have a textarea inside an iframe with style="width: 100%; height=100%;". This works fine in firefox and opera but not at all in IE 6 and/or 7.
For example see:
http://www.hankinsoft.com/iframeissue.html

Anyone have any suggestions on how to fix this?
I know textarea's are suppost to use cols/rows but I need it to fit the iframe perfectly.

Thanks for any help!

Jutlander
08-02-2007, 01:39 PM
As far as I know <hmtl> is not a valid tag. ;) You should also put a doctype on your page: http://www.alistapart.com/stories/doctype/

zenox
08-02-2007, 01:56 PM
Whoppps sorry about the hmtl, this was just a quick sample page that I had added for demo purpose. Fixed the html and still have the same issue. Also I had no doctype because I have read that the textarea height: 100% should of worked in "quirks" mode.

I attempted to add in the doctype of transitional html (im assuming I would only need to add this to the actual iframe because thats what is display the textarea?):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

However now it still does not work in ie and no longer works in firefox :P
Any ideas? Sorry if my questions are dumb, im more of a programmer than a designer.

Thanks.

koyama
08-05-2007, 04:40 AM
Hey,
I have a textarea inside an iframe with style="width: 100%; height=100%;". This works fine in firefox and opera but not at all in IE 6 and/or 7.
For example see:
http://www.hankinsoft.com/iframeissue.html

Anyone have any suggestions on how to fix this?

The textarea does not show up in IE because you didn't close your title element properly:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Inner Iframe<title>
</head>
<body style="margin: 0px;">
<textarea style="width: 100%; height: 100%; border: 1px solid #ff0000;">This textarea should span the entire height</textarea>
</body>
</html>


I know textarea's are suppost to use cols/rows but I need it to fit the iframe perfectly.
You should still include the cols and rows attributes. They won't affect the dimension of your textarea (in the styled page) as long as you also specify a width and height in the style sheet.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum