开发者

Linking Text Logo and span

开发者 https://www.devze.com 2023-03-02 16:52 出处:网络
how do ilink my Logo which is made out of Text and CSS to my root_path and theinside of it? This is how it would l开发者_开发百科ook without Rails:

how do i link my Logo which is made out of Text and CSS to my root_path and the inside of it?

This is how it would l开发者_开发百科ook without Rails:

<h1><a href=#>Main Title<span>subtitle</span></a></h1>

I am using no images and just plain CSS text for the Logo.

Thank you!


If you mean link to root page:

<h1><%= link_to 'Main Title<span>subtitle</span>'.html_safe, '/' %></h1>

If you want other locations and have some resources set up, you could use paths:

<h1><%= link_to 'Main Title<span>subtitle</span>'.html_safe, example_path %></h1>


If you happen to need even more HTML markup in the link, then check this question out:

  • How do I wrap link_to around some html ruby code?
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号