[ 5 posts ]

Bhuvana Pathsamatla

  • Username: Bhuvana
  • Joined: Mon Jun 18, 2012 2:09 am
  • Posts: 15
  • Location: India
  • IRC: Bhuvana
  • Offline
  • Profile

Unable to set Image in tab

Post Posted: Thu Jul 19, 2012 1:45 am
+0-
Hi,

I am using YUI 3.5.1 and I am using the tabview component. I would like to add an image instead of tab name. For example I want to display Home icon instead of displaying the text Home in the tab header.

I attempted using the following code but the image is not getting displayed. Can someone assist me with this?

<div id="hometabs">
<ul>
<li><a href="#Login"><img src="images/Home.jpg" width="30" height="30" /></a></li>
<li><a href="#Help">Help</a></li>
</ul>.............
...
..
..
</div>

Marco Asbreuk

YUI Contributor

  • Username: itsasbreuk
  • Joined: Mon Nov 16, 2009 5:14 am
  • Posts: 459
  • Location: Netherlands
  • Twitter: itsasbreuk
  • GitHub: ItsAsbreuk
  • Gists: ItsAsbreuk
  • IRC: Marco Asbreuk
  • Offline
  • Profile
Tags:

Re: Unable to set Image in tab

Post Posted: Thu Jul 19, 2012 7:14 am
+0-
Hey Bhuvana,

Tabview doesn't allow you to do that at first glance.
But there is a workarround, although you should have some YUI-experience before using it:
http://yuilibrary.com/forum/viewtopic.php?f=92&t=10305

Kind regards,
Marco.

Bhuvana Pathsamatla

  • Username: Bhuvana
  • Joined: Mon Jun 18, 2012 2:09 am
  • Posts: 15
  • Location: India
  • IRC: Bhuvana
  • Offline
  • Profile
Tags:

Re: Unable to set Image in tab

Post Posted: Thu Jul 19, 2012 9:25 pm
+0-
I am able to get it working using this approach. Thanks Marco!

Regards,
Bhuvana

Marco Asbreuk

YUI Contributor

  • Username: itsasbreuk
  • Joined: Mon Nov 16, 2009 5:14 am
  • Posts: 459
  • Location: Netherlands
  • Twitter: itsasbreuk
  • GitHub: ItsAsbreuk
  • Gists: ItsAsbreuk
  • IRC: Marco Asbreuk
  • Offline
  • Profile

Re: Unable to set Image in tab

Post Posted: Fri Jul 20, 2012 12:52 pm
+0-
Yeah,

No problem.
Thx. to Juan (I could not possible figure this one out myself :) )

Regards,
Marco.

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 620
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile

Re: Unable to set Image in tab

Post Posted: Sat Jul 21, 2012 2:43 pm
+0-
I sent a pull request with a solution that I think is better than the patch :)
https://github.com/yui/yui3/pull/198
  [ 5 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum