badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

"Pre" paragraph style in different browsers

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #24373
    Elena
    Participant

    Hello,

    I would like to use “pre” paragraph style in my web (www.isabelferrera.com) but I have seen that when I open the site in Firefox the paragraph appears in only one line and with an horizontal scroll bar under. http://awesomescreenshot.com/image/147029/d78de9d2cc2beee228d695072eb2d9ed

    While in Chrome it appears fine in as many lines as necessary without avoiding scrolling. http://awesomescreenshot.com/image/147028/b9464c229e974eb24c244c8cd01bbbfb

    Is there a way that I can make it that in all browsers appears as in Chrome?

    Thank you for your help.

    #24510

    Hi Elena,

    The <pre> tag defines preformatted text.
    Text in a <pre> element is displayed in a fixed-width, and it preserves both spaces and line breaks.

    So you have to break the line in editor like below

    <pre>
    Acinas SG*, Ferrera I*, Sarmento H, Díez-Vives C, Forn I, 
    Ruiz-González C, Cornejo-Castillo FM, Salazar G, Gasol JM. 2015. 
    - Environmental Microbiology * Equal contributors.
    </pre> 

    Thank you!

    #24523
    Elena
    Participant

    Thank you, but if I break the line the text appears in different boxes not in a single block. See image http://awesomescreenshot.com/image/171568/f3996417af64f1873eb076f285756273

    As I mentioned in some browrsers works just fine but scrool appears in others, and what I would like the text to appear as it does in Chrome like a paragraph mantaining its breaks. Please let me know if it is possible.

    Thank you

    #24631

    Hi Elena,

    We have researched about it and found CSS code to fix it.
    Go to Appearance -> Theme Options -> Design Options Tab -> Custom CSS paste the following CSS code and Click on save all changes button:

    pre {
        white-space: pre-wrap;
    }

    Thank you!

    #24639
    Elena
    Participant

    Works perfecte. Thank you!!!

    #24664

    That’s great Elena

    Thank you!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.