Changing fonts

greenspun.com : LUSENET : S-Mart Shopping Cart : One Thread

Hello everybody,

Is it possible to change the fonts in the script?

Simple question....simple answer?

Best regards,

Hans

-- Hans (prive@rebelmb.demon.nl), July 25, 1999

Answers

Hi Hans,

To change the fonts, you need to go in the smart.cgi file and add the font tag like "face, size, color ..." everywhere you want to change this. to see example, look at the source of this page :

# Print other info

#Price print "$ITEM{'price'} francs\n";

#Quantiti print "\n";

#ajouter au caddie print "\n";

#Description print "$ITEM {'descrip'}\n";

# Close print "\n";

DONT FORGET TO ADD THE \ before every "

-- Sibastien (septfons-s@bdway.com), July 29, 1999.


I'm no expert but...

I'd hate to have to go through and change or add all the "font" tags in the S-mart CGI. So I changed the look of the fonts using Cascading Style Sheets (CSS). All I did was add this code to the 'head' of my 'header.html' file and bingo, all my S-mart pages were in a new font (view source to see it):

Or better yet, put your style sheet info into one file and have your pages reference it with this HEAD tag (view source):

where "style.css" is a text file that contains the above style settings.

Keep in mind these CSS tags only work in CSS capable browsers; mostly 4.0+ versions. Learn more CSS info at http://www.w3.org/Style/CSS/

Hope this helps,

-- Chad P. (bobbob42@hotmail.com), July 30, 1999.


Moderation questions? read the FAQ