Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How position image using <div> tag?

Posted on 2011-02-24
2
Medium Priority
?
776 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

670 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