Can you apply CSS only on text that is wrapped, i.e. the second and subsequent lines?

Yeah, sort of — I’d suggest combining padding-left and text-indent.

Yeah, sort of — I’d suggest combining padding-left and text-indent: HTML Very long text which is wrapped on the next line Merknaam 2 Merknaam 3 Merknaam 4  CSS . Test { width:200px; } . Test label { display: block; padding-left: 1em; text-indent: -1em; } text-indent applies only to the first line of text in a block-level element, so it should achieve what you want.

See jsfiddle.net/pauldwaite/qUvvv.

I have recreated my problem on jsfiddle: jsfiddle. Net/Kevin1990/UQ3A5 – Kevin Mar 31 at 10:15 1 @Kevin: excellent, cheers. I’d suggest putting you s inside your s (this provides an unbroken click target as well), and use the s to apply the outdent CSS.

See jsfiddle. Net/pauldwaite/qUvvv – Paul D. Waite Mar 31 at 10:22 1 Thanks it works!

– Kevin Mar 31 at 10:28 @Kevin: hurray! – Paul D. Waite Mar 31 at 10:53.

You could wrap the line you want to wrap in a span and apply: display: block; margin-left: 12px; Giving it display: block will make it wrap to a new line and the margin pushes it off to the right.

The text is dynamic so I don't know where the line will wrap – Kevin Mar 31 at 10:16.

No, but you can apply CSS to the first line, so you could reverse your thinking to achieve the same effect. Something like this: . Mytext {margin-left:-5em;} .

Mytext:first-line {margin-left:0;} Here's a JSFiddle example of it working: jsfiddle.net/4ckxJ/3/ See quirksmode.org/css/firstline.html for more info on the :first-line pseudo-class.

That doesn’t actually appear to work though — I think because each line doesn’t have its own individual box (in the CSS box model sense), it’s more like one continuous broken box. – Paul D. Waite Mar 31 at 9:37 eh, I had the wrong jsfiddle link!

Updated to give you a really working version. – Spudley Mar 31 at 9:42 aha, there we go. Looks like you don’t actually need the :first-line bit in there though — if you remove it, it still works.

– Paul D. Waite Mar 31 at 10:00.

As per your updated example, here's a fork JSFiddle float the input and then make the label display block so it floats right in beside it - spacing created with padding and margin, overflow:hidden makes the text "not wrap" - then you also might want to remove the br's from your HTML.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions