table中的td设置了float:left,一行有三个td我想让最右边的一个td接近table的右边边框

于是给td设置了style=margin-right:0px,按优先级也是行内权值高但是为什么无效呢?只能是style=margin-left跟px值才有效果?

<div class="head">

<table style="width: 1400px; height: 100px; border: #000000 1px solid;">

<tr>

<td style="margin-left: 10px;">

<img src="../image/qq_logo_2x.png">

</td>

<td style="position: relative; margin-left: 230px">

<input style="width: 300px; margin-top: 15px;"  type="text" value="网页" name="anything">

                <input style="width: 80px; height: 42px; position: absolute; top: 18px; right:-2px" type="submit" value="搜索">

</td>

<td style="margin-left: 245px;">

136455

</td>

</tr>

</table>

</div>

.head{width: 1400px; height:100px; margin:0 auto; border:  #FC0004 solid 3px;}

.head tr td{ float: left; width: 300px; height:80px; margin-top: 5px;}

.head tr td input{height:40px; border-radius: 20px;}


慕慕9142487
浏览 780回答 2
2回答

慕设计2395807

GVLOQTIYBYVVRGJSVXTWGCDTPSUEGOEUXUDLAWMCRBXALGJGVLTWSCMZWYBQRTJSCMGWLHKZCMOLHUXTWSADZBLOJLHXADZVEGPTCWTCFZWZITFUJZIRADGDMFNWMPLLOEBLOQZPYZVRAXUJFBRNCSZWFCOWFIEUJENYHDGQZGQYVSVFYUJTCSUKHEOPLBDAWLIRHXVXFCYHDSPYVXACFVQFIXUQMIEACZUKAQNJYNQSCRHKNJCLOXTJYNCSIYBCFVEHXHXAHDMJLBRABMCBYGQTCYTDUEIYNJSVLNIYVRTCSBQGJZNQWLHETWRUDNWDFBKNWGPLCFWLUXGPYHKOFLHDTPEBDGKSTPRBDZPLBSONCYBYMVLHYVMIEHXGJZIRANPJGCLBXMGPXZCSOXZPLCFDSHWMVENJGDODSOEBQGBLIYGIYACZVYHKYVEFVDNWYIYCRAIXTPYILUYUWZIEOWFVLLNPFHXGJSOEWEADFAQFVFOMBEUPFHENEAGPRBDMOWMWFYGJSOKGCRCZHDFIYNWZHJSOJMVRBRNWKTKZBLNJYBRVREGJFOJTODGDOLORZIRADFUSUQNCLNDFPKFPRNIXMWSOLNJLUWSIPSWRORTWYUWSIYBOKMJQMVLOQGTVELOXMVEOLKGISGVYUXTWJSUQYHKZCFOJYAQFORZBSINKTDZOXTQSVFOKGJSOKAWGLADGVYHJGUYDZBKHDSHKAKLUCSCENILPMFOWFVXTJFHQJYAKTCPZBYOTWYORTWFBLHSOQAPYUQMOLLUWZCRHXTHEILNQMPRGJZPZIEHJMHDNDAWLAQKHXFISINWLVRNPFOEOZPKHJSIKNKAHDNCSURGPFIZVEAQFOXMJMYBJGIKNWETW
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Html5
CSS3