Skip to content

The image is not fit for container dev #60

Description

@slinkinone

The img tag doesn't have css rules to be fit for container tag size.

Image

I've create /assets/css/style.scss:

---
---
/* Image fit fix for the container */
.container img,
article img,
main img {
  max-width: 100% !important;
  height: auto;
  display: block;
}

/* Optional: Constrain content width */
main, .container, article {
  max-width: 800px;
  margin: 0 auto;
  box-sizing: border-box;
}

And include that via html in my post page:

---
layout: post
title:  "Why is inline traffic monitoring is important?"
date:   2024-03-24 12:00:00 +0000
categories: article
author: Vyacheslav Slinkin
---

<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">

...

It is workaround since I need to include that css style file for each my page. The image css rule for container just missed in base.scss.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions