Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / CSS default style for buttons works for some only

CSS default style for buttons works for some only

Locked

Views: 1,659

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
29 Nov 2010, 10:30 AM
#1
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

CSS default style for buttons works for some only

Hi there

I would like to have a css default style for all buttons in the website. So, I edited css and only few buttons have default style some not. I have no clue what causes this. Any idea?

http://www.millers-graphics.co.uk/artstraws-p-2095.html

Write Review and Tell a friend buttons don't have a default style like Add to basket button..

Lukas

29 Nov 2010, 8:35 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: CSS default style for buttons works for some only

They do now! What did you do?

29 Nov 2010, 9:03 PM
#3
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

Re: CSS default style for buttons works for some only

No lat9, they don't look default. There is still css style applied to all of them; had to put them back as they were until I figure out how make them look default. When I try to do some changes, the default state works for some buttons only, others seem to be still css styled. Is this make sense?

Lukas

30 Nov 2010, 1:07 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: CSS default style for buttons works for some only

I guess I don't understand what you mean by "the default css style", but perhaps you are noticing a difference in styling between a submit button (like add-to-cart) and a link button (like write-a-review or tell-a-friend).

Are you using the Zen Cart default CSS button handling?

30 Nov 2010, 1:25 PM
#5
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

Re: CSS default style for buttons works for some only

Hmm, maybe I am naming it wrong...but here is the picture of what I want to achieve:

Attachment #8484

and below is the css that styles most of the buttons:

/* css buttons */

.cssButton, .cssButtonHover { }

/* adding the styles below might be needed if the default button width is changed */

.small_delete, .button_prev, .button_next, .button_search { }

.button_sold_out_sm, .button_sold_out, .button_update_cart, .button_checkout {
text-decoration: none;
width:5em;
display: block;
}

.button_login { }

.button_return_to_product_list, .button_add_selected {

}

.button_in_cart{
/width: 19em;/
}

.button_submit {
width: 60px;
}

.button_update_cart {
color: red;
}

.button_update_cartHover {
color: black;
}

/.innerbox#headernavcenter .boxtext .button_search {
display:inline;
}
/

/* Added by Andy for Millers */

.button_search { float: right; }

.button_viewRange, .button_write_review, .button_TellAFriend, .button_continue_shopping, .button_shipping_estimator, .button_checkout { }

.button_back { }

.button_sold_out_sm {
margin-top: 5px;
}

Lukas

30 Nov 2010, 1:47 PM
#6
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: CSS default style for buttons works for some only

You might try changing /includes/templates/millers/css/stylesheet_css_buttons.css, in the cssButton, .cssButtonHover selector:

  1. Remove "times new roman" and georgia from the font-family so that verdana and arial are the first choices
  2. Remove the font-weight: bold;

Those changes will get you closer to the picture you posted.

30 Nov 2010, 2:23 PM
#7
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

Re: CSS default style for buttons works for some only

It did actually, but not for every button on a web. I removed all selectors for cssButton, .cssButtonHover but still Write-a-review or tell-a-friend buttons wont change to default..sigh.. :frusty:

Lukas

30 Nov 2010, 8:48 PM
#8
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,102
Plugin Contributions:
56

Re: CSS default style for buttons works for some only

You could try editing (core file) /includes/functions/html_output.php to change the zenCssButton function. For v 1.3.9f, the change would be on line 331; change this:

    if ($type=='button'){
// link button
   $css_button = '<span class="' . $mouse_out_class . '" ' . $css_button_js . $style . ' > ' . $text . ' </span>'; // add $parameters ???
    }
    return $css_button;

to this:

    if ($type=='button'){
// link button
   $css_button = '<button class="' . $mouse_out_class . '" ' . $css_button_js . $style . ' > ' . $text . ' </button>'; // add $parameters ???
    }
    return $css_button;
1 Dec 2010, 10:20 AM
#9
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

Re: CSS default style for buttons works for some only

Hi lat9

Thanks for your reply. I did like you suggested and it works. It looks just like I wanted and I was going to leave it but I checked how it works in IE, Firefox and Chrome and there seems to be an issue in IE - the buttons for 'Previous', 'Return to product list', 'Next' and few more don't work at all. There isn't happening anything when I click them..So I put everything back as it was, untill I figure out what is the problem. Thank you kindly for your help

Lukas