Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Jan 2009
    Location
    Victoria Australia
    Posts
    100
    Plugin Contributions
    0

    Default adding a class to button element - CSS button addon

    Hi all, I'm trying to convert my shop buttons to css sliding door/sprites. I'm using the ccs buttons addon.

    I managed it with link buttons by adding <a class="button".... to the appropriate template file. Need being to have a nested span tag inside the element. (hope I'm using all the right terminology here)

    My problem is trying to get it to work with non-link buttons, like 'add to cart.' I'm getting close by hacking at my css_buttons.php file, like this... (buttonnub being where my second image will be)

    Code:
    // replaced <input />s by <button></button>s
        //$css_button = '<input' . $class . ' type="submit" value="' .$text . '"' . $parameters . ' />';
        $css_button = '<buttonnub' . $class .'>'.'<button' . $class . ' type="submit" value="' .$text . '"' . $parameters . '>' . $text . '</button>'.'</buttonnub>';
      }
    I'm sure anyone with php knowledge can see the problems with that, I can see that it adds the second image in a deformed way, but unsure how to get it to work as a second styleable entity. It also throws a lot of invalid errors at me.

    I think I'm barking up the right tree here as this does handle all the non-link buttons at once, but unsure if this method will be doable.

    If anyone has accomplished this, or knows how I might manage it, I'd appreciate a few hints.

    Thanks,
    David

    http://countrytothecore.net
    Last edited by australican; 24 May 2010 at 05:13 AM. Reason: more info

 

 

Similar Threads

  1. v151 How to change the button width that in the INPUT element when the css button is used?
    By su35 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 9 Jun 2013, 04:34 PM
  2. v150 Ultimate-SEO addon conflicting with CSS-Button addon
    By Rony in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 16 Jan 2013, 08:06 PM
  3. How can I make the Header Search button be a CSS button?
    By makehveli in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 26 Aug 2011, 03:01 AM
  4. Adding a more info button alongside buy now button
    By jwburnside in forum General Questions
    Replies: 5
    Last Post: 6 Nov 2010, 01:36 PM
  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