# Links for poor developers - \<a href\>

**URL:** <https://www.ruby-forum.com/t/links-for-poor-developers-a-href/76263>\
**Category:** Rails\
**Created:** [November 17, 2006, 2:30am UTC](https://www.ruby-forum.com/t/links-for-poor-developers-a-href/76263 "2006-11-17T02:30:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [November 17, 2006, 2:30am UTC](https://www.ruby-forum.com/t/links-for-poor-developers-a-href/76263/1 "2006-11-17T02:30:45Z")

</div>

I don’t enjoy getting involved in design much, mostly because of cross  
browser issues / css.  
Anyway, I’m needing a nice menu. Problem is , most of what is out there  
uses standard html links -   
And the css is coded around those elements.  
Is there a way to use with link\_to . I know i can probably  
just  
define a class , but wonder if there is an easier  
way.

 

Stuart

 

–

> **[Dark ambient](https://en.wikipedia.org/wiki/Dark_ambient)**
>
> Dark ambient (referred to as ambient industrial especially in the 1980s) is a genre of post-industrial music that features an ominous, dark droning and often gloomy, monumental or catacombal atmosphere, partially with discordant overtones. It shows similarities with ambient music, a genre that has been cited as a main influence by many dark ambient artists, both conceptually and compositionally. Although mostly electronically generated, dark ambient also includes the sampling of hand-pla 
> The te...

---

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [November 17, 2006, 2:42am UTC](https://www.ruby-forum.com/t/links-for-poor-developers-a-href/76263/2 "2006-11-17T02:42:46Z")

</div>

On Nov 16, 2006, at 8:29 PM, Dark A. wrote:

> I don’t enjoy getting involved in design much, mostly because of  
> cross browser issues / css.  
> Anyway, I’m needing a nice menu. Problem is , most of what is out  
> there uses standard html links -   
> And the css is coded around those elements.  
> Is there a way to use with link\_to . I know i can  
> probably just define a class , but wonder if there is an easier  
> way.

link\_to is simply a helper to generate standard HTML links () so any Javascript or CSS techniques you would use with  
HTML can be used with the resulting code.

Have you tried using link\_to in a template and looking at the HTML  
that’s produced? (with the ‘view source’ option in your browser).

James.

---

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [November 17, 2006, 3:02am UTC](https://www.ruby-forum.com/t/links-for-poor-developers-a-href/76263/3 "2006-11-17T03:02:49Z")

</div>

On 11/16/06, James S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > way.
> 
> link\_to is simply a helper to generate standard HTML links () so any Javascript or CSS techniques you would use with  
> HTML can be used with the resulting code.
> 
>  
> 
> Have you tried using link\_to in a template and looking at the HTML  
> that’s produced? (with the ‘view source’ option in your browser).
> 
>  
> 
> James.

 

I have, and know , it turns into a href, but it seems as if the styling  
is  
lost anyway.

 

Stuart

 

–

> **[Dark ambient](https://en.wikipedia.org/wiki/Dark_ambient)**
>
> Dark ambient (referred to as ambient industrial especially in the 1980s) is a genre of post-industrial music that features an ominous, dark droning and often gloomy, monumental or catacombal atmosphere, partially with discordant overtones. It shows similarities with ambient music, a genre that has been cited as a main influence by many dark ambient artists, both conceptually and compositionally. Although mostly electronically generated, dark ambient also includes the sampling of hand-pla 
> The te...

---

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [November 17, 2006, 3:20am UTC](https://www.ruby-forum.com/t/links-for-poor-developers-a-href/76263/4 "2006-11-17T03:20:52Z")

</div>

Hi –

On Thu, 16 Nov 2006, Dark A. wrote:

> > > probably just define a class , but wonder if there is an easier
> 
> I have, and know , it turns into a href, but it seems as if the styling is  
> lost anyway.

Try this:

link\_to “Link text”, { :controller =\> “c”, :action =\> “a” },  
:class =\> “myclass”

You can see it described in several places if you google for: link\_to  
css class.

David

–  
David A. Black | removed\_email\_address@domain.invalid  
Author of “Ruby for Rails” [1] | Ruby/Rails training & consultancy [3]  
DABlog (DAB’s Weblog) [2] | Co-director, Ruby Central, Inc. [4]  
[1] [Ruby for Rails](http://www.manning.com/black) | [3] [http://www.rubypowerandlight.com](http://www.rubypowerandlight.com)  
[2] [http://dablog.rubypal.com](http://dablog.rubypal.com) | [4] [http://www.rubycentral.org](http://www.rubycentral.org)

---

<div class="post-metadata">

**Author:** ![zanoni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e99b99/32.png) [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Post date:** [November 17, 2006, 3:12am UTC](https://www.ruby-forum.com/t/links-for-poor-developers-a-href/76263/5 "2006-11-17T03:12:50Z")

</div>

On Nov 16, 2006, at 9:00 PM, Dark A. wrote:

> > 
> 
> styling is lost anyway.  
> What is your full link\_to call, and what’s the HTML you’re expecting  
> to be output?

James.
