hyperlink - space between two spans in a link is unclickable -
i have following html code:
<a href="#"> <span class="span1">test</span><span class="span2">test</span> </a>
and css code:
.span1{float: left; } .span2{float: right; }
so link test test
40px space between 2 words "test" , "test". created space using css, not
or typing space keyboard.
the words "test" , "test" both click-able space between them not.
how can make space between 2 spans click-able? have tried wrap both of span tags in span tag didn't help.
thank you.
because span
s forced block
display (by virtue of having given them float
properties), need make sure a
has block
display , either overflow: hidden
or clearfix such contain space (and intervening space) occupied contents:
a { display: block; *zoom: 1; } a:after { clear: both; content: " "; display: table; } .span1 { float: left; } .span2 { float: right; }
edit: based on reported weirdness in ie7:
*+html * { cursor: pointer; }
Comments
Post a Comment