2010-05-19 69 views
0

我不是css專家,所以我想知道是否有人可以提供幫助。我有幾個方式,刪除這樣一個項目:css問題 - '帖子鏈接'

<form action="/Items/DeleteItem" class="deleteForm" method="post"> 
        Some text 
             <input id="Id" name="Id" value="14014" type="hidden"> 
             <input value="Delete" class="link_button" type="submit"> 
           </form> 

這應該是這樣的:

一些文本刪除

這裏是一些文本「描述該項目,並刪除是一個「鏈接」它執行一個post請求來刪除該項目(因爲幾乎所有的瀏覽器只支持該帖子並獲取請求)。

我已經開始設計樣式(下面的CSS),但'刪除''鏈接'與'某些文本'(至少在Firefox中)相比仍然略有偏移。我將不勝感激任何幫助的CSS。謝謝!

.link_button 
{ 
    background-color:white; 
    border:0; 
    color:#034af3; 
    text-decoration:underline; 
    font-size:1em; 
    font-family:inherit; 
    cursor:pointer; 
    float:left; 
    margin:0; 
    padding:0; 
} 

.deleteForm 
{ 
    float:right; 
    margin:0; 
    padding:0; 
} 

基督教

回答

1

您可能需要使用不同類型display的提交按鈕,而不是浮動的。使其成爲inline將使其表現得像文字一樣。這裏是所有顯示值的explanation;最重要的是block,inlineinline-block

請注意,您可能需要使用<button type="submit" class="link_button">Delete</button>,因爲它比<input>提供更多的靈活性。

+0

感謝內聯位幫助! – cs0815 2010-05-19 14:17:47