How to set child width equal to parent element width with css? -
my html is:
.parent .child
and .parent width not determined value, .child width 100%, both child , parent has own border, @ last child element width less 2px parent's width,
how can set child width equal parent element width css?
make sure child element display: block;
(many elements default) , don't set width it. block elements take horizontal space can default.
Comments
Post a Comment