| A Word Displayed In RED
|
Scotty13

msg:4500563 | 10:47 am on Sep 27, 2012 (gmt 0) | I want my “current airline” and “my first airline” to display in red (no link). I can’t seem to get. Could you please help? Code… <td width="100%" bgcolor="#F9F9F9" style="line-height:1.5em;" valign="top"><span class="liteGreyColor textsize10">Posted ' . $whenAnno . ': <span><a href="http://www.*********.com.php?id=' . $uid . '"> ' . $username . ' </a> with ' . $currentairline . ' in ' . $country . '. My first airline was ' . $myfirstairline . '. </a> I just wanted to say... </p></span>' . $the_anno . '<em></em></span> <span class="textsize10"></span> Thank you, S
|
topr8

msg:4500564 | 10:53 am on Sep 27, 2012 (gmt 0) | surround the words you want in red in <span></span> tags and give the span a class which makes the text red something like.. in your stylesheet .red{color:red;} and on your page: <span class="red">' . $currentairline . ' </span>
|
Fotiman

msg:4500629 | 2:01 pm on Sep 27, 2012 (gmt 0) | Don't use a class name like "red". If you ever decide you want them to be some other color (or style) then you'll either need to modify your HTML to use a different class, or you'll need to modify class red's style to be the other color which is confusing. A better option is to use class names that represent the content, not the presentation. For example, use a classname like "currentairline": .currentairline { color: red; } And on your page: <span class="currentairline">' . $currentairline . '</span> This way, if you decide that you want the current airline to be bold instead, you only need to make a change in the presentation layer (the CSS), and it all still makes sense.
|
Scotty13

msg:4501336 | 8:38 pm on Sep 28, 2012 (gmt 0) | Thanks, topr8. Perfect!
|
|
|