Solved

One pixel difference between IE and FF

Posted on 2008-06-23
3
485 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

Suggested Solutions

Title # Comments Views Activity
Do alert on select 6 26
IF statment In Powershell 12 28
href return to normal window 5 28
A responsive image gallery using flexbox 6 18
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses how to create an extensible mechanism for linked drop downs.
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 …
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).

756 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