| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> |
| 2 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 <head> |
| 4 <title>CSS Test: Position set to 'fixed'</title> |
| 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> |
| 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtal
bot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 --> |
| 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-p
osition" /> |
| 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-po
sition" /> |
| 9 <meta name="flags" content="interact" /> |
| 10 <meta name="assert" content="The 'position' property applies the value '
fixed' and places the element out of flow of the document and locks it to a spec
ific point on the viewport." /> |
| 11 <style type="text/css"> |
| 12 #wrapper |
| 13 { |
| 14 height: 3000px; |
| 15 } |
| 16 #div1 |
| 17 { |
| 18 background: red; |
| 19 border: 3px solid orange; |
| 20 } |
| 21 #div2 |
| 22 { |
| 23 background: blue; |
| 24 color: white; |
| 25 left: 1in; |
| 26 position: fixed; |
| 27 top: 1.75in; |
| 28 } |
| 29 </style> |
| 30 </head> |
| 31 <body> |
| 32 <p>Test passes if there is no red, if the blue stripe is just as wide an
d just as tall as its text and if the blue stripe is completely shifted below th
e orange line. Also when scrolling, the blue stripe must stay at its same positi
on on the screen, all other content can scroll.</p> |
| 33 <div id="wrapper"> |
| 34 <div id="div1"> |
| 35 <div id="div2">Text sample</div> |
| 36 </div> |
| 37 </div> |
| 38 </body> |
| 39 </html> |
| OLD | NEW |