The text shown in your storefront comes from three places:
Using cascading style sheets, you can control the look of your storefront in a very effective way. But what if you want to change the look of a specific text string that is dynamically fed from a file like languages.asp? What's the best way to do it?
Most of the messages, field labels, etc. in your storefront are retrieved dynamically from a file located in the includes folder and called languages.asp. There is a section of this WIKI about (editing text in your storefront) that talks about editing this file.
Here we are going to focus on a specific issue: what if you want to style one of those strings? Our recommendation is to use cascading style sheets in this case too, in order to limit to a minimum the code changes in languages.asp (and prevent potential syntax issues).
dictLanguage.Add "english_advSrca_14", "Search on exact phrase."
dictLanguage.Add "english_advSrca_14", "<span class=mySearchClass>Search on exact phrase.</span>"
.mySearchClass {
color: #0000FF;
font-weight: bold;
}
The are cases in which the instructions provided above do not work. This includes text strings that are dynamically changed on the page using JavaScript (e.g. text strings that are only shown when something is selected on the page, such as inventory messages when specific sub-products are chosen on a store that uses the Apparel Add-on).
In those cases, you will need to review the source code, identify where the text is shown, and target it through CSS using existing information (not a new “span” and “class” as shown above).
For example, in some cases ProductCart uses transparent input fields to change a text value on the page dynamically using JavaScript (e.g. the price of an Apparel product when the product options change). In that case, you could easily target the input field ID using CSS.
For instance, the ID of the transparent input field that shows the inventory message specific to a certain Apparel Sub-Product is “StockMsg” (you would find this by looking at the source code of the page loaded in the browser), so you would add the following code to pcStorefront.css to make the text shown bigger and bolder:
#StockMsg {
font-weight: bold;
font-size: 15px;
}