Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2006
    Posts
    6
    Plugin Contributions
    0

    xhtml problem Prevent &nbsp characters being added to CSS buttons?

    Hi All,

    I'm just trying to get my head around customising Zen Cart, I switched to CSS buttons in the administration system, but the code for that is being spat out by the system is putting &nbsp (non breaking spaces) before and after the text button.

    How do I stop it doing this? It looks untidy when you have mouseover showing an underline, having the underline extend into an empty space on each side of the word - eg: _Back_

    Can anyone help?

    Thanks.
    Matt.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Prevent &nbsp characters being added to CSS buttons?

    This is gonna sound like I'm dodging the question ... but ... I'm not sure why you'd use an underline on a button when using CSS-based buttons. I'd be more inclined to change the color to denote hover-effect.

    Granted, it does depend on the audience, and if "they" are used to underlines, I can see doing it... it just seems to defeat the purpose in my mind. Maybe I need to think inside the box more ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Nov 2006
    Posts
    6
    Plugin Contributions
    0

    Default Re: Prevent &nbsp characters being added to CSS buttons?

    Because the "buttons" are just text links - the theme I'm using doesn't seem to actually show any sort of physical box around the text label, and that's the way I like it.

    I just want ordinary links, like the rest of the navigation elements in the store - text that gets an underline when you mouseover it.

    Cheers
    Matt.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Prevent &nbsp characters being added to CSS buttons?

    As you wish.

    /includes/functions/html_output.php
    in the zenCssButton() function, you'll see a line like this:
    Code:
       $css_button = '<span class="' . $mouse_out_class . '" ' . $css_button_js . $style . $parameters . ' >&nbsp;' . $text . '&nbsp;</span>';
    Remove &nbsp; as desired
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Nov 2006
    Posts
    6
    Plugin Contributions
    0

    Default Re: Prevent &nbsp characters being added to CSS buttons?

    Woot! - you rock.

    Cheers for that.

    Matt.

 

 

Similar Threads

  1. Css Buttons & In Store Only
    By jeverd01 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 7 Mar 2010, 04:19 PM
  2. Disappearing &nbsp;&nbsp;
    By Sunabac in forum General Questions
    Replies: 1
    Last Post: 3 Feb 2007, 03:58 AM
  3. prevent expected products from being added to cart
    By kiddo in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 28 Dec 2006, 07:59 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