Friday, May 23, 2014

HTML TUTORIAL PART 46

HTML TUTORIAL PART 46

PROBLEM:
LOOK AT THE FOLLOWING:

This is a heading with an absolute position

With absolute positioning, an element can be placed anywhere on a page. The heading below is placed 100px from the left of the page and 150px from the top of the page.





SOLVED:
THE CODE BELOW MADE THE HTML TIP:

<!DOCTYPE html>
<html>
<head>
<style>
h2
{
position:absolute;
left:100px;
top:150px;
}
</style>
</head>

<body>
<h2>This is a heading with an absolute position</h2>
<p>With absolute positioning, an element can be placed anywhere on a page. The heading below is placed 100px from the left of the page and 150px from the top of the page.</p>
</body>

</html>

No comments:

Post a Comment