Center ad under menu

  • lalamums

    #6582

    Hello!

    Im in the making of a new site and need some help, here is the site Rhodos guide

    I have an ad under the navigation bar..

    I would like to make the leaderboard be 1100px or if thats impossible i would like to center it with same apperance

    I tried the center html code but it doesnt look good because u see the background picture.. I dont want any space between the navigation bar and the slider.

    But the best solution would be to make the leaderboard more wide to 1100 px

    here is the code

    <script type="text/javascript" src="http://api.skyscanner.net/api.ashx?key=3a55e635-ab67-4aee-9eb8-8aa96a83d70f"></script>
    <script type="text/javascript">
    skyscanner.load('snippets','2',{cultureid:'sv'});
    function main(){
    var snippet=new skyscanner.snippets.SearchPanelControl();
    snippet.setCurrency('SEK');
    snippet.setUrlParam('associateid','AFF_NTW_00074_00010');
    snippet.setUrlParam('p','224462');
    snippet.setUrlParam('a','2187637');
    snippet.setUrlParam('g','20834930');
    snippet.setClickUrl('http://clk.tradedoubler.com/click?p=224462&a=2187637&g=20834930&url=@@url@@');
    snippet.setShape('leaderboard');
    snippet.setDeparture('se');
    snippet.setDestination('rho');
    snippet.draw(document.getElementById('snippet_searchpanel'));
    }
    skyscanner.setOnLoadCallback(main);
    </script>

    <div id="snippet_searchpanel" style="width: auto; height:auto;"></div>
    Mod

    Kenneth John Odle

    #34937

    Try adding this to custom CSS

    #snippet_searchpanel {
    margin-left: auto;
    margin-right: auto;
    }

    If that doesn’t work, add this before the above code:

    <div style="margin-left: auto; margin-right: auto;">

    and this after the above code:

    </div>

    Moved to Support. Please post in the correct section next time.

    Put code in between backtick (

    Code:
    `

    ) characters. It’s usually located above the Tab key on your keyboard.

    lalamums

    #34938

    Nothing happens?! the ad is still at the left side..

    Mod

    Kenneth John Odle

    #34939

    I gave you two possible solutions. Which did you try?

    Have you checked with the website that provided the code?

    lalamums

    #34940

    I tried both, none of them made any difference.

    Maybe i explained bad, my english isnt the best. I will try to explain again.

    If you take a look at the website now.. between the navigation bar and the slider I have this skyscanner widget. There is two solutions that would make me happy, either of them would be good.

    1.

    If it is possible I want the widget to be 1100px so it is exactly the same width as the container with content and sidebar.

    2. If that cant be done by change or add something in the code I copied in my first post..

    I want the widget to be exactly as it is now, except that i want it to be in the middle and not left like it is now..

    Either of this two options would be good enough.

    I hope it can be done, please help me!

    Thanks and regards

    Prasanna SP

    #34941
    #snippet_searchpanel {
    margin: 0 auto;
    }

    will make it,

    1WkNZ.png

    lalamums

    #34942

    Where do I put that code exactly?

    Prasanna SP

    #34943

    Graphene Options –> Display –> Custom CSS or child-theme’s style.css

    lalamums

    #34944

    When i put it in child theme my website crashed 😮

    Prasanna SP

    #34945

    Where did you put the code in the child theme? That shouldn’t crash your site if you add that to style.css

    You can also put that code in custom css

    lalamums

    #34946

    Now it worked! Thanks

    But is it possible to change the size of the widget to 1100px?

    and another question, is it possible to put something on the right side of the widget to fill out the empty space because the widget is to small for the container?

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

You must be logged in to reply to this topic.