
Originally Posted by
LavernGingerich
Why does the padding move it to the left then?
Hello
? the only difference i get is when i wrap or not wrap the absolute
wrapped
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>12345 12345 12345 12345 12345</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- saved from url=(0022)http://www.domain.com/ -->
<style type="text/css">
#main {
clear: both;
text-align: center;
padding:20px 0;
position:relative;
background:#ffffcc;
}
.box1 {
width: 163px;
height: 246px;
position: absolute;
top: 61px;
right: 37px;
background:#ccffcc;
}
</style>
<script type="text/javascript">
</script>
</head>
<body>
<div id="main">main
<div class="box1">box1</div>
</div>
</body>
</html>
Bookmarks