小编J.D*_*.D.的帖子

对齐文本中心(减号)10px

我有一个由1px的高(重复无限期)使用的图像170像素宽的菜单系统,它在左边10px的边界,但右侧的边框30像素.

有没有办法使文本居中,但是在右侧占了额外的20px?

小提琴SiteCode:http://jsfiddle.net/jgallaway81/AXVT5/1/

相关守则:

.menubuttonthin {margin-left:0px; margin-top:0px; margin-bottom:0px; width:170px; height:30px; display:block; line-height:30px; font-family:courier; font-size:small; color:#C8C8C8; text-decoration:none; font-weight:900; background-image: url(../_pic-lib/lcars-frame-button-thin.png); }

<a href="http://www.fccorp.us/index.fccorp.php" class="menubuttonthin"> FCCorp.US Story </a>
Run Code Online (Sandbox Code Playgroud)

正如您所看到的,我没有div'd链接,因为它们由创建菜单区域框的div封装.此外,我已尝试边缘和填充两侧,但所有这一切都是增加teh框的大小,抛弃背景图像,使其与网站的背景图像不匹配.

css text-alignment

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

css ×1

text-alignment ×1