html - Width and text-align property -


why text-align , width not applying inline element. jsfiddle example. can prooflink css spec?

width

10.3.1 inline, non-replaced elements

the 'width' property not apply. computed value of 'auto' 'margin-left' or 'margin-right' becomes used value of '0'.

text-align

16.2 alignment: 'text-align' property

  • value: left | right | center | justify | inherit
  • initial: nameless value acts 'left' if 'direction' 'ltr', 'right' if 'direction' 'rtl'
  • applies to: block containers
  • inherited: yes
  • percentages: n/a
  • media: visual
  • computed value: initial value or specified

quotes css 2.1 specification.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -