Solved

How position image using <div> tag?

Posted on 2011-02-24
2
773 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

820 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