Welcome Guest, Not a member yet? Register   Sign In
URL with css
#1

[eluser]patsm[/eluser]
I'm new to Code Igniter and have a question that should be simple.

I'm using CSS and all my <a> tags are a certain color. However, I want one section of my page to have a different color <a> links. In my stylesheet, I have the style defined as

a.bLink, a.bLink:active, a.bLink:visited {
font-family:tahoma;
font-size:11px;
text-decoration:none;
color:#0099ff;
}

In my view I have this anchor link

&lt;?=anchor("classifieds/browse/category/{$categories[$x]['id']}","({$categories[$x]['itemcount']}) {$categories[$x]['category']}");?&gt;

How can I add this css style to this link? I would like it to display something like this...

<a href="www.domain.com" class="bLink">Here is my link </a>

I know this is something simple. Any help is greatly appreciated.
#2

[eluser]Sumon[/eluser]
Try
Code:
&lt;?php echo anchor("www.domain.com" , "Here is my link" , 'class="bLink"');?&gt;
#3

[eluser]lukeinjax[/eluser]
You can pass an array of attributes - http://ellislab.com/codeigniter/user-gui...elper.html

Code:
echo anchor('www.domain.com', 'My Domain', array('class' => 'bLink', 'title' => 'my title'));




Theme © iAndrew 2016 - Forum software by © MyBB