Hallo,
ich möchte, dass ein Element zum linken Rand 100 Pixel Abstand hat. Zum rechten Rand 15 Pixel Abstand. Dazwischen soll das Element sich flexibel der Auflösung anpassen.
Ich hab es mal so gemacht:
HTML-Dokument:
<div class="main_text">Hier kommt der Text hin</div>
CSS-Datei:
.main_text
{
position:absolute;
top:0px;
left:100px;
width:100%;
margin:0 15px 0 0;
padding:0;
font-size:12px;
font-weight:normal;
border-style:solid;
border-width:1px;
border-color:#2F4F88;
background-color:#D1E6FB;
color:#000000;
z-index:99;
}
Aber leider klappt das überhaupt nicht. Es ragt zum rechten Rand hinaus (egal ob IE/Mozilla/Opera). Zum nachvollziehen ist das Ganze übrigens in einer Testdatei unter http://www.netradio-live.de/test.htm abrufbar.
Wie kann ich das Problem lösen?
Grüsse
Michael