X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Is it correct to use html in labels? (https://forum.x-cart.com/showthread.php?t=74699)

Katsu 11-22-2016 10:38 AM

Is it correct to use html in labels?
 
Hi forum,
I'm hoping someone may be able to help here.

Where the home page reads 'Featured Products', or, 'Winter Season Featured Products', I want to change the font and size. Is it correct and preferred practice to simply enter the label as html, like this:


<font face="Arial, Helvetica, sans-serif"><b><font size="4" color="#330000">Winter Season <font color="#CC0000" size="5">Featured</font> Products</font></b></font>


or, should this be done another way?


Instead of text, how would I enter an image?

Thanks in advance.

cflsystems 11-22-2016 10:55 AM

Re: Is it correct to use html in labels?
 
You can use html formatting in language variables although this is not a prefer way of doing it. If you or someone else want to change it later it is a pay to find out what exactly was done.

Also you should not use <font> tag - this has been deprecated for years. Instead use <span> and style it. Better yet use it with a class and add css rules for that class.

Katsu 11-22-2016 11:06 AM

Re: Is it correct to use html in labels?
 
Thanks Steve. I was thinking that.

Quote:

Instead use <span> and style it. Better yet use it with a class and add css rules for that class.

Not too sure how to go about that......


How about replacing text with a pic?

Katsu 11-22-2016 11:09 AM

Re: Is it correct to use html in labels?
 
When adding css rules, do I edit skin/common_files/css?

cflsystems 11-22-2016 11:11 AM

Re: Is it correct to use html in labels?
 
<span class="wordX">Word X <span class="wordY">Word Y</span></span>

span.wordX {color:red;font-weigh:bold}
span.wordY{color:blue}

You can add the css in common_files or alt skin you use, either one should work.

Katsu 11-22-2016 11:55 AM

Re: Is it correct to use html in labels?
 
Works like a charm - thanks!

I revised as follows, but I also wanted to change the font and maybe underline a word.

}
span.wordX {color:red;font-size: 26px}
span.wordY{color:#339900}


Adding 'arial' after 26px didn't work.

Katsu 11-22-2016 12:35 PM

Re: Is it correct to use html in labels?
 
Found it - just added the 'font: arial;'.


.... would love to add a pic in place of text though...



.


All times are GMT -8. The time now is 02:01 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.