Loading ...
Sorry, an error occurred while loading the content.

center object on page

Expand Messages
  • wambambam2003
    This is the code I am using: My issue is that there are other
    Message 1 of 2 , Aug 28 7:15 PM
    • 0 Attachment
      This is the code I am using:

      <div style align="center"><img src="gray.jpg" border="3" alt=""
      width="800" height="991" ></div>

      My issue is that there are other images on top of this image on the
      page which is what I want:

      <div style="position:absolute;left:650;top:98;z-
      index:44;width:210;height:143;overflow:visible;visibility:visible">
      <img src="pkwy_building.jpg" alt="" width="300" height="150" ></div>

      but depending on the browser...the building.jpg stays where it
      should be, but the gray.jpg moves to the center of the browser being
      used and the building.jpg is not centered on the gray.jpg

      Can someone tell me how I get the gray.jpg to stay on one place as
      well no matter what browser is being used?

      Thanks.
    • David Smart
      The div that holds the grey picture has been TOLD to centre itself. You need to use absolute positioning the same as the other div to put them in the same
      Message 2 of 2 , Sep 2, 2008
      • 0 Attachment
        The div that holds the grey picture has been TOLD to centre itself.

        You need to use absolute positioning the same as the other div to put them
        in the same place.

        Regards, Dave S

        ----- Original Message -----
        From: "wambambam2003" <wambambam2003@...>
        To: <JavaScript_Official@yahoogroups.com>
        Sent: Friday, August 29, 2008 12:15 PM
        Subject: [JavaScript] center object on page


        > This is the code I am using:
        >
        > <div style align="center"><img src="gray.jpg" border="3" alt=""
        > width="800" height="991" ></div>
        >
        > My issue is that there are other images on top of this image on the
        > page which is what I want:
        >
        > <div style="position:absolute;left:650;top:98;z-
        > index:44;width:210;height:143;overflow:visible;visibility:visible">
        > <img src="pkwy_building.jpg" alt="" width="300" height="150" ></div>
        >
        > but depending on the browser...the building.jpg stays where it
        > should be, but the gray.jpg moves to the center of the browser being
        > used and the building.jpg is not centered on the gray.jpg
        >
        > Can someone tell me how I get the gray.jpg to stay on one place as
        > well no matter what browser is being used?
        >
        > Thanks.
        >
        >
        > ------------------------------------
        >
        > Visit http://aiaiai.com for more groups to joinYahoo! Groups Links
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.