How do I add padding to text and only text?
-
I would really like to add padding to the text in my blog-posts, but when I use the padding-code the pictures in the blogposts get the same padding and I don’t want that. Any tips? :)
My blog: http://miira.wordpress.com
The blog I need help with is: (visible only to logged in users)
-
The fist example keeps the text left aligned but makes each paragraph narrower than your pictures with equal space on both sides. If you just want the text aligned centrally use the second example. I really like how you’ve positioned the navigation menu over the header image, good work!
p {margin:10px 60px;} p img.aligncenter {margin-left:-60px;}#content p {text-align:center!important;} -
Thank you!
I tried to use the first example, but I’m wondering where I’m supposed to put it? I put it under .entry { and it just made the pictures go to the left, nothing happened to the text. (Yes I’m really new CSS)
I want the pictures to stay the same but all the entry-text to be a tiny bit narrower all the way, on both sides.
I really appreciate the help!
-
If you just copy it directly and place the code at the bottom of your custom CSS styles it should work, if that still doesn’t work try the slightly modified version below. Obviously feel free to change the margin size in both places.
#content p {margin:10px 60px;} #content p img.aligncenter {margin-left:-60px;} -
-
By the way, while doing all this it seems like all my pictures goes to the right even though I make sure that I center them while making the blog post. What did I do wrong? (It’s noticable on page 2 and further back where my images are smaller)
- The topic ‘How do I add padding to text and only text?’ is closed to new replies.