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

Background Image align in Firefox vs IE

Posted on 2007-12-06
Last Modified: 2007-12-06

It's a very simple text based menu, but when a menu item is active, I want to display a little triangle under the text.

I have the following CSS, which works perfectly fine in IE but fails in Firefox. In firefox, the image leaves about 5px at the bottom as well.

Pleeeeeeease Help!

	border: 0;
	margin: 0;
	padding: 0;
	list-style-type: none;
#navlist li
	width: 90px;
	height: 20px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	text-align: center;		
	display: block;
 	color: #999999;
	padding-top: 5px;
        /* For Testing ONLY */
#navlist a:link, #navlist a:visited
	color: #999999;
	text-decoration: none;
#navlist a:hover
	color: #99CCFF;
	text-decoration: none;
body#home a#homeActive,
body#products a#prodActive,
body#sizing a#sizeActive,
body#myAccount a#accActive,
body#about a#aboutActive,
body#contact a#contActive
	text-decoration: none;
	height: 20px;

Open in new window

Question by:jset_expert
  • 2
  • 2
LVL 29

Accepted Solution

Göran Andersson earned 250 total points
ID: 20424572
As always, if the page renders differently in Firefox and IE, Firefox is correct...

If you don't put display:block on the links, they are inline elements. Inline elements doesn't have a specific size, so setting a height on them has no effect.

Except in IE, which applies the height to them anyway...

Author Comment

ID: 20424586
but I do have display: block
LVL 29

Expert Comment

by:Göran Andersson
ID: 20424619
You have display:block on the li element, but not on the a element. Unless you have more css somewhere else...

Author Comment

ID: 20424624
ooops sorry...my bad!

Thanks, that worked great!

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help to align the buttons in a row 2 43
Sort Order Icons on HTML Table 3 35
Css regex 6 38
Easy css question moving title underneath an image 4 16
Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

829 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