# Image rendering issue under custom CSS

**URL:** <https://meta.discourse.org/t/image-rendering-issue-under-custom-css/366000>\
**Category:** Product Support\
**Created:** [May 13, 2025, 9:59pm UTC](https://meta.discourse.org/t/image-rendering-issue-under-custom-css/366000 "2025-05-13T21:59:20Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Alteras](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alteras/32/582398_2.png) [@Alteras](https://meta.discourse.org/u/Alteras)\
**Post date:** [May 14, 2025, 12:39am UTC](https://meta.discourse.org/t/image-rendering-issue-under-custom-css/366000/3 "2025-05-14T00:39:05Z")

</div>

Looks like it just needs `box-sizing` to make the auto width account for the border.

```css
.cooked img:not(.thumbnail, .ytp-thumbnail-image, .emoji), .d-editor-preview img:not(.thumbnail, .ytp-thumbnail-image, .emoji) {
  border: 1px solid #000;
  box-sizing: border-box;
}

```

---

_[View the full topic](https://meta.discourse.org/t/image-rendering-issue-under-custom-css/366000)._
