Home > Enterprise >  How to reposition in CSS the block of Tags completely at the top of the homepage at the level of the
How to reposition in CSS the block of Tags completely at the top of the homepage at the level of the

Time:03-26

I would like to position the block of Keywords "Beautiful, business, Cities, Macbook, World" visible on the screenshot just above "Main Stories, Editor's Pick, Trending Stories" at the level of the part framed in red on the following screenshot: .

That is to say that I would like to move the content of the widget CSS class widget_block widget_tag_cloud to the part framed in red on the following screenshot:.

I tried adding a margin-bottom: 121px; on the class widget in the HTML-CSS code inspector of the browser to see the rendering but it completely shifted the page.

I therefore request your help to help me reposition the Tags whose content of the CSS class is widget widget_block widget_tag_cloud and place them at the top, just above the block "Main Stories, Editor's Pick, Trending Stories" and more precisely on the part circled in red on the screenshot:.

Thank you in advance.

CodePudding user response:

Yes, I have checked your issue. And the solution is just you can use the inserBefore on jquery like the below code.

jQuery("section#block-14").insertBefore(".gutter-parent-10 > .col-lg-5.col-xl-6");

After that, you can add the below style. So I hope you can get exactly what you want

section#block-14 {
    width: 100%;
}

CodePudding user response:

Thank you for your reply. But I would like to know at what level should I add the JavaScript code (Jquery) because being us Wordpress, there is no possibility to customize JavaScript code as it is possible to do with CSS.

So how could I add the Jquery Code:

jQuery("section#block-14").insertBefore(".gutter-parent-10 > .col-lg-5.col-xl-6");

???

  • Related