• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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'));


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.