Okay
  Public Ticket #2538033
clickable Div
Closed

Comments

  •  1
    craig6586 started the conversation

    Hi, I am trying to style my own buttons by using a background image and div's, but when I attempt to make the divs clickable by adding a <a href> tag to the div (in the front end of wp bakery), when I save it it, removes the <a href> tag. Is this something that wp bakery does? Is there anyother way I can make this div clickable?


    Thanks

  •  1,069
    Art replied

    Hi Craig,

    Can you please explain how you are trying to make the div clickable, if the code is wrong it will be automatically reverted as you cannot make a whole div clickable by adding the <a href> tag around it. Instead of using a div, it should be a complete a tag.

  •  1
    craig6586 replied

    Hi Art,

    Thanks for replying. I am using the below CSS and html which gives me the result I am looking for in terms of the button changing, but now I want the button to be clickable, but when I put the <ahref> tag around it, wp bakery removes it.

    I would be okay with not having the text designed on the button and instead having the text as a link overlaying the background button image, but if i try that and i try center the text in the image, I need to use multiple   but once again wp bakery seems to remove all but one  

    I'm not to sure what you mean when you say it should be a complete tag.

    Thanks for your help, I realize that this may be beyond the scope of the service one may expect from you when buying a theme of yours

    button example is here http://thekindness.agency/02-2/

    HTML

    <div id="asks" style="text-align: center;"></div>

    CSS

    #asks {
      width: 373px;
      height: 147px;
    yellow.png
    }

    #asks:hover {
    yellow2.png
    }




  •  1,069
    Art replied

    Hi there,

    Try using this HTML instead:

    <a href="#" id="asks" style="text-align: center;"><br /></a>
    

    If it does not work then please share your site credentials here, because we need to login to your site. Your information is safe (private) in this thread.

    To include your credentials click Insert Credentials button in editor toolbar. (See how)

  •  1
    craig6586 replied

    yeah didn't work Art. When I save it, it seems like wp bakery converts the html to:

    < a id="asks" style="text-align: center;" href="http://thekindness.agency">



  •  1,069
    Art replied

    Hi Craig,

    I have asked for the site credentials in my last reply, so I can see what can be done and if this can somehow be tweaked even though WPBakery Page Builder changes it automatically.

  •   craig6586 replied privately
  •  1,069
    Art replied

    Hi again,

    I have added a display: block; to the #asks selector and now it is showing properly.

    Also the margin: 0 auto; is for centering it.

  •  1
    craig6586 replied

    hey thanks Art

  •  1,069
    Art replied

    You're welcome, have a great daysmile.png