开发者

No linebreak in ASP.NET

just wanna ask is it possible to remove the linebreaks? Now I开发者_运维问答 want to have a row of textbox, buttons and a combobox, but the combobox will be at new line when I run the application. So is there a way to stop it from going to a new line? Thanks.


Setting the form elements style display property to "inline" will ensure they fall on the same line until they run out of space, at which point of course, they have to go to the next line. Now you can set the height and width properties on the form elements so they all fit on the same line, and even expand to fill the available space if needed.

The combo box should have it's style display property set to block, so it will fall on the next line automatically. EX: Style="display:block"


Are you running out of vertical space? Inline is the solution if not, as some elements may default to block and add a new line.

But if you want everything to be on the same line, but are running out of space, you could try specifying for a root element style="white-space:nowrap;". I forget if it's white-space or whitespace, but either it would prevent wrapping of elements that way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜