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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -