CopyPastor

Detecting plagiarism made easy.

Score: 0.8116011023521423; Reported for: String similarity Open both answers

Possible Plagiarism

Reposted on 2026-08-19
by Ike

Original Post

Original - Posted on 2026-08-19
by Ike



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Use negative margin to make the fixed element positionable:
```html <div style='text-align: right;'> <div style='display: inline-block; position: fixed; width: 180px; margin-left: -180px;'> <!-- Your content --> </div> </div> ```
Using `text-align: right` and `display: inline-block` allows for variable width of the outer `div`.
Do not position the inner `div` by `top` / `left` / `bottom` / `right`. Thereby the inner `div` gets positioned via (negative) margin based on its natural position as if it was positioned using `position: absolute`.
As @246tNt mentioned: You can use two imbricated div.
Then use negative margin to make the fixed element positionable:
```html <div style='text-align: right;'> <div style='display: inline-block; position: fixed; width: 180px; margin-left: -180px;'> <!-- Your content --> </div> </div> ```
Using `text-align: right` and `display: inline-block` allows for variable width of the outer `div`.
Do not position the inner `div` by `top` / `left` / `bottom` / `right`. Thereby the inner `div` gets positioned via (negative) margin based on its natural position as if it was positioned using `position: absolute`.

        
Present in both answers; Present only in the new answer; Present only in the old answer;