Solved

How position image using <div> tag?

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 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