Skip to content

Commit b4c1995

Browse files
kb(window): align right
1 parent f7173e2 commit b4c1995

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Align the window to the right side of the screen
3+
description: How to align the window to the right side of the screen
4+
type: how-to
5+
page_title: Align the window to the right side of the screen
6+
slug: window-kb-align-to-right
7+
position:
8+
tags:
9+
ticketid: 1452606
10+
res_type: kb
11+
---
12+
13+
## Environment
14+
<table>
15+
<tbody>
16+
<tr>
17+
<td>Product</td>
18+
<td>Window for Blazor</td>
19+
</tr>
20+
</tbody>
21+
</table>
22+
23+
24+
## Description
25+
26+
How do I align the window to the right side of the screen (similar to Left = '100px')?
27+
28+
A popup's position is usually controlled through the `Top` and `Left` parameters (CSS rules) because you don't know how far the page will go to the right and down. This is why an explicit `Right` or `Bottom` parameter does not exist in the Window component.
29+
30+
31+
## Solution
32+
33+
Option 1: Put an [AnimationContainer]({%slug components/animationcontainer/overview%}) in an element that's positioned as desired - the AnimationContainer renders at its place of declaration and can easily have 100% width of its parent.
34+
35+
Option 2: Override the built-in CSS rules of the window and to put it at the right border of the page through your own class:
36+
37+
````CSHTML
38+
<style>
39+
.sticky-right{
40+
right: 0;
41+
transform:none;
42+
}
43+
</style>
44+
45+
<TelerikWindow Class="sticky-right" Visible="true">
46+
<WindowTitle>
47+
<strong>The Title</strong>
48+
</WindowTitle>
49+
<WindowContent>
50+
This is my window <strong>popup</strong> content.
51+
</WindowContent>
52+
</TelerikWindow>
53+
````
54+

0 commit comments

Comments
 (0)