View Full Version : Arial has incorrect line spacing on only one word (Firefox)

04-09-2011, 08:43 PM

Only the word "contact" is affected, and only in Firefox, not Chrome or IE. There are three things I can do to make the problem go away. Just one of these things alone fixes it:

Change the font to Verdana.
Stop using all caps. It doesn't matter if I make all caps with the keyboard or with CSS.
Change the font size to 13px.

The code I'm using is:
#menu-main-nav li strong {

Taking out or changing the letter-spacing doesn't solve the problem. Any ideas what could be causing this?

04-09-2011, 09:00 PM
Hello xing,
You don't provide enough information.
What does the markup look like?
Your CSS is written as if strong were an element. If that's a class in your markup or if you have a strict DocType the strong may be what's wrong.

What little you've given us does not cause the problem you're seeing -

04-09-2011, 10:01 PM
Unfortunately the site isn't live. I'm using a Wordpress template. I'm not sure if this is enough info, but here is the index.html that is rendered when I view the page source:

<ul id="menu-main-nav"><li class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-15 current_page_item"><a href="http://"><span><strong>HOME</strong><span> </span></span></a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://"><span><strong>ABOUT US</strong><span> </span></span></a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://"><span><strong>PRODUCTS</strong><span> </span></span></a>
<ul class="sub-menu">

<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://"><span>Cabinets</span></a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://"><span>Countertops</span></a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://"><span>Wine Cellars</span></a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://"><span><strong>PORTFOLIO</strong><span> </span></span></a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="http://"><span><strong>CONTACT US</strong><span> </span></span></a></li>

This is all of the CSS controlling the menu:

#menu-main-nav {list-style:none;margin:0;padding:42px 10px 0 0;list-style:none;float:right;}
#menu-main-nav a {outline: none;}
#menu-main-nav li {float:left;padding:5px 18px 12px 13px;position:relative;vertical-align:top;height:1%;margin-right: 2px;}
#menu-main-nav ul li {background: none !important;}
#menu-main-nav li.parent:hover {position:relative;}
#menu-main-nav li.parent li.parent:hover {background:none !important;}
#menu-main-nav li.parent li.parent li.parent:hover {background:none !important;}
#menu-main-nav li.parent {letter-spacing:0.2px;}
#menu-main-nav li strong {font-family:Arial;display:block;font-size:14px;}
#menu-main-nav a {display:block;}
#menu-main-nav a:hover {background-position:0 0;text-decoration:none;}
#menu-main-nav .drop {width:156px;padding:0 1px 0 1px;position:absolute;left:-1px;top:25px;display:none;z-index:999;}
#menu-main-nav .sub-menu {display: none;}
#menu-main-nav .drop li.current-menu-item,
#menu-main-nav .drop li.current_page_ancestor,
#menu-main-nav .drop li.hover {z-index:10;}
#menu-main-nav .drop .t,
#menu-main-nav .drop .b {height:10px;overflow:hidden;}
#menu-main-nav .drop .c {width:100%;}
#menu-main-nav .drop ul {margin:0;padding:5px 0 8px;width:156px;list-style:none;}
#menu-main-nav .drop ul li {float:none;padding:0;position:relative;height:1%;padding:0 8px;background:none;}
#menu-main-nav .drop ul a {display:block;height:1%;width: 140px;}
#menu-main-nav .drop ul a span {display:block;padding:7px 13px;height:1%;cursor:pointer;}
#menu-main-nav .drop ul .drop {top:0;left:156px;}
#menu-main-nav .drop ul .drop ul a {background:none;}
#menu-main-nav .drop ul .drop ul a span {background:none;}
#menu-main-nav .drop ul .drop ul .drop a,
#menu-main-nav .drop ul .drop ul .drop a span {background:none !important;}
#menu-main-nav li:hover .drop,
#menu-main-nav li.hover .drop {display:block;}
#menu-main-nav li:hover .drop ul .drop,
#menu-main-nav li.hover .drop ul .drop {display:none;}
#menu-main-nav li:hover .drop ul li:hover .drop,
#menu-main-nav li.hover .drop ul li.hover .drop {display:block;}
#menu-main-nav li.current-menu-parent li a span, #menu-main-nav li.current-menu-item li a span, #menu-main-nav li.current_page_ancestor li a span {text-decoration:none;color:#999;}
#menu-main-nav .drop ul li.current-menu-item ul li a,
#menu-main-nav .drop ul li.current-menu-item ul li a span,
#menu-main-nav li .sub-menu li .sub-menu li .sub-menu li a span {background: none !important;}

I believe it also uses a javascript file that mentions JQuery in the code to make the dropdown (way over my head). I could also post the PHP that mentions the menu if that would help. I might just use Verdana, which solves the problem, but it is bugging me to not know why Arial is different.

04-09-2011, 10:23 PM
Also, any font size 13px and smaller renders just fine. It's only at 13.5px, 14px, and larger that the word "contact" looks weird. Verdana can use any font size with no issues.

04-10-2011, 07:22 AM
Also, any font size 13px and smaller renders just fine. It's only at 13.5px, 14px, and larger that the word "contact" looks weird. Verdana can use any font size with no issues.I don't see the problem in a reduced document viewed in Firefox 4.0 on Windows 7. In fact, the text in general looks much bolder than what I'm seeing in your screen shot.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<title>Demo Document</title>
<style type="text/css">
/* <![CDATA[ */
strong { display: block; font-family: Arial, Geneva, Helvetica, sans-serif; font-size: 14px; font-weight: 800; letter-spacing: 0.1px; }
/* ]]> */
<div><strong>CONTACT US</strong></div>

04-10-2011, 08:13 AM
I have noticed that linked text from time to time has a different size. I bet contact is surrounded by an "A" tag. I've gotten around it by explicitly creating a style for the "A" tag. So if the div is named #peanut, then I create a #peanut a:link. Then it looks fine.