本文介绍了右侧的css text-indent等效项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的文本在右侧对齐,我希望它像在右侧使用文本缩进bur一样将其向左推动一点.有什么解决办法吗?我一直在尝试使用margin,但是IE9将第一个菜单项(?)的margin翻了一番.

I have right-side aligned text and I want it to push it a little bit left like you do with text-indent bur on the right side. Any solution with that?I've been trying with margin, but IE9 doubles the margin on the first menu item (?).

这里有CSS:

h99
{ padding: 0px;
    font-family: lucida, sans-serif;
    font-size: 16px;
    font-weight: bold;
    line-height: 40px;
}

#menublock
{ width: 230px;
    height: auto;
    float: left;
    text-align:right;
    margin-right: 0px;
}

ul
{ list-style-type: none;
  margin:0;
  padding:0;
  overflow: hidden;
}

ul a:link, ul a:visited
{ display: block;
  width: 210px;
  background: transparent;
  text-align: right;
  text-transform: uppercase;
  text-decoration: none;
    height: 40px;
    color: #ffffff;
    padding: 0px;
    margin: 10px;
}

ul a:hover, .selected
{ background: #484848 !important;
  color: #ffffff !important;
}

菜单是一个简单的水平菜单.

The menu is a simply horizontal one.

推荐答案

没有,很遗憾,css中没有文本突出显示,但是,对于某些短文本,您可以使用文本方向direction:rtl;,这样缩进将出现在另一侧.

There is none, unfortunately there is no text outdent in css, hower, you could use text direction direction:rtl; for some short texts, in that way indent will appear on the other side.

这篇关于右侧的css text-indent等效项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 05:48