Probably has an image, set as a background or something with on
rollover changes background image or whatever. To OP, this is not the
best option as if your viewer has images disabled, or they are using
screen readers and you have no alt text, and no text for the link,
they are kind of SOL. So you should probably change it so your site is
more accessible.

On Jun 11, 10:22 am, brian <bally.z...@gmail.com> wrote:
> echo $html->link(
>         '',
>         array(
>                 'controller'=>'blog',
>                 'action' => 'index'
>         ),
>         array(
>                 'class' => 'homebtn'
>         )
> );
>
> But it looks to me like you should have an id="homebtn" (presumably,
> there's only one on the page) with a class for the more general style
> rules.
>
> And why don't you have any text in the link?That's not very accessible.
>
> On Thu, Jun 11, 2009 at 12:58 PM, DbZeroOne<dbzero...@gmail.com> wrote:
>
> > First, I'm just starting to learn Cake, so my question may seem a
> > little idiotic...
>
> > I'm trying to add some rollover buttons to a page in a CakePHP
> > application that I inherited from a previous developer.
>
> > I prefer to do CSS rollovers vs. Javascript. So far the layout is
> > working very well, but I'm having a tough time figuring out how to
> > make a graphical button with a link using the CSS rollover method (1
> > background image that changes position on hover). If this were HTML,
> > my code would look like this:
>
> > <a class="homebtn" href="index.html"></a>
>
> > That CSS class 'homebtn' would handle the image, size, float, hover,
> > etc. and the HREF part tells it where to link to. Easy enough.
>
> > In Cake, my code looks like this...
>
> > <?php
> > echo $html->link($html->style("homebtn"), array('controller'=>'blog',
> > 'action' => 'index'));
> > ?>
>
> > My best guess is that the code above is saying: "make an HTML link of
> > the CSS class 'homebtn' and process clicks through the controller
> > named 'blog'.
>
> > The problem is that the image/rollover part doesn't work and I can't
> > find any info on how to make it work. The CSS class doesn't seem to be
> > getting pulled in. All that shows is a text link that says 'homebtn',
> > which does link correctly, by the way.
>
> > I'm using CakePHP 1.2 and the class 'homebtn' is in my style.css
> > stylesheet which is properly linked into the head of default.ctp.
>
> > Suggestions?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to