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 Coder
    Join Date
    Oct 2010
    Posts
    48
    Thanks
    10
    Thanked 0 Times in 0 Posts

    <p>Text</p> is not on div top 0px position even and when I set it so?

    Hi to everyone!

    As title says
    "<p>Text</p> is not on div top 0px position even and when I set it so?"

    Why? And how I can make it be?

    Here is the code:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    
    <body>
    <div id="txtarea" style=" position: absolute; left: 610px; top: 232px; height:454px; width: 300px;overflow:hidden; border-width: 2px; border-style: solid; border-color: red; ">
    <p align="justify" class="drag" id="1" style="top: 0px; width:260px">
      If you have an interesting related post on your own site you can leave a trackback.<br />
      <br />
      As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only
      once. If you have an interesting related post on your own site you can leave a trackback. 
      As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have 
      to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only once
      <br />
      If you have an interesting related post on your own site you can leave a trackback.<br />
      <br />
      As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only
      once. If you have an interesting related post on your own site you can leave a trackback. 
      As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have 
      to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only once
      <br />
      If you have an interesting related post on your own site you can leave a trackback.<br />
      <br />
      As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only
      once. If you have an interesting related post on your own site you can leave a trackback. 
      As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have 
      to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only once
      <br />
      If you have an interesting related post on your own site you can leave a trackback.<br />
      <br />
      As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only
      once. If you have an interesting related post on your own site you can leave a trackback. 
      As they say: 'a little AJAX a day keeps the spammers away' which is why you'll have 
      to click below to generate a trackback key. The key will be valid for 15 minutes and can be used only once
      <br />
      </p>
    </div>
    </body>
    </html>

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    where do you want this div to be in relation to the page? Also, you know you can use more than one <p> tag in place of all those breaks.

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,864
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    You need to remove browse specific default value of margin from that paragraph, by setting margin:0; instead of top

    Or add
    Code:
    *{margin:0;padding:0;}
    in to your CSS
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    bloody86 (11-10-2010)

  • #4
    New Coder
    Join Date
    Oct 2010
    Posts
    48
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Thanks! That's exactly what I needed!


  •  

    Posting Permissions

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