Position: fixed will display: block?

i was tested when working on chrome or firefox, except, i.e.,
position: fixed will display: block?
this is an html test: http://sking7.github.com/fix.html
the code will warn two times, the first is display, the second is document.compatMode
why? w3c said that?

+2
css
source share
1 answer

Ok, I found the w3 specifications for this :

9.7. The relationship between "display", "position" and "swimming"

Three properties that affect the creation and layout of boxes - “display”, “position” and “float” - interact as follows:

  • If "display" is set to "none", then "position" and "float" are not applied. In this case, the element does not generate fields.
  • Otherwise, if "position" is set to "absolute" or "fixed", the field is absolutely positioned, the calculated value of "float" is equal to "none", and the display is set in accordance with the table below. The position of the field will be determined by the properties "from above", "right", "bottom" and "left" and the block containing the block.
  • Otherwise, if "float" has a value other than "none", the field floats and "display" is set in accordance with the table below.
  • Otherwise, if the element is the root element, "display" is set according to the table below, except that in CSS 2.1 undefined, the specified "list-item" value becomes the computed value of 'block' or 'list- item '.
  • Otherwise, the rest of the display property values ​​are displayed as indicated.
  Specified value Computed value

 inline-table table

 * inline *, table-row-group, table-column, 
 table-column-group, table-header-group, 
 table-footer-group, table-row, table-cell, 
 table-caption, inline-block * block *

 others same as specified
+3
source share

All Articles