css - How can I breakout a fixed position element from it's parent? -
I have a fixed position element that I want to take to the bottom position and 100% screen width. It keeps taking the width of its parents from the center, the blue container starts with the locatino of red rather than the visual port.
& lt ;! DOCTYPE html public "- // W3C // DTT XHTML 1.0 Transcription // N." http: //www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">" target="_blank; html xmlns = " Http://www.w3.org/1999/xhtml "> gt; Top & gt; & gt; Meta http-equiv =" content-type "content =" text / html; Charset = UTF-8 "/> gt; Title & gt; Untitled Document & lt; / title & gt; & lt; Style & gt; * {Margin: 0; Padding: 0;} & lt; / Style & gt; & lt; / head & gt; & lt; body & gt; & lt; div style = "width: 800px; Background-color: red; Height: 1500px; Margin: 0 auto; Status: Relative; Z-index: 999 "& gt; & lt; div style =" background-color: blue; Width: 100%; Height: 350px; Status: fixed; Bottom: 0;
/ Div>
< / Html>I did not understand what you mean, but you can see the blue element better.
.blue {position: fixed; height: 350px; / * 100% width * / left: 0; right: 0; bottom: 0;}
Comments
Post a Comment