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

    [Lightbox] and <a class=""> I am trying to get them to work together.

    Code:
    [lightbox href="http://vimeo.com/" class="superbutton"]Example[/lightbox]
    
    <a class="superbutton"> </a>
    That is the simple code I am working with ^...

    <a class="superbutton">Text here</a> is the CSS code for a button, when clicked upon I want my light box to appear...


    [lightbox href="http://vimeo.com/" class="superbutton"]Example[/lightbox]

    This code ^ works and it creates a clickable text that brings up a lightbox, instead of that plain "example" text I want to style it giving it the superbutton attribute and bringing up a lightbox as well...

    I am having a hard time merging the code to get it to function properly, I am sure it is a simple thing I am missing, I am hoping someone can point it out for me.

    Thanks

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,624
    Thanks
    6
    Thanked 1,001 Times in 974 Posts
    I don’t get it. You are saying:

    Quote Originally Posted by visumdesignz View Post

    [lightbox href="http://vimeo.com/" class="superbutton"]Example[/lightbox]

    This code ^ works and it creates a clickable text that brings up a lightbox
    And then in the same sentence you say:

    Quote Originally Posted by visumdesignz View Post

    instead of that plain "example" text I want to style it giving it the superbutton attribute and bringing up a lightbox as well...

    So, what now? Does it bring up the lightbox or not? It looks like a Wordpress plugin code that is converted to an anchor eventually, right? If you want to give it a different style you have to edit the CSS file and use the class as selector, e. g.:
    Code:
    .superbutton {
      color: red;
    }

  • #3
    New Coder
    Join Date
    Mar 2012
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok yes it is a WP lightbox plugin... This code triggers the lightbox when you click example

    Code:
    [lightbox href="http://vimeo.com/" class="superbutton"]Example[/lightbox]
    Ok thats that..

    _________________________________________________________________________


    This code creates a button, (this is a WP theme)

    Code:
    <a class="superbutton"> play video</a>
    OK, now my objective is to create a button that says "play video" then when clicked on it opens that lightbox...

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,624
    Thanks
    6
    Thanked 1,001 Times in 974 Posts
    If I understand that correctly, why aren’t you just doing
    Code:
    [lightbox href="http://vimeo.com/" class="superbutton"]play video[/lightbox]
    then?

  • #5
    New Coder
    Join Date
    Mar 2012
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by VIPStephan View Post
    If I understand that correctly, why aren’t you just doing
    Code:
    [lightbox href="http://vimeo.com/" class="superbutton"]play video[/lightbox]
    then?
    Yeah that was one of the first things I tried.. the problem with that, is that it does not style the button.... Let me show you an example.... at www.visumdesignz.com on the first slider
    Last edited by visumdesignz; 03-05-2012 at 08:56 PM.

  • #6
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,624
    Thanks
    6
    Thanked 1,001 Times in 974 Posts
    Well, obviously adding a class to the plugin tag doesn’t work (it actually adds that to the value of the href attribute:
    Code:
    <a href="http://vimeo.com/?lightbox[class]=superbutton" class="lightbox" rel="" class="lightbox">
    (And it adds the lightbox class twice? Might be a buggy plugin then.)

    But anyway, the solution to your problem is to address the element differently. For example, the link is inside an element with the class “nivo-caption”. You could then do something like .nivo-caption a {…} or if you want to be a little more specific .nivo-caption .lightbox {…}


  •  

    Posting Permissions

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