How do I wrap text in a pre tag?[SOLVED]
Make money for being or staying online/internet.

You will get a $50 starting gift when you join using this code: Exode4LKrbujm1z and link:: GET THE OFFER NOW!!

Definition and Usage

The pre tag defines preformatted text. 

Before you get to what brought you here, first take a second to under what the pre tag is.Text in this element is displayed in a fixed-width font, and it preserves both spaces and line breaks.

Incase you are wondering on how you can make the text word-wrap inside this pre tag instead of printing out one long line on small screen devices.Then you are in the right place.

Solution.

Place this simple css code in the styling sheet file linked to your webpage.


pre {
    white-space: pre-wrap;       /* Since CSS 2.1 */
    white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
    white-space: -pre-wrap;      /* Opera 4-6 */
    white-space: -o-pre-wrap;    /* Opera 7 */
    word-wrap: break-word;       /* Internet Explorer 5.5+ */
}

 

Hope this post helped you.

Save up to 80% with this Domain & Shared Hosting package deal! 80% OFF - GET OFFER NOW

Related Post(s)

» How do I wrap text in a pre tag?[SOLVED]

» CSS explained in a few lines

» How to create Text Animation using HTML and CSS

» Learn how to create a custom scrollbar with CSS.

» How to center anything on a wepage using CSS

collections_bookmark Category :: Css
date_range Published :: 5 years ago At: 10:21 AM
event_note Detailed Date :: Dec 03rd, 2018
person Writer :: Timothy
  • RECENT POSTS
1 day ago

Mr.

(sel


1 day ago

Mr.

(sel


1 day ago

Mr.

555


1 day ago

Mr.

555


1 day ago

Mr.

5550


1 day ago

Mr.

5550


1 day ago

Mr.

555


1 day ago

Mr.

555


Subscribe
  • ADVERTISEMENT

YOU MAY LIKE THESE POSTS

share