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 To Create A Stacked Gallery Using HTML And CSS Source Code

» Creating A Pure CSS Preloader - Source Code

» How to create a Fullscreen Background Video(Source Code)

» How to use the CSS Negation and Language Selectors.

» Learn how to use CSS box shadow property - Source Code

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
3 weeks ago

Mr.

(sel


3 weeks ago

Mr.

(sel


3 weeks ago

Mr.

555


3 weeks ago

Mr.

555


3 weeks ago

Mr.

5550


3 weeks ago

Mr.

5550


3 weeks ago

Mr.

555


3 weeks ago

Mr.

555


Subscribe
  • ADVERTISEMENT

YOU MAY LIKE THESE POSTS

share