WebsiteBaker Support (2.8.x) > Templates, Menus & Design

image as submit button

(1/2) > >>

msherifam01:
Hi,

In wb bakery module i want to change the submit buttons to image.

original code: <input type="submit" name="add_to_cart" class="mod_bakery_bt_add_f" value="[ADD_TO_CART]" />

my code: <input type="image" src="my source" name="add_to_cart" class="mod_bakery_bt_add_f" value="[ADD_TO_CART]" />

my code does work in chrome but not in IE and Mozilla.

Please advice

jacobi22:
1. Please use the bakery threads for questions about bakery - thanks

2. use css only für button images. here an example
for my actual shop i use 4 different images with a width from 140px, 175px, 270px and 600px
and a subfolder for the buttons called bakery/images/bakery_buttons

search in your source code for the css-class like

--- Quote ---<input type="submit" name="add_to_cart" class="mod_bakery_bt_add_f" value="[ADD_TO_CART]" />

--- End quote ---

here my css

--- Code: ---.mod_bakery_bt_cart_f {
height:30px;
width:140px;
background: url("images/bakery_buttons/menuitem140.png") no-repeat scroll center center transparent;
border: 0 none !important;
cursor: pointer;
padding: 0;
margin-top:32px;
}
--- End code ---

msherifam01:
Sorry for the wrong category..

When i use css as yours it doesnot have any impact.

i am running the code on localhost. will it behave different if i use server?

jacobi22:
it doesnt work, if you use a code like this
<input type="image"


--- Quote ---When i use css as yours it doesnot have any impact.
i am running the code on localhost. will it behave different if i use server?
--- End quote ---

no, why?
if its not work on localhost, something goes wrong. check the path to your own button image and clear the browser cache after every code change

msherifam01:
Thanx buddy...
its working fine...
i didnt register the css. thats why there was no impact when i change css.

<?php
        if(function_exists('register_frontend_m odfiles')) {
                register_frontend_m odfiles('css');
                register_frontend_m odfiles('js');
        }
?>
did this.
work like charm...

Navigation

[0] Message Index

[#] Next page

Go to full version