Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to start new HTML on a specific position on the screen?

Status
Not open for further replies.

kippie

Technical User
Nov 8, 2001
158
Is it possible to start a new HTML somewhere else than as usual? I mean it usually begins in the top left corner of the screen? Can I make it for example so that it starts at the position top: 200 and left: 150?

 
You could use the css positioning

wrap your content in a div with the following style rules:

div {
position: absolute;
left: 150px;
top: 200px;
}

MrBelfry
 
Sorry, probably I'm not clear. As I do what I think you mean I make a HTML like:

<html>
<head>
<meta http-equiv=&quot;content-type&quot; content=&quot;text/html;charset=iso-8859-1&quot;>
<STYLE>
BODY {
margin-top:0;
margin-left:0;
margin-right:0;
margin-bottom:0;
padding-top:0;
padding-left:0;
padding-right:0;
padding-bottom:0;
}
</STYLE>
</head>
<body>
<div id=&quot;blocks&quot; style=&quot;position:absolute; left:150px; top: 200px; width: 198; height: 295;&quot;>
<img src=&quot;jeanetbrecht2opt.jpg&quot; border=&quot;0&quot; alt=&quot;Image 1&quot; width=&quot;198&quot; height=&quot;295&quot;>
</div>
</body>
</html>

But then the image starts at the position left: 150px; top: 200px, but the HTML itself start at top:0; left0. Is there a way to solve this?

Kippie
 
What Mr. Belfry showed you created an invisible block that was 150px off the left side and 200px of the top side. So, everything you need to do is put all your code inside the <div> </div> tag. Other than that, I don't know any way of doing it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top