WordPress.org

Ready to get started?Download WordPress

Forums

Matala theme unwanted image borders (3 posts)

  1. KylieMemoirs
    Member
    Posted 2 years ago #

    http://www.memoirmode.com/

    Hi all.

    As you can see in my images there is a thick grey border around my images. I can go in the html and change individually, but where in my stylesheet can I remove it and have no border as standard?

    Thanks in advance

  2. peredur
    Member
    Posted 2 years ago #

    Presentation is always (to all intents and purposes) set in the CSS and not in the HTML. This is the style rule that your theme uses to set the border:

    img.alignleft, img.alignright, img.aligncenter, img.alignnone, .post-thumbnail {
      ...
      border: 1px solid #D1BFA6;
      ...
    }

    [Where the ellipses represent other properties that are not relevant]

    You'll find this rule in your theme's style sheet (style.css).

    The best way to customise a theme is via a child theme. In fact using a child theme is the only recommended way of doing it.

    So, if you have a child theme, you would add the following rule to the child theme's style sheet:

    img.alignleft, img.alignright, img.aligncenter, img.alignnone, .post-thumbnail {
      border: none;
    }

    If you don't have a child theme and are prepared to take the risk of altering your theme directly, then your best bet is to add the rule above at the end of your theme's style sheet so that you will be able to put it back if an update to your theme replaces the style sheet, thus erasing your changes.

    You should, of course, keep a backup of the original style sheet and a copy of any changes you make in case you have to put them back.

    HTH

    PAE

  3. KylieMemoirs
    Member
    Posted 2 years ago #

    Thank you that was very helpful

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.