Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer Textarea in iframe issue with IE

    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!

  • #2
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    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/
    .
    .

  • #3
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by zenox View Post
    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:
    Code:
    <!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>
    Quote Originally Posted by zenox View Post
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •