Text-indent doesn't work with firefox?

Does text-indent just not work with firefox? Here is my test:

<p><span class=“sub-menu”>Nav2</span></p>

.sub-menu {
text-indent: 10px;

It indents in IE6. Anyone know how to get it to work in FireFox?

Thanks in advance,


text-indent definetly works in Firefox not sure what the problem is here though :shifty:

It needs to be in the p and not the span :wink:

Applies to: block-level elements, table cells and inline blocks

<p class="sub-menu">Nav2</p>


 .sub-menu {
text-indent: 10px;
[b]display: block;[/b]

Text-indent should only apply to block level elements and indents the first line. If you want to use a span you will need to turn it into display:block.

Otherwise just set the text-indent on the p instead.


Zcorpan beat me to it :slight_smile:

Thanks everyone for the fast response. Problem solved. You rock.

Of course, since you have a SPAN as the first child, you could simply put a left padding on that…