Forum Moderators: open
When a box B is relatively positioned, the position of the following box is calculated as though B were not offset.
My page is in the middle position of browser
<body style="width:85%; margin-left:auto; margin-right:auto">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Example</title>
<style type="text/css">
body { margin:0; padding:0; }
#wrapper { width: 85%; margin: 0 auto; } /* This centers the wrapper */
#header { width: 100%; } /* 100% of the parent container, wrapper */
#logo a, #logo img { width: 312px; height: 28px; }
#logo { float: left; width: 350px; height: 28px; margin: 12px 0 0 24px; padding:0; }
#logo span,#logo img { display: block; float: left; }
#logo span { width: 1em; }
.clear-div { clear: both; }
img { border: none; }
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
<p id="logo"><a href="/"><img src="logo.jpg" alt="logo"></a><span>®</span></p>
<!--
you'll probably have other stuff in the header,
otherwise you can delete this
-->
<div class="clear-div"></div>
</div>
</div>
</body>
</html>
I am unable to move the text above the text line using text-align with any value.
I canot use <p> because we need this block of text immediately after the image, at the right side of the image. Using <p> will create a break and another new line starting from the left edge.