Seit Tagen versuche ich ein Bild genausogroß wie einen Block zu bringen. Im Block ist aber immer ein Rand vor und nach dem Bild. Ich habe auch schon alle paddings auf 0 gesetzt - ohne Erfolg.
Kann mir irgendwer bei dieser Frage helfen?
Hier mein schon sehr vereinfachter Code:
Hier mein Ergebnis im Anhang: Problem ist der rote Rand, der soll weg.
Vielen Dank für Eure Hilfe.
Nachtrag: wenn man mit negativen Paddings arbeitet, dann würde der Rand verschwinden, aber das kann ja nicht die Lösung sein:
Kann mir irgendwer bei dieser Frage helfen?
Hier mein schon sehr vereinfachter Code:
Code:
<?xml version='1.0' encoding='utf-8'?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xml.apache.org/fop/extensions"> <xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="first" page-width="12mm" page-height="12mm" > <fo:region-body region-name="xsl-region-body" ></fo:region-body> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="first"> <fo:flow flow-name="xsl-region-body"> <fo:block-container position="absolute" top="1mm" left="1mm" width="10mm" height="10mm"> <fo:block background-color="red"> <fo:external-graphic content-width="10mm" content-height="10mm"> <xsl:attribute name="src">igel.jpg</xsl:attribute> </fo:external-graphic> </fo:block> </fo:block-container> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet>
Vielen Dank für Eure Hilfe.
Nachtrag: wenn man mit negativen Paddings arbeitet, dann würde der Rand verschwinden, aber das kann ja nicht die Lösung sein:
Code:
<fo:block background-color="red" padding-top="-1mm" padding-bottom="-2mm"> <fo:external-graphic content-width="10mm" content-height="10mm"> <xsl:attribute name="src">igel.jpg</xsl:attribute> </fo:external-graphic>
Comment