Border around images?
-
I have added a few logos (links to sites) on my blog, and would like to put a border around them. Is this possible? They are in the right sidebar….
The blog I need help with is: (visible only to logged in users)
-
To do that you need to modify the image code, so you need Text widgets instead of Image widgets. For basic coding see this post of mine:
http://wpbtips.wordpress.com/2009/04/01/codes-useful-for-text-widgets/
After you add the images via Text widgets we can get to the border part. How exactly would you like the borders to look like? -
Tried this but logo wasn’t centered and still no border
<img src=”http://www.stoutstandards.com/images/RegtonLogo2.jpg” width=”125″ height=”125″ border=”1″>
-
That’s not what I suggested. I suggested you started with the (correct) coding I’m showing in my post, and then I’d show you how to improve it.
Anyway, this is the code you need for each image link:
<a style="border:none;" href="WEBSITE URL HERE"><img style="width:125px;border:1px solid #ddd;margin-bottom:14px;padding:10px;" class="aligncenter" alt="DESCRIPTIVE TEXT HERE" src="IMAGE URL HERE" /></a>This is designed so you can put all five images in one Text widget.
• ddd is the light grey of the divider lines in the theme you’re using. If you prefer the grey of the search box, use bbb instead.
• margin-bottom controls the space below each image.
• padding controls the space between image and border.However, the images would load faster and would be sharper if (instead of all this coding) you used an image editing application to downsize them to the right width and add a border then upload and use those versions.
-
- The topic ‘Border around images?’ is closed to new replies.