Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    May 2011
    Thanked 0 Times in 0 Posts

    Button code not working in a div

    My url:www.accidentinsuranceforfree.com
    I am using nested divs and wanted to put a button. I used the following in my custom_functions.php file:

    function sButton($atts, $content = null) {
    extract(shortcode_atts(array('link' => '#'), $atts));
    return '<a class="button" href="'.$link.'"><span>' . do_shortcode($content) . '</span></a>';
    add_shortcode('button', 'sButton');

    as for the CSS:
    a.button {
    display: inline-block;
    font-size: 13px;
    font-weight: bold;
    height: 31px;
    padding-right: 10px;
    color: #183f4c;
    background: transparent url(images/sm_a.png) no-repeat top right;
    text-decoration: none;

    a.button:hover {
    color: #fff;
    background-position: bottom right;
    text-decoration: none;

    a.button span {
    display: block;
    line-height: 14px;
    padding: 8px 0 9px 10px;
    background: transparent url(images/sm_span.png) no-repeat top left;

    a.button:hover span {
    color: #fff;
    background-position: bottom left;

    then I used the following for generating the button:
    [button link="#"]Go to Google[/button]

    On normal pages, this does generate a button, but inside my divs it goes uninterpreted and displayed as it is. Any help please? Thanks.
    Attached Thumbnails Attached Thumbnails Button code not working in a div-problem4.jpg  


Posting Permissions

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