SHOW:
|
|
- or go back to the newest paste.
| 1 | <!DOCTYPE html> | |
| 2 | <html> | |
| 3 | <head> | |
| 4 | - | <style> |
| 4 | + | |
| 5 | <style type="text/css"> | |
| 6 | #container {
| |
| 7 | height:500px; | |
| 8 | width:700px; | |
| 9 | position: relative; | |
| 10 | } | |
| 11 | #temp {
| |
| 12 | position:absolute; | |
| 13 | height:1px; | |
| 14 | overflow: visible; | |
| 15 | top:50% | |
| 16 | } | |
| 17 | #content {
| |
| 18 | position:absolute; | |
| 19 | height:200px; | |
| 20 | width:200px; | |
| 21 | top:-100px; | |
| 22 | } | |
| 23 | </style> | |
| 24 | </head> | |
| 25 | <body> | |
| 26 | <div id="container"> | |
| 27 | <div id="temp"> | |
| 28 | <div id="content"> | |
| 29 | Contenu du div à centrer | |
| 30 | </div> | |
| 31 | </div> | |
| 32 | </div> | |
| 33 | </body> | |
| 34 | </html> |