MyBB Community Forums

Full Version: CSS for URLs in posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What CSS block changes the appearance of URLs in posts?? I want to change the style to be underlined whether they've been clicked or not. I've searched and searched and it's driving me nuts.
visited pseudo-class with text-decoration: underline;
http://www.w3schools.com/CSS/css_pseudo_classes.asp
a:link {color: #xxxxxx;text-decoration: underline;}
a:visited {color: #xxxxxx;text-decoration: underline;}
a:hover  {color: #xxxxxx;text-decoration: underline;}
a:active {color: #xxxxxx;text-decoration: underline;}
a:link {
	color: #000000;
	text-decoration: none;
}

a:visited {
	color: #000000;
	text-decoration: none;
}

a:hover, a:active {
	color: red;
	text-decoration: underline;

Done all the changed to these bits of code and it doesn't change it. Some things also affect all links on the entire page which don't want, I just want URLs in posts to always be underlined.
(2008-11-02, 12:37 PM)Matt_ Wrote: [ -> ]I just want URLs in posts to always be underlined.
I think posts don't have their own class, so you can assign custom class to postbit.
.custompost a:link {color: #xxxxxx;text-decoration: underline;}
.custompost a:visited {color: #xxxxxx;text-decoration: underline;}
.custompost a:hover  {color: #xxxxxx;text-decoration: underline;}
.custompost a:active {color: #xxxxxx;text-decoration: underline;}

don't forget to add class="custompost" in yout postbit

If this doesn't work for you, than something is overwriting newly defined class.

edit
for horizontal postbit you can use .post_body (it is already there)
This is going to require a bit of template editing.

Edit postbit_classic.

Find:
<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">

Replace with:
<div class="postbit" id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">

Edit postbit.

Find:
<div class="post_body" id="pid_{$post['pid']}">

Replace with:
<div class="post_body postbit" id="pid_{$post['pid']}">

Add this to the bottom of your global css.
.postbit a {
  text-decoration: underline;
}