Solved

HTML Special Codes

Posted on 2013-06-27
21
239 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 83

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 83

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
Independent Software Vendors: 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 83

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 83

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 83

Accepted Solution

by:
Dave Baldwin earned 500 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 83

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 83

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 83

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 83

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Printing customized headers and footers using html and bootstrap 3 79
SVG and IE11 2 34
Html date format 9 29
Want my table columns to autofit. 7 61
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

734 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