Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
standalone: improve the container option documentation
Browse files Browse the repository at this point in the history
Closes #8
  • Loading branch information
BrunoBoehm authored and Rowno committed May 24, 2018
1 parent 1171fb8 commit fa70a7d
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,23 @@ All of the [ConsentManager][] options are supported with the addition of these o

Type: `string`

CSS selector to the element that the consent banner should be rendered into.
[CSS selector][] to the DOM element that will host the consent banner. It should be an empty DOM element (usually a `<div>`) because the consent manager will replace any existing DOM elements inside it. The element must also exist on the page before the script is executed.

You can also control the positioning of the consent banner by applying styles to the container element (optional). E.g:

```css
#target-container {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 100;
}
```

```html
<div id="target-container"></div>
```

#### Globals

Expand Down Expand Up @@ -441,3 +457,4 @@ Copyright © 2018, Segment.io, Inc.
[preferences]: #preferences
[setPreferences]: #setpreferences
[ConsentManager implementation]: src/consent-manager
[CSS selector]: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector

0 comments on commit fa70a7d

Please sign in to comment.