Solved

One pixel difference between IE and FF

Posted on 2008-06-23
3
480 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
3 Comments
 
LVL 30

Accepted Solution

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

Assisted Solution

by:scrathcyboy
scrathcyboy earned 250 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

771 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now