1

I'm trying to make an element sticky on my article.

This is the element- Name: WP-Review

<div Class=sticky-review>
 <?php echo do_shortcode("[wp-review]"); ?>
</div>

I tried CSS- position: fixed; but that makes the element sticky for the whole site and appear even out of the template part on my article.

I use the element on my comments template. I want its appearance just like basic WordPress sidebar but for comments, not the post content. My Post content width is 100%. while comments width is 70% and the element is 30%.

I have no Idea if CSS or jQuery will do the trick and how? Can anyone Help me?

closed as off-topic by Jacob Peattie, fuxia Aug 2 '18 at 12:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • I don't understand how can this be an off topic question. I asked about a WordPress element and I'm not sure if CSS or jQuery can solve my problem. This site is probably not for beginners. – Bikram Aug 5 '18 at 6:56
  • 1
    Actually there is nothing called WP-Review element in WordPress core. Most likely you are using a plugin for the related shortcode. Unfortunately, you don't know enough about WordPress to realize why it's not about WordPress. I suggest you to post this is StackOverflow. Although, even there you'll need to provide more information. All the best. – Fayaz Aug 5 '18 at 9:11