XF 2.0 Right floated text in the h1

mjda

Well-known member
I'm trying to figure out how to get some text floated to the right of the h1 tag in the thread_view template. No matter what I try the text will not go all the way to the right. It just goes right next to the thread title. Any ideas?

Here's what I have right now.

Code:
<xf:h1>
	{{ prefix('thread', $thread) }}{$thread.title}
	<a href="">
		<span class="featured-thread" style="float: right;padding-left: 15px;">Featured</span>
	</a>
</xf:h1>
 
Well this one was tricky but I finally figured it out. In case there's someone else who is trying to figure this out, here's what I ended up doing.

Here was the final HTML

Code:
<xf:h1>
	{{ prefix('thread', $thread) }}{$thread.title}
	<a href="{{ link('threads/featured') }}" class="featured-thread">
		<span>Featured</span>
	</a>
</xf:h1>

and the CSS (or .less)

Code:
.p-title 
{
	position: relative;
}
a.featured-thread
{
	position: absolute;
	right: 0;
	top: 0;
}
 
Top Bottom