?
Solved

HTML Special Codes

Posted on 2013-06-27
21
Medium Priority
?
241 Views
Last Modified: 2013-06-28
It appears that HTML special codes work sometimes but not all the time.

Using FireFox, please look at http://tchristy.net/dev/subcategory.php?pr=jse&cat=Hose+%26+Garden+&subcat=Sprayers&expandable=0&subexpandable=2&subsubexpandable=23

Notice the top item in the Sprayers list has the special character 1/2.

Then click Read More on that item. Note that the large text at the top has 3   Actual Gallon Sprayer. Note the special char for 1/2 is missing.

View Source. The code ½ (for 1/2) is there but not displayed.

Why?
0
Comment
Question by:Richard Korts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
21 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39283097
Except that your image on the 'Read more' page does not show up in IE, it all works fine in IE and Firefox here.  You might want to remove the spaces on the left in front of your DOCTYPE and I don't know if IE likes 6 decimal places in the image width.  I've never used anything but integers for image width and height.

Oops, sorry, I missed the one in the header.  Have you checked to see if your font actually has the 1/2 character in it?  It doesn't necessarily have to.
0
 
LVL 6

Expert Comment

by:Michael
ID: 39283105
the 1/2 is indeed not showing up in Chrome.
Perhaps the reason is because you're using a cufon font which doesn't have the 1/2 character?
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39283107
Is this line supposed to be 'helvetica' instead of 'homevetica'?

<script type="text/javascript" src="js/homevetica_italic_900.font.js"></script>
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39283121
works on chrome
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39283148
No, it doesn't.
3 gallon
0
 

Author Comment

by:Richard Korts
ID: 39283152
Dave Baldwin,

Where are you seeing "homevetica"? It is not in the source of the product detail page.

Thanks
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39283160
Yes, it is.  Line 12.  Would I lie to you?
0
 

Author Comment

by:Richard Korts
ID: 39283164
To all,

This is at the bottom of some pages: <script type="text/javascript"> Cufon.now(); </script>

I inherited this design. What is Cufon_now() ?
0
 

Author Comment

by:Richard Korts
ID: 39283181
Here is a script in the js folder called by that name; it's source is attached.

What a mess, I don;t need all this I'm trying to do something simple.

Does that mean other HTML codes will not work either?
homevetica-italic-900.font.js
0
 

Author Comment

by:Richard Korts
ID: 39283184
Dave Baldwin:

The non integers on image dimensions are because they are calculated by php (based on the ACTUAL image size). I forgot to use intval(), etc.

Everything else works fine. I should clean that up, but............
0
 

Author Comment

by:Richard Korts
ID: 39283227
To Dave Baldwin

The lines with those several javascript references are in a file called scripts.php; it's attached.

As an experiment, I just removed all the lines near the top that start: <script type="text/javascript"

That made the 1/2 code to display on the detail page heading, but it screwed up a WHOLE bunch of other things.

My inclination is just to leave 1/2, 1/4, etc as 3 characters of text & forget the special codes; but I am using other special characters like the degree symbol, the R in a circle, etc.

Those are not USUALLY in the title, but I'm not positive they will not be used in other places where this cufon nonsense is in effect.

I'm getting the impression that cufon is only used in some places; but the css makes no references (in the css files).

What a mess!!
scripts.php
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 39283348
These four scripts are for the 'Cufon' font substitution.  I believe the 'Cufon_now()' activates the substitutions.
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/helveticatitle_400-helveticatitle_700.font.js"></script>
<script type="text/javascript" src="js/homevetica_italic_900.font.js"></script>
<script type="text/javascript" src="js/custom.js"></script>

Open in new window

The middle two are the font definitions and the bottom one is basically the CSS redefinition for a number of elements.  A simple explanation: http://css-tricks.com/snippets/html/cufon-101/
0
 

Author Comment

by:Richard Korts
ID: 39284730
Dave Baldwin,

Do you think that if I removed Cufon_now() from a specific page it would stop activation of the cufon font (& thus NOT override the 1/2, etc., chars). I also thought of making an h1 style that was Arial, 18 pt, Italic so I could change that headline to a readable format.

Thanks
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39284894
I don't know for sure, I don't use Cufon.  Make a backup copy and try it.  That's what I would do.
0
 

Author Comment

by:Richard Korts
ID: 39284922
Dave Baldwin,

I tried a bunch of things; the cufon seems to override everything. Just to make sure the h1 styling was taking place, I made the font size enormous (32 pt); it does not take. Maybe I got it wrong. Does this look OK to you:

<h1 style="font-size: 32pt; font-family: Arial; font-style:italic;"><strong>content</strong></h1>
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39284996
"js/custom.js" re-styles a lot of things and I believe 'h1' is one of them.  It's probably overwriting what you are putting in there.
0
 

Author Closing Comment

by:Richard Korts
ID: 39285066
The problem is not solved; thanks for your efforts.

I need to explain to the client that we can't use those fraction codes.
0
 

Author Comment

by:Richard Korts
ID: 39285483
To Dave Baldwin

Can you look at this?

http://stackoverflow.com/questions/2738303/how-to-disable-cufon-on-certain-elements/2740784#2740784

The item by Michael Collier

I don't understand "Usage: remove_cufon('#name')".

What is #name? Is that the context of <a name="name">...</a> so I have to enclose the element I don;t want "cufonized" in this structure?
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39285750
I don't know.  You'll just have to try some things and see what works.
0
 

Author Comment

by:Richard Korts
ID: 39285956
Dave Baldwin

I figured it out; you put it in a div & give the div an id='h1ar'. Then in Javascript you put remove_cufon('#h1ar'); as well as those other functions.

It suppresses cufon. Now to find a font that looks ALMOST like that; Arial ain't close.

Thamks
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39285971
And that gets back to the original reason to use Cufon in the first place.  To use a font that Doesn't look like Arial or one of the standard web fonts.  I have this page to show what some of the most common fonts look like: http://www.dibsplace.com/webdev/fontshow.html
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question