...

View Full Version : Link Color in PHP



ccarrin2
01-27-2012, 04:06 AM
How could I make the word Messages a specific color? Similair to how I made the unread count string a color. How could I do something similair to Messages without using css? Thank you.




<a href="<?php echo get_permalink($mngl_options->inbox_page_id); ?>">
<?php _e('Messages', 'mingle'); ?>
<?php if ($unread_count > 0)
{ echo "<font color=\"#f03\"><strong> $unread_count_str </font></strong>";}
else {echo $unread_count_str;} ?></a>

felgall
01-27-2012, 04:23 AM
The appearance of web pages is defined by CSS. If you want to define the colour of something then that's the way to do it.

Asking how to do it without CSS is like asking how to run that PHP without a server to run it on.

ccarrin2
01-27-2012, 04:28 AM
If you know a way to do this in css then please tell me but I have tried and it is not working. that is why I was just looking to using font color tags I just don't know where to place them.

jmj001
01-27-2012, 04:29 AM
without knowing exactly what the _e() function does, i'm assuming it's the wordpress function...

did you try?


<a href="<?php echo get_permalink($mngl_options->inbox_page_id); ?>">
<?php _e('<font color="#f03">Messages</font>', 'mingle'); ?>
<?php if ($unread_count > 0)
{ echo "<font color=\"#f03\"><strong> $unread_count_str </font></strong>";}
else {echo $unread_count_str;} ?></a>

ccarrin2
01-27-2012, 04:36 AM
That did it! Thank you!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum