Text-indent doesn't work with firefox?

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

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

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

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

Thanks in advance,
B

Hello

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:

‘text-indent’
[…]
Applies to: block-level elements, table cells and inline blocks

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

or

 .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.

Edit:

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…