Hallo an alle,
ich habe folgendes Problem:
Ich habe in der html_output.php meine Button als CSS definiert:
In meiner stylesheet.css habe ich die Werte gesetzt:
Wie schaffe ich es,dass z.B. in der products_new.php bei folgendem Code ein Wechsel bei background-image: von butthg3.gif zu butthg2.gif erfolgt?
Es betrifft dieses tep_image_button.
ich habe folgendes Problem:
Ich habe in der html_output.php meine Button als CSS definiert:
PHP-Code:
function tep_image_button($image, $alt = '', $parameters = '') {
global $language;
$image = '<div class="cssbutton">' . $alt . '</div>';
return $image;
}
In meiner stylesheet.css habe ich die Werte gesetzt:
Code:
.cssbutton {
color : #0000FF;
width : 150px;
font-weight: normal;
font-family: Tahoma;
font-size: 12px;
cursor: pointer;
text-align:center;
border: 1px solid #008cc8;
border-spacing: 1px;
background-image: url(images/butthg3.gif);
}
.cssbuttonsubmit {
color : #0000FF;
width : 150px;
font-weight: normal;
font-family: Tahoma;
font-size: 12px;
cursor: pointer;
text-align:center;
border: 1px solid #008cc8;
border-spacing: 1px;
background-image: url(images/butthg3.gif);
}
.cssbutton:hover {
color : #FF0000;
width : 150px;
font-weight: normal;
font-family: Tahoma;
font-size: 12px;
cursor: pointer;
text-align:center;
border: 1px solid #008cc8;
border-spacing: 1px;
background-image: url(images/butthg2.gif);
}
.cssbuttonsubmit:hover {
color : #FF0000;
width : 150px;
font-weight: normal;
font-family: Tahoma;
font-size: 12px;
cursor: pointer;
text-align:center;
border: 1px solid #008cc8;
border-spacing: 1px;
background-image: url(images/butthg2.gif);
}
Wie schaffe ich es,dass z.B. in der products_new.php bei folgendem Code ein Wechsel bei background-image: von butthg3.gif zu butthg2.gif erfolgt?
PHP-Code:
<tr>
<td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" valign="top" class="main"><?php echo '[url="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '"]' . tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '[/url]'; ?></td>
<td valign="top" class="main"><?php echo '[url="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '"][b]<u>' . $products_new['products_name'] . '</u>[/b][/url]
' . '
' . TEXT_PRICE . ' ' . $products_price; ?></td>
<td align="right" valign="middle" class="main"><?php echo '[url="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id']) . '"]' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '[/url]'; ?></td>
</tr>
<tr>
<td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>

Kommentar