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 2 of 2
  1. #1
    Banned
    Join Date
    Oct 2010
    Posts
    115
    Thanks
    30
    Thanked 0 Times in 0 Posts

    absolute positioning within frame

    How do i do it?

    if i had two objects:

    Code:
    <p class="1">asdf</p>
    <img class="2"></img>
    and their classes

    Code:
    .1{
    position: absolute;
    top: 40px;
    left: 40px;
    }
    
    .2{
    position: absolute;
    top: 100px;
    left: 100px;
    }
    how do i make this work within a page if i want to make a box around them and say (0,0) is located at (100,100) on the page, which would make my "<p>" be located at (140,140)

    How do i do this?

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Generally speaking, set up "relative" positioning on the containing element.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Posting Permissions

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