Hallo,
ich habe eine ul#id, der ich mit ul#id:before { content:url(blabla.jpg); } eine Grafik vorangestellt habe. Die Breite der Grafik entspricht der ul#id und passt auch soweit. Nur: zwischen oben und unten klafft eine etwa 5 Pixel große Lücke.
Wenn ich dasselbe mit :after mache, passt sich die Grafik nahtlos an meine ul#id an. Wäre schön, wenn mir jemand sagen kann, woran das liegen könnte. Hier mal Code + Screenshot:

Danke!
Grüße,
Quabbe
ich habe eine ul#id, der ich mit ul#id:before { content:url(blabla.jpg); } eine Grafik vorangestellt habe. Die Breite der Grafik entspricht der ul#id und passt auch soweit. Nur: zwischen oben und unten klafft eine etwa 5 Pixel große Lücke.
Wenn ich dasselbe mit :after mache, passt sich die Grafik nahtlos an meine ul#id an. Wäre schön, wenn mir jemand sagen kann, woran das liegen könnte. Hier mal Code + Screenshot:
Code:
#content ul.brick { width:216px; float:right; margin:0 14px; }
#content ul.brick:before { content:url(../images/bg-bricktop.jpg); }
#content ul.brick:after { content:url(../images/bg-brickbottom.jpg); }
#content ul.brick li { width:216px; float:right; background:url(../images/bg-brick.jpg) no-repeat 0 0; }
#content ul.brick li a { width:216px; display:block; background:url(../images/bg-brick.jpg) no-repeat -216px bottom; padding:13px 20px; font-weight:bold; font-size:15pt; color:#a31; }
#content ul.brick li a em { display:none; }
#content ul.brick li a:before { content:url(../images/bg-adot.jpg)" "; }
#content ul.brick li a:hover, #content ul.brick li a:focus { color:#d53; }
#content ul.brick li a:hover em, #content ul.brick li a:focus em { display:block; font-size:9pt; color:#a31; font-weight:normal; margin:0 18px; }

Danke!
Grüße,
Quabbe