How position image using <div> tag?

Posted on 2011-02-24
Last Modified: 2012-05-11
I am new to and starting to develop a web page.  See attached code.  I am using Visual Studio 10 and Visual Basic to develop a Web Site project.

The problem I am having is not being able to position the image at a different place on the web page.  No matter what I enter for the top, left, and position attributes, the image always displays in the top left corner.

Thanks for the help.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">

<head id="Head1" runat="server">
    <title>The Territory Ahead</title>

<body background="Images/Beige1_Background.gif">

    <div style="top:1600; left:1400; position:absolute; z-index: 1; visibility:visible">
        <img alt="" src="Images/TTALogoRedSandButton.gif""/>



Open in new window

Question by:EYoung
LVL 52

Accepted Solution

Carl Tawn earned 500 total points
ID: 34973842
I think it is because you are not quantifying your "top" and "left" values (i.e. you are telling it a number but not a unit type).

Try it as:
    <div style="top:1600px; left:1400px; position:absolute; z-index: 1; visibility:visible">
        <img alt="" src="Images/TTALogoRedSandButton.gif""/>

Open in new window


Author Comment

ID: 34974563
Yep.  That was it.  Thank you.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Internet Business Fax to Email Made Easy - With  eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now