Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE/FF Discrepancy - CSS Odd Space? 1

Status
Not open for further replies.

fallenacorn

Technical User
Nov 9, 2004
7
US
ack. this is driving me nuts. i've got these CSS tabs going.


Everything is PERFECT in IE (figure that), but in firefox, there is an odd block of space along the top of the tabs.

if i make the menu background clear, my "active" tab gets a
1px line thru it, spoiling the tabbed-page effect. [mad]

eh?
 
Add this to your CSS:

Code:
dl {
	padding: 0;
	margin: 0;
}

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
It eliminates default margin and padding from the element and sets it to 0. Some block elements have certain margins and padding by default.
 
Thanks Vrag.

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
To add to this:

Certain browsers add certian padding at certain times. In other words: all browsers add the correct padding and margins, while IE decided to add its own.

Therefore, you will often find padding/margin descrepencies between different browsers.

The Unordered List is a good example. IE adds a left-margin to unordered lists, while other browsers add left-padding.

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top