SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: coordinates

  1. #1
    SitePoint Guru
    Join Date
    Sep 2007
    Posts
    971
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    coordinates

    is there a code to place an image on a webpage but instead of using like <div align="center"> use x=542 y=321 something like that?
    Animated Chatrooms - www.121chatrooms.net

  2. #2
    Non-Member Icheb's Avatar
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    1,474
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What could this POSSIBLY have to do with PHP?

  3. #3
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Like this?
    Code html4strict:
    <style type="text/css">
    #mydiv { 
      position: absolute;
      top: 321px;
      left: 542px;
    }
    </style>
     
    <div id="mydiv"></div>
    or perhaps:
    Code html4strict:
    <style type="text/css">
    #mydiv { 
      padding-top: 321px;
      padding-left: 542px;
    }
    </style>
     
    <div id="mydiv"></div>
    Not sure what you're trying to do exactly.
    Saul

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,797
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Hi,

    As mentioned above you need to explain what you are trying to do exactly

    You can move elements around the page with a variety of positioning systems but it all depends on the situation as to which is the right method.

    If you want the element removed from the flow then absolute positioning is the way to go. If you want the element tied to a specific starting point and then offset some distance you would need to set a stacking context on a suitable parent using (most likely) position:relative.

    If you just want to push things around but maintain the flow you could simply use padding or margins.

    We would need more information to be more specific


Bookmarks

Posting Permissions

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