开发者

Is it possible for a nested element's background to stretch to an absolute position inside that's in a fixed width/centered parent? [Image inside]

开发者 https://www.devze.com 2023-03-20 20:46 出处:网络
The header text would开发者_运维知识库 live inside the wrapper[white] which is centered. The header has a background[green] that is positioned all the way to the left 0px position, which would need

Is it possible for a nested element's background to stretch to an absolute position inside that's in a fixed width/centered parent? [Image inside]

The header text would开发者_运维知识库 live inside the wrapper[white] which is centered. The header has a background[green] that is positioned all the way to the left 0px position, which would need to be fluid when resizing. The header text would be left aligned with how the wrapper text is positioned.

Is this possible?


The negative margin will work very well for this!

http://jsfiddle.net/6Dbq8/1/


Yes, try negative margin, or absolute positioning.

0

精彩评论

暂无评论...
验证码 换一张
取 消