i have this code and want the link to show in pink please but nothing i have tried works...please help???

<td colspan='8'>
<li>
<?php echo "Visit our mobisite at: ";?>
<a href="url" color='#e62b8c'>www.rainbowcode.mobi</a>
</li>
&nbsp;&nbsp;
</td>

    <font color="pink"> content will be pink </font>

      thanks i tried it like this but to no avail 🙁

      <li>
      <?php echo "Visit our mobisite at: ";?>
      <font color="#499ee0">
      <a href="url">www.rainbowcode.mobi</a>
      </font>
      </li>

        try:

        <style>
        .pink {
        	color: #499ee0;
        }
        
        </style>
        
        <li>
        <?php echo "Visit our mobisite at: ";?>
        <a href="url" class="pink">www.rainbowcode.mobi</a></li>

          The font element is deprecated and should not be used. Stick to CSS.

          The reason that <font><a /></font> does not (may not) work, is that the initial value for text color is browser specific, and as such is not necessarily set to inherit. That is, the font approach would work with the following

          <!-- setting color to be inherited -->
          <font color="#ABC"><a href="" style="color: inherit;">now color is inherited</a></font>
          
          <!-- making the text node a direct child of the font element, rather than the anchor -->
          <a href=""><font color="#123123">Now the text's parent is the font element rather
          than the anchor</font></a>
          
          <!-- and of course this holds when not using deprecated stuff as well -->
          <div style="color: #123123"><a href="">(possibly) not inherited</a></div>
          <div style="color: #123123"><a href="" style="color: inherit;">Inherited</a></div>
          
          <a href=""><span style="color: #123123">Colored </span> / not colored</a>
          
          

            thank you johanafm!! i used the line: <font color="#ABC"><a href="" style="color: inherit;">now color is inherited</a></font>
            and it worked perfectly

            how would i do the same thing but with the following line????:
            <tr>
            <td colspan="4">
            <?php echo link_to('REQUIREMENTS TO BE A MEMBER','password/requirements'); ?>
            </td>
            </tr>

            thanks

              You would need to modify your link_to() function - please post it here.

              Note that what johanafm was saying is that you should NOT use the <font> element.

              If you must color an element and let the link inherit it, rather than color the link itself (which is what you should do), use a <span> element instead of <font>.

              So preferably use:

              <a href="url" style="color:#e62b8c;">www.rainbowcode.mobi</a>

              or failing that use

              <span style="color:#e62b8c"><a href="url" style="color:inherit;">www.rainbowcode.mobi</a></span>

              But the second won't work in IE as it doesn't understand 'inherit' - see this.

                <tr>
                <td colspan="4">
                <b>
                <span class='spn_med_yellow_rbc' style="color:#f9c539">

                <?php echo link_to('REQUIREMENTS TO BE A MEMBER','password/requirements',array('class'=> 'spn_med_yellow_rbc')); ?></span>

                       </b>
                    </td>
                  </tr>

                i googled some options but cant find anything that works..is there another way of doing this? put it in an href? and how will i do it please???

                many thanks

                  i resolved it myself 🙂
                  <a href="password/requirements" style='color:#f9c539' class='spn_med_yellow_rbc'>REQUIREMENTS TO BE A MEMBER</a>

                  works..thanks all!

                    i work with the symfony frameworks so the href path was not right...i changed it to:

                    <tr>
                    <td colspan="4">
                    <a href="<?php echo url_for('password/requirements' ) ?>" style='color:#f9c539' class='spn_med_yellow_rbc'>REQUIREMENTS TO BE A MEMBER</a>

                    </td>
                    </tr>

                    all is perfect now 🙂

                      Write a Reply...