Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

One pixel difference between IE and FF

Posted on 2008-06-23
3
Medium Priority
?
495 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:
Mark Steggles earned 1000 total points
ID: 21845880
try adding padding:0; to .BoxTitleMenu
0
 
LVL 44

Assisted Solution

by:scrathcyboy
scrathcyboy earned 1000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

885 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