• alanli713

    (@alanli713)


    website https://www.ktop.co.uk/

    I have been searching for hours for the right code to remove the image border, I have changes most of the img under style.css in to border: 0px, but still cannot remove the ugly black border.

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Jorge

    (@jas956)

    The reason why – from my observation is – your code is:

    border: none;

    Try the following:

    border: 0px !important;

    The reason why your styling doesn’t work is because your style.css comes before and is overwritten by the violet.css stylesheet.

    Hope this helps.

    Thread Starter alanli713

    (@alanli713)

    what about custom css? which is come first?

    WPyogi

    (@wpyogi)

    Custom CSS should load later – and you should not be modifying theme files anyway – as your changes will be lost when the theme is updated.

    Using !important is not good coding practice, so that’s really not an ideal solution.

    Try this:

    .post img, .type-page img,
    ul.products li.product img {
       border: none;
    }

    Jorge

    (@jas956)

    All custom stuff should be loaded last. The !important is perfectly fine to use if you need something quick. For production though, do as the previous poster wrote.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to remove the image border, I have been searching for hours’ is closed to new replies.