javascript - Making child element have same width and border as parent -
For example, I have a "li" tag that has an "A" tag inside it, Bottom: 1 px solid # ccc;
& lt; Li class = sub "> & lt; / A & gt; & lt; / li & gt;
Currently I have
Duration {width: 90%; Border-bottom: 1 Px solid # ccc; font-size: 12px;} li {width: 100%;}
But it seems that underline text only, I would like to "take" that one Underlines the entire line, but the "Span" tag on "Li" did not write down, so basically my "Span" "Le" is not sure what I am missing on my CSS.
You should understand that span
is an inline element , and there is no such thing as width
to do that span
is for passing the width, you need to make sure that you set display
to a block in the K
element , Your matters In, try inline-block
.
Live example:
Comments
Post a Comment