导航栏栏目之间距离想变大些,如何更改css

html-css010

导航栏栏目之间距离想变大些,如何更改css,第1张

.mainNav li a{ float:leftmargin-top:4pxpadding-right:3pxbackground:transparent url(/ou/navline.png) no-repeat right center}

中的padding,改成padding:0px 10px就ok了

就是说,只需调节li里面的a的padding的左右值就行

很简单呀,看过来:

<body>

<div class="all">

<p>栏目标题</p>

<p><a href="#">更多>></a></p>

<div style="clear:both"></div>

</div>

</body>

<style>

a{ display:inline-blockcolor:#000text-decoration:none}

.all{ width:50%margin:0 autobackground:#cccpadding:0 20px}

.all p:first-child{ float:leftfont-size:16pxcolor:#000line-height:1.5}

.all p:nth-child(4n+2){ float:right}

</style>

还有不懂的可以继续问我。

纯手打,望采纳~