Zum Inhalt springen

Problem mit GIFBUILDER (Grösse von Grafiken falsch)

Erstellt am 17. August 2003 · Noch keine Antworten

Tags: Bilder, Frage

martell ·

Hallo zusammen,

ich arbeite noch nicht so lange mit Typo3 und bin gerade dabei, ein horizontales Menu unter Verwendung von GMENU und GIFBUILDER zu implementieren. Nun bin ich auf folgendes Problem gestossen, zum dem ich bisher in der Typo3 Dokumentation und auch den Foren hier noch keine Lösung gefunden habe.

Dies ist der für das Menü zuständige Code meines Setup-Skripts:

temp.menu1 = HMENU
temp.menu1.entryLevel = 0
   #first-level menu-object, graphic
temp.menu1.1 = GMENU
temp.menu1.1{
      #normal state properties
   expAll = 1
   NO{
   10 = IMAGE
   10.file = GIFBUILDER
   10.file.XY = 108,20
   10.file.format = gif
   10.file.backColor = #FFBE00
   10.file.10 = TEXT
   10.file.10.text.field = title
   10.file.10.fontSize = 9
   10.file.10.fontColor = #FF0000
   10.file.10.fontFile = fileadmin/template/main/res/verdana.ttf
   10.file.10.offset = 0, 13
   10.file.10.niceText = 0
   10.file.10.align = center
   }
      #roll-over state properties
   RO < .NO
   RO = 1
   RO.10.file.backColor = #FF0000
   RO.10.file.10.fontColor = #FFBE00
      #current state properties  
   CUR < .NO
   CUR = 1
   CUR.10.file.backColor = #FFFF00
   CUR.10.file.10.fontColor = #FF0000
}

Wie man sieht, sollen Breite und Höhe der Menugraphiken immer 108 bzw. 20 Pixel betragen. Dies ist leider nicht der Fall. Das Ergebnis sind GIF-Graphiken mit der Dimension 120x50 Pixel statt 108x20 Pixel.

Das Interessante daran ist, dass sich die Hintergrundfarbe auf die gewünschten 108x20 Pixel beschränkt und dadurch zwischen den Elementen sehr viel unschöner Whitespace einsteht.

Hier der relevante Ausschnitt des HTML-Quellcodes:

<!--row for menu1 -->
<tr>
  <td id="menu1" colspan="2" width="757" height="25"
       bgcolor="#FFFFFF">
   <A HREF="index.php?id=33" onFocus="blurLink(this);" 
      onMouseover="over('img33_4608_0');" onMouseout="out('img33_4608_0');">
      <img src="typo3temp/m_8ec16923b3.gif" width="120" height="50"
      border="0" alt="Home" name="img33_4608_0"></A>
   <A HREF="index.php?id=41" onFocus="blurLink(this);" 
       onMouseover="over('img41_4608_1');" onMouseout="out('img41_4608_1');">
       <img src="typo3temp/m_01c49fca41.gif" width="120" height="50"
       border="0" alt="Firmenprofil" name="img41_4608_1"></A>
   <A HREF="index.php?id=32" onFocus="blurLink(this);" 
       onMouseover="over('img32_4608_2');" onMouseout="out('img32_4608_2');">
       <img src="typo3temp/m_0239b20b9f.gif" width="120" height="50"
       border="0" alt="Dienstleistungen" name="img32_4608_2"></A>
   <A HREF="index.php?id=31" onFocus="blurLink(this);" 
       onMouseover="over('img31_4608_3');" onMouseout="out('img31_4608_3');">
       <img src="typo3temp/m_0b03c627d8.gif" width="120" height="50"
       border="0" alt="Referenzen" name="img31_4608_3"></A>
   <A HREF="index.php?id=30" onFocus="blurLink(this);" 
       onMouseover="over('img30_4608_4');" onMouseout="out('img30_4608_4');">
       <img src="typo3temp/m_54f64f8a25.gif" width="120" height="50"
       border="0" alt="Kontakt" name="img30_4608_4"></A>
   <A HREF="index.php?id=29" onFocus="blurLink(this);" 
       onMouseover="over('img29_4608_5');" onMouseout="out('img29_4608_5');">
       <img src="typo3temp/m_a67450ab73.gif" width="120" height="50"
       border="0" alt="Sitemap" name="img29_4608_5"></A>
   <A HREF="index.php?id=45" onFocus="blurLink(this);" 
       onMouseover="over('img45_4608_6');" onMouseout="out('img45_4608_6');">
       <img src="typo3temp/m_1c038f2000.gif" width="120" height="50"
       border="0" alt="Impressum" name="img45_4608_6"></A>
  </td>
</tr>

Für Vorschläge, die mir helfen, dieses Problem zu lösen, bin ich Euch im Voraus sehr dankbar!

Martell