WordPress.org

Ready to get started?Download WordPress

Forums

Emphaino
Add border around homepage images (11 posts)

  1. leoly
    Member
    Posted 1 year ago #

    Please, how can I add a border around the images for the homepage posts?
    I want each featured post image to have a border.

    thanks

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Do you have a section in the dashboard for "Custom CSS" changes?

  3. leoly
    Member
    Posted 1 year ago #

    No.

    but I have a child theme, can I add the css there?

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Yes.
    In your Child Theme style.css file, you add the CSS.

    When you say you want a border around the homepage posts, do you mean like this http://awesomescreenshot.com/0bb1456db2 ?

  5. leoly
    Member
    Posted 1 year ago #

    yes, Emphaino has an option to display recent posts with featured images, I want to add an extra image border around those images.

    thanks.

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    Can you link to your homepage?

  7. SriniG
    Member
    Theme Author

    Posted 1 year ago #

    Maybe you can add this in your Custom CSS.

    .wp-post-image { border: 2px solid #f00; }

    Of course, that color is red, change it to anything you want.

  8. leoly
    Member
    Posted 1 year ago #

    thank you for the replies.
    the code above didn't work, is there a way to make the border an image?

  9. leoly
    Member
    Posted 1 year ago #

    Actually, I just realized non of my child theme css changes are going through. So maybe it's not the code, but a CSS issue.
    The Child theme loads and looks all right, so I don't know what is causing the problem.

    My site is not loaded yet, so I have no live site to show. Any help or suggestions?

  10. SriniG
    Member
    Theme Author

    Posted 1 year ago #

    Your child theme's CSS should go through, unless you are doing it wrong somewhere.

    You can also try putting the code in Custom CSS option. It's the very last option under 'Other Settings' in the theme customizer interface.

    I'm not aware if there is a method to make the border an image. You can try having a background image as a pattern for the featured image, and specify a padding, that could give you a patterned border effect.

    .wp-post-image {
      background: url('path-to-your-image');
      padding: 5px;
      max-width: 260px;
    }
  11. leoly
    Member
    Posted 1 year ago #

    thank you. When I added it to the custom CSS it showed up. However, it doesn't show up when I add it to the child css, using the editor option.

    I have double checked and the child theme loads properly, some of the other changes are coming through, but others do not.

    For example, I added a second menu, and added some CSS styling, those modifications took effect. Really odd problem.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.