2017-02-23 63 views
0

不需要換行我有我的服務器上執行以下代碼:Optimizepress:當輸入爲內段落標記

<p>This is a test to determine why the <input type="text" style="text-align: center;" value="input"/> element is created on a new line when on a wordpress page.</p> 

這會產生什麼,我想看到的 - 不換行:

This is what I want to see, no line breaks

然而,在我使用Optimizepress「自定義HTML元素」的wordpress網站上,輸入元素前後會產生換行符:

Line breaks before and after input element

有什麼建議嗎?

回答

0

您提供的這段代碼將按照您的預期生成輸出。但是,有一些其他CSS屬性正在應用於輸入標記。

您可以檢查元素並檢查正在應用的屬性。在wordpress中,當我們保存頁面時,很多時候結構都會改變。所以重新檢查。

如果您希望我深入瞭解,請提供更多信息。希望這能解決你的問題。

0

我最終通過在元素樣式中包含它們來玩[margin],[padding]和[display]設置。這似乎是[display:inline]。

<p>This is a test to determine why the 
<input type="text" style="text-align: center; width: 100px; margin: 0px; padding: 0px; 
display: inline;" value="input"/> 
element is created on a new line when on a wordpress page.</p>