tags:

views:

35

answers:

1

Hello,

Within the variable $row["title"] below, I would like the variable $find to have the following CSS:

            font-family: Georgia, "Times New Roman", Times, serif;
            font-weight: normal;
            font-size: 24px;
            color: #004284;
            background-color: #FFFF00;   

How can I do this?

Thanks in advance,

echo '<td class="sitename1search">'.$row["title"].'</td>';
A: 

First, declare the CSS this way:

td.sitename1search span.find {
    font-family: "Georgia", "Times New Roman", "Times", serif;
    font-weight: normal;
    font-size: 24px;
    color: #004284;
    background-color: #FFFF00;   
}

Then, when you construct $row["title"], wrap the $find variable in a span like this:

$row["title"] = " ... <span class='find'>$find</span> ... ";
Timwi