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)
-   -   Please check this code. (https://forum.x-cart.com/showthread.php?t=27863)

BizzyB 01-08-2007 01:32 AM

Please check this code.
 
My apologies for the long post. I am new to any language associated with website construction. Below is code I have used to display text within an embedded page. It seems to me as though the code is overly repetitive with the same commands √ I have given away using the WYSIWYG editor except for guiding me as to the correct syntax etc.
I have quite a bit of coding to do in other embedded pages but before I attempt that, I would appreciate a guru going over it and tell me if I am going in the right direction or not. I have a thick hide so don▓t hold back.

Also I am puzzled as to whether I use <strong> or <b> for bold print!!

TIA

<p style="FONT-SIZE: 12pt; COLOR: #8b4513; FONT-FAMILY: Verdana">
<strong>Options Title - Bold.</strong>
</p>
<p style="FONT-SIZE: 8pt; COLOR: #006400; FONT-FAMILY: Verdana">
Some text here
<br/><br/>
More text here - showing available options
<br/><br/>
<strong>
Option one - Bold.
<br/>
Option Two - Bold.
<br/>
Option Three - Bold.
<br/><br/>
</strong>
</p>
<p style="FONT-SIZE: 8pt; COLOR: #000080; FONT-FAMILY: Verdana">
<strong>
Option One - Bold - Blue:
</strong>
<br/>
<span style="FONT-SIZE: 8pt; COLOR: #006400; FONT-FAMILY: Verdana">
Text related to Option One
</span>
</p>
<p style="FONT-SIZE: 8pt; COLOR: #006400; FONT-FAMILY: Verdana">
More Option One text here. <strong>Important text here.</strong> End of bold text.
<br/><br/>
Bank: Bank.
<br/>
Account Name: Acc Name
<br/>
BSB: 999-999
<br/>
Account Number: 123456789
<br/>
</p>
<p style="FONT-SIZE: 8pt; COLOR: #000080; FONT-FAMILY: Verdana">
<strong>
Option Two - Bold - Blue:
</strong>
<br/>
<span style="FONT-SIZE: 8pt; COLOR: #006400; FONT-FAMILY: Verdana">
Option Two text here.
</span>
</p>
<p style="FONT-SIZE: 8pt; COLOR: #ff0000; FONT-FAMILY: Verdana">
More Option Two text (red) here.
</p>
<p style="FONT-SIZE: 8pt; COLOR: #006400; FONT-FAMILY: Verdana">
Even more Option Two text here.
</p>
<p style="FONT-SIZE: 8pt; COLOR: #000080; FONT-FAMILY: Verdana">
<strong>
More of the same
</strong>
<br/>
<span style="FONT-SIZE: 8pt; COLOR: #006400; FONT-FAMILY: Verdana">
Even more of the same here
</span>
</p>

balinor 01-08-2007 02:57 AM

Re: Please check this code.
 
You really need to classes instead of putting the code in the page. For example, you can create a new class in skin.css, let's call it test1:

.test1 {FONT-SIZE: 8pt; COLOR: #000080; FONT-FAMILY: Verdana;}

Then, in the page itself, you just call that class:

<p class="test1">code you want formatted</p>

Cuts down on the file size of your pages significantly. Also, <strong> is the W3C compliant tag now, not <b>

Moving to Template Editing

BizzyB 01-08-2007 04:18 PM

Re: Please check this code.
 
Thank you once again Padraic for your advice. I am getting most of my information from the W3Schools and MS Frontpage 2003 tutorials. They sometines differ on syntax that achieve the same outcome. Hence my comment re <bold> and <b>.

I did consider creating a class but I am unsure as to what happens to that code if an update is issued by X-Cart. Does it get "wiped" if an update is issued?

Thanks once again.

balinor 01-08-2007 04:23 PM

Re: Please check this code.
 
Ok, first piece of advice...NEVER use Frontpage if you want W3C compliant code. Perhaps the newer versions are better, but Microsoft products produce awful code.

When you upgrade X-Cart, it never overwrites custom code. It only patches files that match exactly to the original code. If it doesn't match, it skips the file, and you can go in and patch it manually. So don't let that stop you from adding custom classes :)


All times are GMT -8. The time now is 05:29 PM.

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