質問するログイン新規登録

回答編集履歴

1

追記

2018/08/27 06:02

投稿

退会済みユーザー
answer CHANGED
@@ -16,4 +16,63 @@
16
16
  ASP.NET Web Forms アプリなら ModalPopup も選択肢に入ると思います。
17
17
 
18
18
  ModalPopup Demonstration
19
- [https://ajaxcontroltoolkit.devexpress.com/ModalPopup/ModalPopup.aspx](https://ajaxcontroltoolkit.devexpress.com/ModalPopup/ModalPopup.aspx)
19
+ [https://ajaxcontroltoolkit.devexpress.com/ModalPopup/ModalPopup.aspx](https://ajaxcontroltoolkit.devexpress.com/ModalPopup/ModalPopup.aspx)
20
+
21
+ **【追記】**
22
+
23
+ 下の 2018/08/27 14:46 の私のコメントで「<div class="page"> を真ん中に持ってくるので良ければ CSS でできると思います。回答欄にサンプルを追記しておきます」と書きましたが、それを以下に書きます。
24
+
25
+ これがこのまま質問者さんのケースに適用できるかまでは調べてませんが、直接は適用できなくても、応用でやりたいことは実現可能かと思います。
26
+
27
+ ```
28
+ <%@ Page Language="C#" AutoEventWireup="true"
29
+ CodeFile="0049-Centering.aspx.cs" Inherits="_0049_Centering" %>
30
+
31
+ <!DOCTYPE html>
32
+
33
+ <html xmlns="http://www.w3.org/1999/xhtml">
34
+ <head runat="server">
35
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
36
+ <title></title>
37
+ <style type="text/css">
38
+ body {
39
+ background: #555;
40
+ }
41
+
42
+ .content {
43
+ background: white;
44
+ width:500px;
45
+ height:300px;
46
+ position:absolute;
47
+ top:50%;
48
+ left:50%;
49
+ margin-left:-250px;
50
+ margin-top:-150px;
51
+ overflow:scroll;
52
+ }
53
+ </style>
54
+ </head>
55
+ <body>
56
+ <form id="form1" runat="server">
57
+ <div class="content">
58
+ <h1>This page is horizontally / vaerically centered on
59
+ screens that are wider than 500 / 300 pixels.</h1>
60
+ <h2>Resize the browser window to see the effect.</h2>
61
+ <p>An absolutely positioned element is an element whose computed position value is absolute or fixed.
62
+ The top, right, bottom, and left properties specify offsets from the edges of the element's containing block.
63
+ (The containing block is the ancestor relative to which the element is positioned.)
64
+ If the element has margins, they are added to the offset.</p>
65
+ </div>
66
+ </form>
67
+ </body>
68
+ </html>
69
+ ```
70
+ 結果は以下の通り。ブラウザは Chrome 68.0.3440.106 です。
71
+
72
+ ![イメージ説明](68adecab8caa6cccbfbecd8114f6a05a.jpeg)
73
+
74
+
75
+ css の position の説明については以下の記事を見てください。
76
+
77
+ position
78
+ [https://developer.mozilla.org/en-US/docs/Web/CSS/position](https://developer.mozilla.org/en-US/docs/Web/CSS/position)