2011-04-20 3 views
1

그래서, 나는 아주 간단 정렬 된 목록을 렌더링하지 않습니다. 이것은 내 CSS에도 불구하고 :숫자는

ol#test { display: block; list-style-type: decimal; list-style-position: inside; } 
ol#test li { display: block; width: 176px; margin-right: 20px; } 

나는 심지어 어떤 종류의 상속 우선 순위 문제가 될 수있는 희망과 #test ID를 추가,하지만이 문제를 해결하지 않았습니다. 내가 여기에 누락 뭔가

div#home ol#test li { 
    display: block; 
    margin-right: 20px; 
    width: 176px; 
} 
style....3308249 (line 1035) 
li { 
    line-height: 1.4; 
} 
supert...6247640 (line 40) 
li { 
    margin-bottom: 0.5em; 
} 
supert...6247640 (line 33) 
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { 
    background: none repeat scroll 0 0 transparent; 
    border: 0 none; 
    font-size: 100%; 
    margin: 0; 
    outline: 0 none; 
    padding: 0; 
    vertical-align: baseline; 
} 
reset....7103941 (line 4) 
Inherited fromol#test 
div#home ol#test { 
    list-style-position: inside; 
    list-style-type: decimal; 
} 
style....3308249 (line 1031) 
ol { 
    list-style-type: decimal; 
} 
supert...6247640 (line 32) 
ul, ol { 
    list-style-position: outside; 
} 
supert...6247640 (line 30) 
ol, ul { 
    list-style: none outside none; 
} 
reset....7103941 (line 20) 
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { 
    font-size: 100%; 
} 
reset....7103941 (line 4) 
Inherited fromdiv#welcome.section 
div#home div.section { 
    font-size: 15px; 
    line-height: 20px; 
} 
style....3308249 (line 1011) 
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { 
    font-size: 100%; 
} 
reset....7103941 (line 4) 
Inherited fromdiv#home 
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { 
    font-size: 100%; 
} 
reset....7103941 (line 4) 
Inherited fromdiv#main.container 
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { 
    font-size: 100%; 
} 
reset....7103941 (line 4) 
Inherited fromdiv#wrapper 
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { 
    font-size: 100%; 
} 
reset....7103941 (line 4) 
Inherited frombody.home 
body { 
    color: white; 
    text-shadow: 0 1px #1C1D1E; 
} 
style....3308249 (line 731) 
body { 
    font: 300 13px/18px "Helvetica Neue","Helvetica","Lucida Grande",sans-serif; 
} 
style....3308249 (line 67) 
body { 
    font: 12px/18px "Helvetica Neue","Helvetica","Lucida Grande",sans-serif; 
} 
supert...6247640 (line 3) 
body { 
    line-height: 1; 
} 
reset....7103941 (line 17) 
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { 
    font-size: 100%; 
} 
reset....7103941 (line 4) 
Inherited fromhtml.wf-ffmarketweb1ffmarketweb2-n4-active 
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { 
    font-size: 100%; 
} 
reset....7103941 (line 4) 

있습니까 :

여기에 파이어 버그에서 스타일 추적입니까? 어떤 이유로 든 나는 그 문제를 찾을 수없는 것 같습니다. 이 문제는 Firefox와 Safari에서 동일합니다.

감사합니다.

답변

3

li 목록 항목에 대해 display:block을 설정하지 마십시오. 여기

ol#test li { margin-right: 20px;width:140px; padding:10px; } 

는 jsfiddle입니다 :

http://jsfiddle.net/naveed_ahmad/he9Nm/

+0

(!)를 않았다. 나는 당신이 디스플레이를 설정하지 않아도 될 것 같아요 : LI의 블록 - 나는 그것을 버릇 없게 만들었지 만, 그게 왜 중요 할까 ?? – Andrew

+0

display : block이 왜 목록 항목을 깰 수 있는지에 대한 통찰력이있는 누군가를 희망하여이 "답이없는"것을 몇 분 더 남겨 두겠습니다. 답변 Naveed (조만간 확인하겠습니다)를 보내 주셔서 감사합니다. – Andrew

+0

@Andrew - 목록 항목의 표시는 기본적으로'list-item'이며 따라서 글 머리 기호 나 숫자 또는 브라우저에서 지정한 스타일을 가져옵니다. 그러나 블록 요소로 설정하면 스타일이 적용됩니다. 글 머리 기호 나 번호를 표시하려면'display : list-item'이어야합니다. 당신이 이해하기를 바란다 –

관련 문제