# Responsive Inline Images

## Goals

* Support more responsive inline floating images e.g.
  * float right, 30% max width on desktop
  * float right, 50% max width on mobile landscape&#x20;
  * no float, 100% width on mobile portrait&#x20;

The goal is to make floating image respond well for mobile devices.&#x20;

## Sample Partial Implementation

Here's a sample;&#x20;

```html
<style>
@media screen and (max-width: 767px) {
  .w-richtext figure.w-richtext-align-floatright {
    max-width: 50% !important; 
  }
}
@media screen and (max-width: 479px) {
  .w-richtext figure.w-richtext-align-floatright {
    float: none !important; /* Remove the float */
    margin-left: 0 !important; /* Reset the left margin */
    clear: none !important; /* Reset any clearing */
    width: 100%; 
    max-width: none !important; 
  }
}
</style>
```

```html
<style>
figcaption.w-lightbox-caption {
  color: white;
}
@media screen and (max-width: 767px) {
  .w-richtext figure.w-richtext-align-floatright {
    max-width: 50% !important; 
  }
}
@media screen and (max-width: 479px) {
  .w-richtext figure.w-richtext-align-floatright {
    float: none !important; /* Remove the float */
    margin-left: 0 !important; /* Reset the left margin */
    clear: none !important; /* Reset any clearing */
    width: 100%; 
    max-width: none !important; 
  }
}

@media screen and (max-width: 767px) {
  .w-richtext figure.w-richtext-align-floatleft {
    max-width: 50% !important; 
  }
}
@media screen and (max-width: 479px) {
  .w-richtext figure.w-richtext-align-floatleft {
    float: none !important; /* Remove the float */
    margin-left: 0 !important; /* Reset the left margin */
    clear: none !important; /* Reset any clearing */
    width: 100%; 
    max-width: none !important; 
  }
}

</style>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://attr.sygnal.com/sa5-richtext/responsive-inline-images.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
