Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2007
    Posts
    13
    Plugin Contributions
    0

    Default CSS add to cart button and style

    Hello,

    I recently changed my buttons to CSS. They seem fine except that I have style="width: 110px;" that is automatically written at the end of the add to cart button code. Because of that the button is too small for my font size and some of the text is hidden.
    I don't know where to remove this style="width: 110px;" from the template code.

    In my product page source you can find
    <!--bof Add to Cart Box -->
    <div id="cartAdd"> the button code is here with style="width: 110px;" in it.

    I use Zencart 1.3.7 in French

    Please help,

    Thanks

  2. #2
    Join Date
    Dec 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: CSS add to cart button and style

    Actually, it's more than that. I have this code defining width on all buttons. It's really a problem.
    Can you tell me where to remove style="width: xxxpx" for all buttons ?

    Thank you

  3. #3
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: CSS add to cart button and style

    I too had this problem. I got it mostly fixed following these two threads last year...

    first thread

    second thread

    HTH

    Rob

  4. #4
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: CSS add to cart button and style

    I got so tired about explaining the differences between the included Zen Cart CSS buttons and the CSS buttons addon, that I actually had given up all of it a long time ago, but I am quite sure using the latest CSS buttons addon will help to solve this issue.

    http://www.zen-cart.com/index.php?ma...roducts_id=272

  5. #5
    Join Date
    Dec 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: CSS add to cart button and style

    Hello,

    Thank you very much. I tried to tweak Zencart code but unsuccessfully. I will try the plugin instead. It looks really interesting.
    Do you know if the the problem is solved in Zencart 1.3.8?
    I guess not as I saw that the plugin was available for that version too but I felt I should ask.

    Kind regards

  6. #6
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: CSS add to cart button and style

    It's really two problems: legacy code, as you noted in your original question. I believe this sort of thing is going away with v1.4, whenever it comes out.

    But there is also some sort of problem with CSS cascading down into forms, and some browsers not dealing well with it. I know that even with the newest version of the CSS Buttons contrib a few buttons on both my sites don't look the same as the others in some browsers (i.e, IE).

    I'll be upgrading my stores to 1.4 and re-designing them somewhat at the same time. We'll see if that cascade problem goes away then.

    Rob

  7. #7
    Join Date
    Dec 2007
    Posts
    13
    Plugin Contributions
    0

    Default Re: CSS add to cart button and style

    Thank you rstevenson,

    Yes pure CSS seems essential today. Beautiful site. I couldn't see your CSS for buttons though.
    I'll let you know how it goes for me.

    I'll just wait for version 1.4 then.

    I also thank paulm for his contribution.

    Have a nice week-end.

  8. #8
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: CSS add to cart button and style

    Quote Originally Posted by UHU2 View Post
    I couldn't see your CSS for buttons though.
    Do you use the Web Developer tools? In them you can select CSS/View CSS and it makes a new window (or tab) showing all the stylesheets used on any page. In the case of my sites, it shows stylesheet.css, stylesheet_css_buttons.css, and print_stylesheet.css. It has little symbols that allow you to collapse each of the stylesheets, so you can view just the one you're looking for.

    There are many other things you can do with the Web Developer tools. For Firefox, just get them from the add-ons section of the Firefox web site, under the web development category.

    Rob

 

 

Similar Threads

  1. v151 Style Quantity Box and Add To Cart Button separately
    By k1ra in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 29 Nov 2013, 06:49 AM
  2. v139h Style quantity and add to cart button on product listing
    By barendfaber in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 16 Aug 2012, 03:39 PM
  3. add to cart button in CSS
    By Luxifer in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 18 Oct 2011, 04:07 AM
  4. CSS Buttons - Change only the add to cart button to an image
    By ksookma in forum General Questions
    Replies: 1
    Last Post: 11 Oct 2011, 04:23 AM
  5. CSS Element for Add to Cart CSS button?
    By modernm in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Jan 2008, 04:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg