URL with css - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: URL with css (/showthread.php?tid=11521) |
URL with css - El Forum - 09-11-2008 [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 <?=anchor("classifieds/browse/category/{$categories[$x]['id']}","({$categories[$x]['itemcount']}) {$categories[$x]['category']}");?> 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. URL with css - El Forum - 09-11-2008 [eluser]Sumon[/eluser] Try Code: <?php echo anchor("www.domain.com" , "Here is my link" , 'class="bLink"');?> URL with css - El Forum - 09-11-2008 [eluser]lukeinjax[/eluser] You can pass an array of attributes - http://ellislab.com/codeigniter/user-guide/helpers/url_helper.html Code: echo anchor('www.domain.com', 'My Domain', array('class' => 'bLink', 'title' => 'my title')); |