CSS position relative without relative width?
问题 I'd like an element to have relative positioning. But I don't want its child element (with position:absolute ) to have relative width to the parent. For example: http://jsfiddle.net/t2yJP/. I'd like the second body>div to have position:relative , but have its child's width maintain the same behavior. 回答1: How about this jsFiddle. But you should really rethink your strategy. In your fiddle, your second example only works because the parent div is not positioned and therefore, the .abs div is