Hi,
ich möchte aber, dass sich die größe eines Blockes auf die Bildschirmbreite anpasst. wenn ich aber versuche, das mit width: auto zu machen wird die Grafik garnicht erst angezeigt.
Natuerlich, weil sich das mit der absoluten Positionierung, so wie du sie anwendest, beisst:
left: 0;
top: 0;
width: auto;
position: absolute;
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width:
"3. 'width' and 'right' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit."
Und shrink-to-fit heisst im Grunde genommen, so gross wie das, was drin ist.
Moeglichkeiten:
- Verzichte auf absolute Positionierung; das sollten Anfaenger, die ihre Auswirkungen noch nicht abschaetzen koennen, sowie lieber tun.
- Gebe auch einen Wert fuer right an, wenn moeglich (und dir IE <= 6 dabei egal sind).
- Gebe eine Breite an.
MfG ChrisB
--
„This is the author's opinion, not necessarily that of Starbucks.“
„This is the author's opinion, not necessarily that of Starbucks.“