Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 SPAN tag in HTML
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 19 December 2005 :  08:01:16  Show Profile  Visit MarcelG's Homepage
I'm thinking of changing the way Snitz handles the fonts.
At this moment, Snitz transforms the font-tags, to this HTML:

[font=Century Gothic]For example[/font=Century Gothic]
is transformed to
<font face="Century Gothic">For example</font id="Century Gothic">

As the font tag is 'deprecated', I was advised to change that to the span tag, and use CSS to assign the font.
However, I'm not sure if this is the correct syntax:
<span id="CenturyGothic">For example</span id="CenturyGothic">

In other words, does the <SPAN> tag allow an ID in the opening and closing tag?

portfolio - linkshrinker - oxle - twitter

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 19 December 2005 :  08:06:25  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
Have a look at my "alternate color"-thread, there css is used to change text color, should be able to change font also I think.

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 19 December 2005 :  09:05:22  Show Profile  Visit AnonJr's Homepage
To the best of my knowledge span tags do not allow for an ID in the closing tag. I think it would ignore it... but I could be wrong on that. Is there a reason that would be needed?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 19 December 2005 :  09:09:38  Show Profile  Visit HuwR's Homepage
yes, the id in the closing tags is what the forum code uses in order to parse the tags, without an id tag in the closing tag you would not be able to use any forumcode since it would be extremely difficult to pair off the tags, so yes, there is a reason for the id in the closing tags

Edited by - HuwR on 19 December 2005 09:10:24
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 19 December 2005 :  09:17:16  Show Profile
You could, however, use regular expressions to remove the attributes from a closing tag when passing a post through the formatstr function so's to display "proper" HTML.

I'd use classes rather than ids, though, as I did with Woo.ie, as ids are supposed to be unique.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 19 December 2005 :  09:30:08  Show Profile  Visit AnonJr's Homepage
Thanks HuwR. I'd wondered about that.

Just out of curiosity, if you left the class attribute in the closing tag would the browser ignore it?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 19 December 2005 :  09:31:05  Show Profile  Visit HuwR's Homepage
quote:
Originally posted by AnonJr

Thanks HuwR. I'd wondered about that.

Just out of curiosity, if you left the class attribute in the closing tag would the browser ignore it?


yes it should do
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 19 December 2005 :  10:00:24  Show Profile  Visit MarcelG's Homepage
So, with the browser ignoring the closing class attribute, I could simply define the classes in my stylesheet, and change the the font-handling to <span class="fontname"></span class="fontname">.
Great!

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 19 December 2005 :  10:09:51  Show Profile  Visit HuwR's Homepage
yes, it should work fine.
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 19 December 2005 :  10:40:10  Show Profile  Visit AnonJr's Homepage
Cool. If you need some extra testers, let me know. I'd love to get something like this to work.
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 19 December 2005 :  11:31:31  Show Profile  Visit MarcelG's Homepage
Well, I've already updated some things at oxle ; http://oxle.com/topic.asp?tid=3438 (login demo/demo).
It's not working correctly for some fonts...???
Andale Mono, Trebuchet MS, Script MT Bold, Stencil and Verdana aren't working yet....

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 19 December 2005 :  11:59:56  Show Profile  Visit AnonJr's Homepage
I took a look from here (work - IE6) and it mostly looks good. I noticed a couple of fonts were off, but after looking at the code, it was correct for the output....

For example, when I looked at it Georgia was showing up as Courier New. But looking at the outputted HTML, I saw Georgia,<span class="CourierNew">Georgia</span class="CourierNew"> ?

Typo or program problem?

I saw the same thing with all the fonts that didn't look right on my PC - they just had the wrong classes. I know I have all the fonts installed - though that could be a problem with other computers...
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 19 December 2005 :  12:01:07  Show Profile  Visit HuwR's Homepage
these fonts will only work if they are installed on the client, so try and stick to the common fonts like arial, helvetica and times, rather than stuff like andale, stencil etc
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 19 December 2005 :  12:16:58  Show Profile  Visit AnonJr's Homepage
I went to the website for one of my reference books, and according to them, these should be common Windows fonts, these should be common Mac fonts, and these should be common Unix fonts.

The Unix list looks a little short to me, but .. this may help in figuring out which fonts to try and support.
Go to Top of Page

pdrg
Support Moderator

United Kingdom
2897 Posts

Posted - 19 December 2005 :  12:37:48  Show Profile  Send pdrg a Yahoo! Message
Interesting site! http://www.htmlref.com/reference/appd/downloadable.htm describes how to make fonts downloadable for windows machines, which may help to some degree too :)
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 19 December 2005 :  12:54:40  Show Profile  Visit AnonJr's Homepage
quote:
Originally posted by pdrg

Interesting site! http://www.htmlref.com/reference/appd/downloadable.htm describes how to make fonts downloadable for windows machines, which may help to some degree too :)


The book has been one of my best references. I'm not sure how well the downloadable part works now... last time I tried it it was a bit of a kludge, not to mention it wasn't very "dial-up friendly".

These guys have a unique method for using Flash to overlay whatever font you want... but its not without its own issues.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.75 seconds. Powered By: Snitz Forums 2000 Version 3.4.07