> For the complete documentation index, see [llms.txt](https://docs.mydukaan.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mydukaan.io/code-snippets/adding-auto-scrolling-text-in-homepage.md).

# Adding auto-scrolling text in homepage

We will try to add a non-stop horizontal scrolling banner containing a brand name on the top of our store.

Open the layout.html page and the following HTML code to it just inside the body tag or anywhere as per your requirement

```html
<div class="scroll">
  <div class="m-scroll">
    <span style="rbackground: cyan;">BRAND | BRAND | BRAND </span>
    <span style="rbackground: cyan;">BRAND | BRAND | BRAND </span>
    <span style="rbackground: cyan;">BRAND | BRAND | BRAND </span>
    <span style="rbackground: cyan;">BRAND | BRAND | BRAND </span>
    </div>
</div>
```

After this, open the layout.css file and add the following CSS to the file.

```css
.scroll {
  position: relative;
  width: 100vw;
  height: 15%;
  background-color: #252525;
  overflow: hidden;
  z-index: 1;
  margin: 0;
  padding: 0;
}

.m-scroll {
  overflow: hidden;
  height: 100%;
  white-space: nowrap;
  animation: scrollText 10s infinite linear;
  margin: 0;
  font-size: 0;
  display: inline-block;
}

span {
  font-size: 50px;
  display: inline-block;
  min-width: 100vw;
  margin: 0;
  padding: 0;
  color: white;
}

@keyframes scrollText {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-50%);
  }
}
```

Once you're done, you can deploy the changes and wait for them to reflect on your store page. This is how it would look like&#x20;

<figure><img src="/files/FnROZy5YDHNCDvgzBbgc" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mydukaan.io/code-snippets/adding-auto-scrolling-text-in-homepage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
