html - containing an absolute element within a parent element -
I find it strange that my whole element is completely out of the original element, I want it to be 100% It is completely contained within, nothing outside of it, but it does not seem like how it is. The whole element starts from the left and above only the basic element, the whole element is at 100% of the rest of the document.
HTML
& lt; Div id = "box" square = "home_box" & gt; & Lt; Div class = "box_howor" & gt; & Lt; / Div & gt; & Lt; H3 & gt; Title / h3> & Lt; P & gt; Content & lt; / P & gt; & Lt; / Div & gt;
css
#box {height: 200px; Width: 400px;} .box_hover {background: # 000; Height: 100%; Opacity: 0.1; Status: Completed; Width: 100%;}
As you can see the height and width is 100% what am I doing?
should be status: relative
, status: fixed
, or position: absolute
for a position: absolute
child element to be deployed to it.
An element located in the ly will be located in the position of the nearest parent, whose status is set to relative
, complete
, Or fixed
without such a parent, it will be positioned in relative positions of the body.
Status: relative
for #box
for the most likely who you are looking for.
Comments
Post a Comment