How to make the first sentence in the last paragraph bold using css? I also want to add an extra addition to the top of this last paragraph so that it wraps around the image. If I increase the registration at the bottom of the floating image, this paragraph is not transferred to the lower left edge of the image, it just flows along the right side - not what I want. I attached the class to the "p" element, since I only want to execute a specific paragraph (and I do not see the ": last-child" pseudo-element, and I do not know if you can use two pseudo-elements per element or class).
#wf_mainContent_left p.last_wfp:first-line {
padding-top:20px;
font-weight:bold;
color:red;
}
HTML
<p class="last_wfp">This is the first sentence that I want bold and red. This is the second
sentence that I don't want that treatment.</p>
This highlights both sentences when I want only the first sentence, even if they are on the same line. This should be done in accordance with this tutorial . And there is no effect on the gasket. I tried adding a tag <br>, but it adds a lot of space. And I tried styling the tag <br>, but that is not possible according to this post I just read. Anyway, I just want the first line to be bold, and not both sentences.
source
share