Text-wrapping around images — where to put the code?
-
Hi folks — I’m having trouble figuring out how to add some padding around my images. The help topic quoted below explains which code to add. But can someone tell me, newb that I am, where exactly this text would reside in the css file? (FWIW, I’m using the Elegant Grunge theme.)
And is the idea that, once this code is added, the user can set the spacing around the image using the Advanced Settings palette of the Edit Images tab? (Those options appear now, but entering a value of, say, 10px, has no effect.)
Here is an example of a page to which I’m trying to add space between the image and the text.
Wrapping Text Around Images
Current versions of WordPress now have image alignment built-in. WordPress adds CSS classes to align the image to the right, left, and center of a paragraph, so the text will wrap around the image.
In order to take advantage of these new CSS classes for image alignment and the text wrapping around the image, the WordPress Theme must include the following in the style.css found in the WordPress Theme directory.
img.alignright {float:right; margin:0 0 1em 1em}
img.alignleft {float:left; margin:0 1em 1em 0}
img.aligncenter {display: block; margin-left: auto; margin-right: auto}
a img.alignright {float:right; margin:0 0 1em 1em}
a img.alignleft {float:left; margin:0 1em 1em 0}
a img.aligncenter {display: block; margin-left: auto; margin-right: auto}
- The topic ‘Text-wrapping around images — where to put the code?’ is closed to new replies.