Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 向左移动按钮不起作用_Css_Twitter Bootstrap - Fatal编程技术网

Css 向左移动按钮不起作用

Css 向左移动按钮不起作用,css,twitter-bootstrap,Css,Twitter Bootstrap,我使用下面的代码,我需要把编辑和删除条件,但 问题是,我希望详细信息接近于删除,而不是当前的删除 向右移动,我尝试向左移动,也尝试使用“margin left:20px”,但它不移动, 我应该怎么做?将细节移到更靠近删除的位置 @if (ViewBag.is) { <td> @Html.ActionLink("Edit", "Edit", new { id = item.ID }) |

我使用下面的代码,我需要把编辑和删除条件,但 问题是,我希望详细信息接近于删除,而不是当前的删除 向右移动,我尝试向左移动,也尝试使用
“margin left:20px”
,但它不移动, 我应该怎么做?将细节移到更靠近删除的位置

@if (ViewBag.is)
        {
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.ID }) |
                @Html.ActionLink("Delete", "Delete", new { id = item.ID }) |
            </td>


        }
        <td style="left: 20px">@Html.ActionLink("Details", "Details", new { id = item.ID })</td>
@if(ViewBag.is)
{
@ActionLink(“编辑”,“编辑”,新的{id=item.id})|
@ActionLink(“删除”,“删除”,新的{id=item.id})|
}
@ActionLink(“详细信息”,“详细信息”,新的{id=item.id})

它向右移动是因为您将它从
向左移动了20px
您应该使用
marginright:20px
将其向左移动

使用



@Html.ActionLink(“详细信息”,“详细信息”,新的{id=item.id})

@Html.ActionLink(“详细信息”,“详细信息”,新的{id=item.id})
编辑@aashi评论中的

如果使用
div
而不是
td
then样式,效果会更好 该div到位置:相对n给出右/左:0


你想要这样的东西吗。你可以定位你的按钮,把它添加到你的css
。右btn{position:relative;right:10px}

@HolgerTans:然后试试左:-20px;右、左值与位置一起使用:绝对,相对的或固定的我也不确定abt能不能not@aashi:我认为他应该使用divya right-then样式,该div的位置:relative n give right/left:0@aashi:我已经添加了你的建议,请查看文章中的图片。尝试此..将类添加到你的中,并使其文本对齐:居中..或者将你的代码放在一个具有正确btn的类中并添加css.right btn{position:relative;right:10px}
<td style="margin-right: 20px">
  <td style="left: -20px">
 <td style="margin-right: 20px">@Html.ActionLink("Details", "Details", new { id = item.ID })</td>
 <td style="margin-left: -20px">@Html.ActionLink("Details", "Details", new { id = item.ID })</td>