Forum Moderators: coopster

Message Too Old, No Replies

specifying <a> tag class to PHP

         

marcus76

9:47 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



Hi,

I want to explicity set the <a> hyperlink tag a particular color for this hyperlink only. Would someone please advise the correct syntax in the stylesheet and the line below.

The <td class="diddy"> get's overwritten by the <a> tag in the stylesheets. I want to specify an additional <a> tag color in the stylesheets...

<td class="diddy"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . MY_ACCOUNT_INFORMATION . '</a>';?></td>

Many thanks

Marcus

mcibor

9:54 pm on Jun 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is simple solution

in css


.diddy A:link {text-decoration: none}
.diddy A:visited {text-decoration: none}
.diddy A:active {text-decoration: none}
.diddy A:hover {text-decoration: underline; color: red;}

and then <a class="diddy" href="'<?php echo ...

Hope this helps. If not then try [google.com...]

Best regards
Michal Cibor

marcus76

7:56 pm on Jun 7, 2005 (gmt 0)

10+ Year Member



Thanks Mcibor - worked a treat:

What about the following, i've defined a class in the stylesheet - where do i apply this to the following PHP? Basically want the hyperlink to be black!

$info_box_contents[] = array('align' => 'left',
'text' =>
'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . LOGIN_BOX_MY_ACCOUNT . '</a><br>' .

thanks again for your help.

Marcus

mcibor

9:17 pm on Jun 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



$info_box_contents[] = array('align' => 'left',
'text' =>
'<a class="diddy" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . LOGIN_BOX_MY_ACCOUNT . '</a><br>' .

anywhere inside your <a
Best regards
Michal Cibor

marcus76

1:36 pm on Jun 9, 2005 (gmt 0)

10+ Year Member



hey Michael,

This for some reason did not work - can understand the logic, just doesnt change the link color? anything i'm missing here? it's definately reading the stylesheet.css, cos if i change the .A style it changes the links....just don't seem to be able to enforce a seperate style against these links?

$info_box_contents[] = array('align' => 'left',
'text' =>
'<a class="diddy" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . LOGIN_BOX_MY_ACCOUNT . '</a><br>' .

Many thanks for your help.

Kind Regards

Marcus