CSS tooltips idea
-
Hi
Add tooltips to the title threads.
1.
/wp-content/plugins/asgaros-forum/includes/views/forum-thread.phpFind:
<strong><a href="<?php echo $this->get_link($thread->id, $this->url_thread); ?>"><?php echo esc_html($this->cut_string(stripslashes($thread->name))); ?></a></strong>
Replace:
<strong><a class="tooltips" href="<?php echo $this->get_link($thread->id, $this->url_thread); ?>"><?php echo esc_html($this->cut_string(stripslashes($thread->name))); ?><span><?php echo esc_html(stripslashes($thread->name)); ?></span></a></strong>
Style
a.tooltips { position: relative; display: inline; } a.tooltips span { position: absolute; width: 200px; color: #FFFFFF; background: #8C8C8C; height: 60px; line-height: 20px; text-align: center; visibility: hidden; border-radius: 6px; } a.tooltips span:after { content: ''; position: absolute; bottom: 100%; left: 50%; margin-left: -8px; width: 0; height: 0; border-bottom: 8px solid #8C8C8C; border-right: 8px solid transparent; border-left: 8px solid transparent; } a:hover.tooltips span { visibility: visible; opacity: 0.8; top: 30px; left: 50%; margin-left: -76px; z-index: 999; }
Result:
https://i.imgur.com/WK7VZCz.png2. Only title
Replace:
<strong><a href="<?php echo $this->get_link($thread->id, $this->url_thread); ?>" title="<?php echo esc_html(stripslashes($thread->name)); ?>"><?php echo esc_html($this->cut_string(stripslashes($thread->name))); ?></a></strong>
3.For themes Sahifa
Replace:
<strong><a class="post-tooltip tooltip-s" href="<?php echo $this->get_link($thread->id, $this->url_thread); ?>" original-title="<?php echo esc_html(stripslashes($thread->name)); ?>"><?php echo esc_html($this->cut_string(stripslashes($thread->name))); ?></a></strong>
Result:
https://i.imgur.com/ObLF4zG.pngI will be glad if in handy ??
- The topic ‘CSS tooltips idea’ is closed to new replies.