Author |
Topic  |
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
Posted - 19 December 2005 : 08:01:16
|
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
|
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 -
|
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 19 December 2005 : 09:05:22
|
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? |
 |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 19 December 2005 : 09:09:38
|
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 |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 19 December 2005 : 09:17:16
|
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.” |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 19 December 2005 : 09:30:08
|
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? |
 |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 19 December 2005 : 09:31:05
|
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 |
 |
|
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
Posted - 19 December 2005 : 10:00:24
|
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 |
 |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 19 December 2005 : 10:09:51
|
yes, it should work fine. |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 19 December 2005 : 10:40:10
|
Cool. If you need some extra testers, let me know. I'd love to get something like this to work. |
 |
|
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 19 December 2005 : 11:59:56
|
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... |
 |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 19 December 2005 : 12:01:07
|
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 |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 19 December 2005 : 12:54:40
|
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. |
 |
|
Topic  |
|