Forum Moderators: not2easy
.headertext {
position: absolute;
left: 460px;
top: 65px;
}
.headertextsub {
position: absolute;
left: 460px;
top: 100px;
width: 300px;
}
and 2) in the body:
<div class="headertext">
<h1>Header</h1>
</div>
<div class="headertextsub">
<h5>Subheader</h5>
</div>
Absolute positioning is measured from the bounds of the containing element, which I am guessing is the <body> in your case. Different browsers have different defaults for margin (and padding) - have you set margin rules for the <body> element? That might do it.
Also, are you sure you want to use absolute position in this case? How about just letting the elements flow with the document. When they first begin to position elements with CSS, people often have a feeling that they always (or often) need to use relative and absolute position -- when that often complicates things unnecessarily.
The natural document flow is often the best place to start - no extra positioning rules at all, and that also helps to generate cleaner mark-up. You can always give your h tags some margin or padding if you want to see them indented.