jquery-mobile - Jquery Mobile Dialog - Full Width
问题描述
I am developing a website using Jquery Mobile jquery.mobile- Version : 1.4.5 Jquery version : 1.9.1
I am creating a dialog page using the following code
<div data-role="dialog" width="100vw" style="width:100vw;margin-left:0;margin-right:0;" data-close-btn="none" id="dlg" >
<div id="container" style="background-color:white;padding:5px;width:90vw;max-width:95vw;margin-left:0 !important;margin-right:0 !important;">
<h3>Task - Create</h3><hr>
<form data-ajax="false" id="form">
<label for="txtDescription">Description</label>
<input type="text" id="txtDescription" name="description">
</form>
</div>
</div>
The dialog div seems to be correctly sized to 100% of view port. Its left and top are also at 0,0 However the div with id '#container' is also sized to 90 and 05 % of viewport but it is not centered or positioned at 0,0. There is a large top and left margin because of which the #container is hidden on the right side. I want the #container to be positioned at 0,0
解决方案
推荐阅读
- python - 计算列表中字符串的连续重复
- hyperledger-fabric - 调用链码时出错“错误:未知标志:--peerAddresses”Hyperledger Fabric first-network 教程
- php - Google API 卷曲超时
- sdn - 在 POX 中的多个控制器之间重定向“ofp_packet_in”数据包?
- javascript - 优化硫化 HTML 文件中的 css 变量
- asp.net-ajax - 在 ASP.NET C# 中从 Datatable 返回值(所有字段)到 AJAX
- ios - 从 [AnyHashable: Any] 推送通知中获取数据
- wordpress - 只有硬刷新才会显示更新的 WordPress 网站
- protractor - 在 Angular 6 e2e 测试中传递参数
- javascript - componentDidMount 内的多个 setState