Hi there,
I would like to change the colour of the first word in my all my page titles and also module titles.
I have read quite a bit about adding a span into the title but have no idea how to implement this. Can somebody give me a hand?
Cheers
.moduletable h3 span { color: #000; }
<?php if ($this->params->get('link_titles') && $this->article->readmore_link != '') : ?>
<span>
<a href="<?php echo $this->article->readmore_link; ?>" class="contentpagetitle<?php echo $this->escape($this->params->get( 'pageclass_sfx' )); ?>"><?php echo $this->escape(isset($this->article->page_title)?$this->article->page_title:$this->article->title); ?></a>
</span>
<?php else : ?>
<span><?php echo $this->escape(isset($this->article->page_title)?$this->article->page_title:$this->article->title); ?></span>
<?php endif; ?>
<?php
$article_one = explode(' ', $this->article->title);
$article_one = $article_one[0];
if(count(explode(' ', $this->article->title)) > 1)
{
$article_two = substr($this->article->title, strpos($this->article->title,' '));
}
else
{
$article_two = '';
}
?>
<span><?php echo $article_one; ?></span><?php echo $article_two; ?>
.contentheading span { color: #ffff00; background: #000; padding: 10px; }
.contentheading span a { color: #e0e14c; }
<?php
$article_one = explode(' ', $this->article->title);
$article_one = $article_one[0];
if(count(explode(' ', $this->article->title)) > 1)
{
$article_two = substr($this->article->title, strpos($this->article->title,' '));
}
else
{
$article_two = '';
}
?>
<?php if ($this->params->get('link_titles') && $this->article->readmore_link != '') : ?>
<a href="<?php echo $this->article->readmore_link; ?>" class="contentpagetitle<?php echo $this->escape($this->params->get( 'pageclass_sfx' )); ?>"><span><?php echo $article_one; ?></span><?php echo $article_two; ?></a>
<?php else : ?>
<span><?php echo $article_one; ?></span><?php echo $article_two; ?>
<?php endif; ?>
.contentheading span { color: #ffff00; background: #000; padding: 10px; }
a.contentpagetitle span:hover,
a.contentpagetitle span:active,
a.contentpagetitle span:focus,
a.contentpagetitle span { color: #ffff00; background: #000; padding: 10px; }