Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Web Development
Expertise: Beginner
Feb 8, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Display an Image in a Particular Position


How can I position an image on the screen the way I would like? The image is bigger than the capacity of the screen and the user can use the scrolling bars to move the image around. This is fine, but I would like to position image on the screen in particular starting position, which in this case is the lower right corner of the image (and not upper left corner of the image, which seems to be the default position).


If you are targeting the major browsers (Netscape Navigator and Internet Explorer), you can position an image anywhere you want. Although the tags used to do this will be different in the two browsers, both can provide the desired end result. Internet Explorer will use either the or

tags. Both of those tags create an invisible area on your page that can be controlled in a number of ways. The difference between the two tags is that the
tag automatically includes a new line so that that there will be white space between the
and whatever follows. The does not automatically include the white space.

Both tags enable you to control a number of attributes of whatever is in between the tags, such as X and Y coordinates. If you surround the tag with a or a

, you can control the location of that image as it appears on the page.

Netscape Navigator provides similar functionality through its tag. If you surround the tag with a you can control the location of that image as it appears on the page. Although you can achieve a similar effect in either browser, they use different tags (objects). You will need to add code near the top of the page to detect which browser is being used and then execute the appropriate code for that particular browser type.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date