Firefox <dd> text-indent element woes
So, I was just playing around making开发者_JS百科 some page for fun. I cannot seem to get firefox 4 to not indent a <dd> tag! It completely ignores the text-indent property.
Is this just me? Has anyone else hit this problem? I'm trying to decide if it's me or the browser.
Works fine in Chrome
I'm confident the problem is one or both of these issues:
That page doesn't have a doctype so the browser is using Quirks Mode.
Try adding as the very first line<!DOCTYPE html>
to use Standards Mode.You haven't wrapped those
<dt>
and<dd>
elements inside a<dl>
element. Fixed code:<dl> <dt> <a href="index.xml">Sample Data</a> </dt> <dd> This is just a list of CDs, costs, etc. </dd> </dl>
Looks like you got this sorted out, but what happened there is that in quirks mode the following CSS rules are applied to web pages in Gecko (from http://mxr.mozilla.org/mozilla-central/source/layout/style/quirk.css ):
:not(dl) > dd {
display: inline;
margin: 0;
}
:not(dl) > dd:before {
display: inline;
white-space: pre;
font-size: 1px;
line-height: 0;
content: "\A ";
-moz-margin-end: 40px;
}
and you were seeing the space and margin-end of that :before
pseudo-element.
精彩评论