Solved

How position image using <div> tag?

Posted on 2011-02-24
2
771 Views
Last Modified: 2012-05-11
I am new to asp.net 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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

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

<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""/>
    </div>

</body>

</html>

Open in new window

0
Comment
Question by:EYoung
2 Comments
 
LVL 52

Accepted Solution

by:
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""/>
    </div

Open in new window

0
 
LVL 7

Author Comment

by:EYoung
ID: 34974563
Yep.  That was it.  Thank you.
0

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 asp.net 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 (http://www.enterprise.efax.com), 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