Why does container size depend on absolute-positioned child?
问题 I am attempting to build a Skype-like interface with two video boxes: http://jsfiddle.net/q9ER2/20/ <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style type="text/css"> html, body { background-color: #000000; height: 100%; font-family: Verdana, Arial, Helvetica, sans-serif; } body { margin: 0; padding: 0; } #videoContainer { position: relative; max-width: 800px; } #bigRemote { /* Shrink if necessary */ max-width: 100%; max-height: 100%; }