Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

One pixel difference between IE and FF

Posted on 2008-06-23
3
Medium Priority
?
492 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:
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
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. …
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

721 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