Simple CSS question

In CSS what on earth is white-space: nowrap; ?

Comments

  • : In CSS what on earth is white-space: nowrap; ?
    :
    :
    Try these code examples:
    [code]


    I will ask google before asking dumb questions,
    I will ask google before asking dumb questions,
    I will ask google before asking dumb questions.

    [/code]
    [code]


    I will ask google before asking dumb questions,
    I will ask google before asking dumb questions,
    I will ask google before asking dumb questions.

    [/code]
    Now, if you test these, then in the first case, the sentences get shown on multiple lines, that is, the paragraph is wrapped.

    In the second case "white-space : nowrap;" does not allow the text to be wrapped, so the browser will make a horisontal scroll bar in order to scroll through the text.

    Hope this helps.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion