Jump to content

Change color of some text


mudi

Recommended Posts

        <? if(($type=="mp3")||($type=="")) {
        echo "<b>Mp3</b>  -  <a href=\"?type=lyrics\" class=\"llink\">Lyrics</a>  -  <a href=\"?type=video\" class=\"llink\">Video</a>";
        } elseif($type=="lyrics") {
        echo "<a href=\"?type=mp3\" class=\"llink\">Mp3</a>  -  <b>Lyrics</b>  -  <a href=\"?type=video\" class=\"llink\">Video</a>";
        } elseif($type=="video") {
        echo "<a href=\"?type=mp3\" class=\"llink\">Mp3</a>  -  <a href=\"?type=lyrics\" class=\"llink\">Lyrics</a>  -  <b>Video</b>";
        } ?>

How do i set it to white?

Link to comment
https://forums.phpfreaks.com/topic/119067-change-color-of-some-text/
Share on other sites

        <? if(($type=="mp3")||($type=="")) {
        echo "<b>Mp3</b>  -  <a href=\"?type=lyrics\" class=\"llink\">Lyrics</a>  -  <a href=\"?type=video\" class=\"llink\">Video</a>";
        } elseif($type=="lyrics") {
        echo "<a href=\"?type=mp3\" class=\"llink\">Mp3</a>  -  <b>Lyrics</b>  -  <a href=\"?type=video\" class=\"llink\">Video</a>";
        } elseif($type=="video") {
        echo "<a href=\"?type=mp3\" class=\"llink\">Mp3</a>  -  <a href=\"?type=lyrics\" class=\"llink\">Lyrics</a>  -  <b>Video</b>";
        } ?>

 

I'm not a php guru but - did you ever hear of using single quotes or other php methods to echo html? There is no need to repeat echo statements and backslashes to escape characters when other methods will suffice.  ;)

How do i set it to white?

 

EDIT: You can only use ".link" to style text outside of <a > links.

 

To make links a different color you need to specify css:

 

.link a {
color: #000;
}

 

<div class="link">
<a href="#">Videos</a>
</div>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.