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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Positioning Text

    Hi,
    I have given some html code below. In that the text within the paragraph tag gets compressed when I resize the browser window. Please tell me that this can be stopped. I cant use tables in any way because I have to be able to move text around the page. I have noticed though that the input tags dont get compressed.

    Thanks,
    Gavin

    <HTML>
    <HEAD>
    <TITLE></TITLE>
    </HEAD>
    <BODY>

    <INPUT type="text" id=text1 name=text1 style="position:absolute;top:10;left:10;">
    <INPUT type="text" id=text1 name=text1 style="position:absolute;top:10;left:180;">

    <P style="position:relative;top:10%;left:30%;">Hello Thi is a text : </P>

    </BODY>
    </HTML>

  • #2
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    <P style="position:relative;

    you have to change that to absolute, like it is in the input tags.

    <P style="position:absolute;top:10%;left:30%;">Hello Thi is a text : </P>
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #3
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    joh6nn,
    Hi, thanks for the reply. But the code you gave getts compressed when the browser is resized. But a colegue of mine has shown me another way to avoid this. If i put the text inside a div tag the problem doesnt occur.

    Thanks,
    Gavin

    <HTML>
    <HEAD>

    <TITLE></TITLE>
    </HEAD>
    <BODY>

    <DIV STYLE="position:absolute; width:400px; height:300px; left:200;top:200; background-color:red">
    <P style="position:absolute;top:10%;left:30%;">Hello Thi is a text : </P>
    </DIV>


    </BODY>
    </HTML>


  •  

    Posting Permissions

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