mudi Posted August 10, 2008 Share Posted August 10, 2008 <? 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? Quote Link to comment https://forums.phpfreaks.com/topic/119067-change-color-of-some-text/ Share on other sites More sharing options...
xtopolis Posted August 10, 2008 Share Posted August 10, 2008 in your CSS .llink { color: white; } You need to specify what you want white.. Quote Link to comment https://forums.phpfreaks.com/topic/119067-change-color-of-some-text/#findComment-613107 Share on other sites More sharing options...
TheFilmGod Posted August 12, 2008 Share Posted August 12, 2008 <? 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> Quote Link to comment https://forums.phpfreaks.com/topic/119067-change-color-of-some-text/#findComment-615040 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.