Absolute positioning of the div width automatic adaptation of a method _ experience Exchange

Source: Internet
Author: User
Just on a page to use the Position:absolute;

Such code in IE7 and Firefox will not have a problem, but in IE6 below will not support;
<textarea id="runcode77090"><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> This is a test</textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
So I added another one for IE6. This is possible;
<textarea id="runcode68804"><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> This is a test <pr/></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
But HR I don't want to appear on the page, so I added a B

<textarea id="runcode46777"><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> This is a test <b style=" float:right; height:0; Overflow:hidden "></b></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
This is a method; one way I really don't know what to do with this thing; who knows what the real method is; trouble tell me;

This is the final effect;
<textarea id="runcode86298"><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> This is a test <b style=" float:right; height:0; Overflow:hidden "></b></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.