1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<!DOCTYPE html> <meta charset=utf-8> <title>Parent node visible with absolutely positioned children, where ancestor overflow is hidden</title> <style> body { overflow: hidden; height: 0; width: 0; } .child { position: absolute } </style> <div id=parent> <div class=child>grated</div> <div class=child>cheese</div>