-1

I'm using the <object> tag to display a website in my website (instead of <iframe>).

<object id="iframe" type="text/html" data="http://website.com"></object>

The problem is that if the website in the <object> redirects, my own website will be redirected. I do not have this problem with <iframe>. Ideas?


Instead of using whitespace: no-wrap;

Try using

white-space: pre;

Whitespace is preserved by the browser. Text will only wrap on line breaks Acts like the <pre> tag in HTML.

Updates:

From your comments, you should go with wrap="off" attribute.

Also would like you to go through Textarea Tricks and refer

Nowrap section:

To prevent text from wrapping normally in CSS, you use white-space: nowrap. But for whatever reason, that doesn't work with textareas. If you want to be able to type into textareas and would rather lines do not break until you press return/enter (a horizontal scrollbar is triggered instead), you'll have to use the wrap="off" attribute.

Here is the fiddle

4

1 に答える 1