javascript - CSS Style only text within a paragraph tag -


i have page of text , formatted similar this

<div class="container">     <p style="text-align: center;">         <span style="text-decoration: underline;">             <strong>                 <img src="//cdn.shopify.com/s/files/1/0652/9219/files/horizontal.jpg?13817493546805475501" alt="">             </strong>         </span>     </p>     <p style="text-align: center;">         <span style="text-decoration: underline;">             <strong>the hosting</strong>         </span>     </p>     <p>         in-laws arriving, friends in town, , heading abode night filled holiday cheer. stress levels tend rise during these events, expenses well. here few tips nail hostess game, without breaking bank , <em>still</em> shopping consciously.      </p> </div> 

i looking keep images fit entire content width of class container same change text within paragraph tags either smaller width (so looks indented on both sides) or have margins not affect images @ all. cannot change how code outputted images wrapped in paragraph tags.

this code small sample on page of content , there several images , text throughout.

so looking way in css style actual text within paragraph tags , leave images unchanged. great.

here fiddle example: https://jsfiddle.net/jpautt8v/

if html static or if know child want modify use nth child css selector apply css below 3rd in sample code case. play around margins , see works best solution.

p:nth-child(3)  {    margin: 0 50px;  } 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -