Home Forums WP Background Takeover Custom CSS per ad for different layouts

Tagged: , ,

This topic contains 1 reply, has 2 voices, and was last updated by Avatar Jay Gajjar 10 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #23207
    Peter Monk


    I’ve just recently purchased this plugin and I’m liking it so far.

    The only issue I’ve come across is that depending on whether the background skin I’m adding uses imagery across the top of the post content instead of just down the sides, I need to manually add some CSS to push the post content down a little so I can see my top imagery.

    This in itself is not an issue but it means that I can’t easily have some ads that use top imagery and some that don’t, and scheduling automatic ad changes between ads of these different layouts becomes impossible because I can’t also automatically update my custom CSS to suit.

    It would be great if I could, for example, specify the CSS identifier of my post content area and then on a per ad basis indicate whether the post content needed to be moved down and if so how much, and have that CSS kick in when that ad becomes active.

    Hope that makes sense!

    I assume there is no simple solution to this?


    Jay Gajjar

    Hello Peter,

    Welcome to the community :)

    We understand the problem you are facing, and here is my suggestion.

    The DOM element for your site would be .tdc-content-wrap.
    Therefore you can use JS or jQuery to check if that particular DOM element has a background image or not – if it does, you can add css to that particular element.

    Example jQuery Code
    if ($(‘.tdc-content-wrap’).css(‘background-image’) != ‘none’) {
    $(“ELEMENT TO BE PUSHED DOWN”).css(“margin-top”,”10%”);

    Also if you wouldn’t mind, we have a couple of other suggestions –

    For the following element – .wpb_row, you could give it a white background. Therefore your content will always be readable.

    Also if for that specific DOM element – for which you are using our plugin, doesn’t have any other background image, you can use the css property of background-position-y to vertically position the image if ever need be.

    Please let us know if the jQuery code method works for you,

    Thank you,

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Pin It on Pinterest