link_to is symfony function/helper while when you implement class #menu a that is looking for <a not for link_to because css know only HTML tags. so when you write css be careful, always write classes for html tags.
Hi, I have created a menu using link_to. I want define a CSS rule for these links. I expected it works writing something like this: #menu link_to { } But the rule only works if i write it in this way: #menu a { } Am i doing this right? Dont you think this way ("link_to" in the view and "a" in the CSS rule) could be confusing? On Dec 22, 10:46 am, mirfan <m.irfa...@gmail.com> wrote: > you can also use html anchor tag as > <a href="<?=url_for('content/update?name='.$name) ?>">I never say my > name</a> > assign any class to a tag. > > On Dec 22, 10:41 am, DEEPAK BHATIA <toreachdee...@gmail.com> wrote: > > > // Option argument as an associative array > > > <?php echo link_to('I never say my name', > > 'content/update?name=anonymous',array('class' > > => 'special_link')) ?> > > Or > > > <?php echo link_to('I never say my name', 'content/update?name=anonymous', > > 'class=special_link') ?> > > *******Use this Class name in your CSS File.********* > > > On Tue, Dec 22, 2009 at 10:53 AM, DEEPAK BHATIA > > <toreachdee...@gmail.com>wrote: > > > > link_to is not an HTML tag, please read CSS carefully. > > > > On Tue, Dec 22, 2009 at 12:40 AM, tirengarfio > > > <tirengar...@gmail.com>wrote: > > > >> Hi, > > > >> I have created a menu using link_to. I want define a CSS rule for > > >> these links. > > > >> I expected it works writing something like this: > > > >> #menu link_to { > > > >> } > > > >> But the rule only works if i write it in this way: > > > >> #menu a { > > > >> } > > > >> Am i doing this right? Dont you think this way ("link_to" in the view > > >> and "a" in the CSS rule) could be confusing? > > > >> Regards > > > >> Javi > > > >> -- > > > >> You received this message because you are subscribed to the Google Groups > > >> "symfony users" group. > > >> To post to this group, send email to symfony-us...@googlegroups.com. > > >> To unsubscribe from this group, send email to > > >> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> > > >> . > > >> For more options, visit this group at > > >>http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.