4

So i'm trying to assign a hyperlink to a single word in a {p} tag in an .aspx page in MS expressions.

My problem: when i try to do this:

    <p>Some text with a <a href="******">HYPERLINK</a> then there's more text here like this</p>

it shows up in the browser as such:

some text with a

HYPERLINK

then there's more text here like this

I'm trying to get it all on one line like it should be.. any ideas??

4

3 回答 3

5

My best guess, is that your anchor tag is styled as display : block, can you confirm this by using inspect element, or providing a link to where this bug is occurring?

于 2012-06-23T03:58:33.777 回答
0

使用Nobr html 标签。介于两者之间的任何内容都不会分成多行。

<a href="#"><nobr>My long sentence</nobr></a>
于 2012-06-23T04:03:43.143 回答
0

<nobr>标签已弃用。

一个可以使用:空白:nowrap;

<a style = " white-space:nowrap; " href="******">HYPERLINK</a> 
于 2018-11-06T20:34:19.373 回答