<a
to 100% width开发者_运维知识库 inside a <td
???
thank you
A link <a>
is inline element, you can't apply a width to it unless you make it block-level element:
#tableID td a{
display:inline-block;
width:100%;
}
The above selector will make all links inside td
inside table with id #tableID
block so that width
is applicable.
Check out Inline and Block elements for more info
Give the <a>
element display: block;
and it will gain the full width of its parent.
Working demo: http://jsfiddle.net/sUT5e/
精彩评论