Solved

One pixel difference between IE and FF

Posted on 2008-06-23
3
488 Views
Last Modified: 2013-11-19
Look at the source code underneath. In FF and IE there is a padding difference - FF puts the text exactly one pixel higher towards the border of the yellow box. How can I correct this in my CSS? I want both IE and FF to render exactly the same.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<title>Test site</title>
<style type="text/css">
.BoxTitleMenu {
      line-height:20px;
      background-color:yellow;
      font-family:Tahoma;
      font-size:11px;
      font-color:black;
}
</style>
</head>
<body>

<div class="BoxTitleMenu">
      First line<br />
      Second line
</div>

</body>
</html>
0
Comment
Question by:WebDvlp
[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
3 Comments
 
LVL 30

Accepted Solution

by:
Steggs earned 250 total points
ID: 21845880
try adding padding:0; to .BoxTitleMenu
0
 
LVL 44

Assisted Solution

by:scrathcyboy
scrathcyboy earned 250 total points
ID: 21851629
use overflow:visible; in the CSS.  That is the magic "fudge factor" that M$ came up with to fudge their forced extra-space padding of form and other elements.  It should have been called overflow:hidden, but M$ usually thinks off in another dimension somewhere, so take it for what it's worth.  Someone in M$ decided that EVERYONE should see elements padded in whatever way that M$ wanted.  Duuuhh  !!
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

635 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