Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arial has incorrect line spacing on only one word (Firefox)



    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 {
    font-family:Arial,Geneva,Helvetica,sans-serif;
    display:block;
    font-size:14px;
    letter-spacing:0.1px;
    font-weight:800;
    }

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

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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 -
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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:

    Code:
    <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>
    </ul>
    </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>
    </ul>
    This is all of the CSS controlling the menu:

    Code:
    #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.

  • #4
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #5
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,338
    Thanks
    29
    Thanked 282 Times in 276 Posts
    Quote Originally Posted by xing View Post
    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.

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
    	<head>
    		<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; }
    			/* ]]> */
    		</style>
    	</head>
    	<body>
    		<div><strong>CONTACT US</strong></div>
    	</body>
    </html>
    Last edited by Arbitrator; 04-10-2011 at 06:29 AM. Reason: Fixed a grammatical issue.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #6
    Regular Coder
    Join Date
    Aug 2002
    Location
    San Francisco
    Posts
    455
    Thanks
    19
    Thanked 15 Times in 15 Posts
    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.
    Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read. Groucho Marx


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •