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)
-   -   html font tags in language-OK ?? (https://forum.x-cart.com/showthread.php?t=24332)

Paul H 08-23-2006 11:53 PM

html font tags in language-OK ??
 
I had a few problems getting the CSS to change the colour of certain bits of text and not others
so I tried inserting html tags into the edit language via webmaster mode.This was on the intro to gift certificates which for some reason wasn't following on from the CSS and it worked fine
Is it OK to do this or will it create other problems ? I did post a screen shot of what I was trying but xcart deleted it !

Seems they didn't delete it - I just couldn't find it in the new forum

balinor 08-24-2006 02:37 AM

Re: html font tags in language-OK ??
 
<font> tags are depreciated and should not be used. Use <span> or <div> tags to format text, or just add a class to the <p> tag like this:

<p class="classname">

And yes, you can use html formatting in the language variables.

Paul H 08-25-2006 01:54 AM

Re: html font tags in language-OK ??
 
It'll take me a while to get my head round that.
Do I put the span and div stuff in the pop up box in webmaster mode or the tpl file ?

I tend to use dreamweaver as my editor so I can see my wysiwyg changes in code form.
Then cut n paste the bits of code into the wherever and see what happens. Dreamweaver produces lots of <font> tags and I haven't seen it produce span and div stuff which leaves me in the dark a bit. I will search the net for a tutorial somewhere.

I wish I had had come to you for my site makeover but I got too far in to turn back and start again and no one seems to want to fix the little bits

balinor 08-25-2006 03:21 AM

Re: html font tags in language-OK ??
 
You need to upgrade your version of Dreamweaver, the new versions handle W3C compliant code. You can use the code in the languages section or the template itself.

Paul H 08-25-2006 04:08 PM

Re: html font tags in language-OK ??
 
I've had a good go at this tonight and managed to get my Dreamweaver up to speed using the newer code which made things a bit easier . Changed the font using span tags, couldn't get the p tags to work and had a little success with CSS although I think there is some sort of heirarchy going on somewhere. Why do some of the CSS lines have a dot in front and others don't ??

Cheers

balinor 08-26-2006 04:52 AM

Re: html font tags in language-OK ??
 
Sounds like you need a good CSS tutorial or book. I'd recommend this one:

'Cascading Style Sheets - The Definitive Guide' by Eric Meyer

Paul H 08-28-2006 10:26 AM

Re: html font tags in language-OK ??
 
That's seems like a good book but I prefer something more appropriate like "CSS for Dummies"

balinor 08-28-2006 10:28 AM

Re: html font tags in language-OK ??
 
No, you don't want a Dummies book for this. Seriously, the Meyer book is very straightforward, easy to read and doesn't take a degree in computer programming to understand. It is the best book out there for beginners or experts alike.

Paul H 08-28-2006 12:38 PM

Re: html font tags in language-OK ??
 
I checked out Amazon here in the UK and the Meyers book wasn't available so I got
"Head First HTML with CSS & XHTML"
by Eric Freeman

balinor 08-28-2006 12:46 PM

Re: html font tags in language-OK ??
 
Just make sure it is current and covers CSS 2.1 as that is the standard. CSS 3 is not far off either....

Paul H 08-28-2006 01:44 PM

Re: html font tags in language-OK ??
 
I think any book is better than nothing for me as I don't know anything at all about code.I'm interested in web stuff and like to be able to do a bit of stuff on my sites and fix a few problems.As far as up to date CSS and HTML most of the web sites out there are not built using the latest code and browsers will have to deal with the old stuff.
Just a quick question about the CSS before I get my book.
I added a H5 line into the CSS and changed the template to this.

page_title.tpl

{* $Id *}
<H5 align="center">{$title}</H5>

Now this changed the font size and colour but no way would it center the text.
I added span tags to the language to fix it

balinor 08-28-2006 02:20 PM

Re: html font tags in language-OK ??
 
Well see, you are missing the point. Coding to the current standard ensures that your site will display well in the newest browesrs (including the new version of IE coming out this winter). So no, the browsers WILL NOT have to deal with the old stuff, the people who write the old stuff will have to deal with the new browsers.

Also, cleaner coded web sites RANK better and load quicker which is the whole point. Take the time to learn the correct code or don't bother as it will just hurt you to use old, depreciated code.

align=center is a perfect example, that is depreciated code, which is why it won't center. The correct way to code that would either to assign a style to the h5 tag like this:

<h5 class="center"> and then define 'center' in your stylesheet

or

<h5 style="text-align: center;">

As you can tell, the first method uses less code so it is the preferred method.


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

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