Fancybox css issue

72 Views Asked by At

I use fancybox into a html page but i can't style the link to open the fancybox. Normaly i use a class to style the html link but with fancybox the class is already given to the fancybox. I need to change the background color of the link liks this:

background-color: #E9F3D8;

Here is the fancybox script i use into the html page

<script type="text/javascript">
$(document).ready(function() {
    $(".contactForm").fancybox({
        'width'         : 750,
        'height'        : 420,
        'autoScale'     : false,
        'transitionIn'  : 'none',
        'transitionOut' : 'none',
        'type'          : 'iframe'
    });
});
</script>

And the link into this page looks linke this

<a href="../waar-vind-je-ons/contact_form.php" class="contactForm">mail</a>
1

There are 1 best solutions below

0
On

Hard to recreate problem with jsfiddle because all work fine here

<style>
    a {
    background-color: #E9F3D8;
    }
</style>
<script>
$(document).ready(function() {
    $(".contactForm").fancybox({
        'width'         : 750,
        'height'        : 420,
        'autoScale'     : false,
        'transitionIn'  : 'none',
        'transitionOut' : 'none',
        'type'          : 'iframe'
    });
});
</script>



Maybe give more details that we can help you or maybe I do something wrong with recreating.