Hallo!
Informiere dich, worauf sich absolute Positionierung bezieht.
Hab http://de.selfhtml.org/css/eigenschaften/positionierung.htm#position@title=hier nachgelesen und dadurch Lösung:
HTML:
<div style="margin-top:10px" class="windowbox">
<h2 class="titelbox" style=""><span class="titeltext">Film</span><div class="sysmenu"><button>X</button></div></h2>
<div class="windowcontent">Inhalt des Fensters</div>
</div>
CSS:
.windowbox
{
border:1px solid #ccf;
width:330px;
}
.titelbox
{
background-color:ccf;
font-family:Helvetica;
font-size:0.8em;
margin:0;
height:1.5em;
}
.titelbox
{
position:relative;
}
.titelbox .sysmenu
{
position:absolute;
top:0;
right:0px;
}
.sysmenu button
{
border:1px solid #eef;
font-size:0.8em;
font-weight:bold;
background:#ddf;
width:28px;
}
lg cssx