小编Abi*_*ano的帖子

使用css定位元素的最佳实践

所以我刚刚开始我的网页设计师职业生涯,现在正在完成我的第一个项目,我刚刚完成了第一页设计,但无论如何我对我创建的css设计有一些担忧,主要是关于定位html元素.这是代码示例:

.contentbackground
{
   background-image: url('../images/body/BG.png');
   width: 1218px;
   height: 370px;
   position: absolute;
   top: 205px;
   margin-left: 67px;
}
.loginbox
{
   width: 351px;
   height: 280px;
   position: absolute;
   top: 40px;
   right: -12px;
}
.lblLogin
{
   position: absolute;
   top: 85px;
   right: 265px;
   font-family: "Century Gothic";
   font-size: 16px;
   color: #FFFFFF;
}
Run Code Online (Sandbox Code Playgroud)

问题是,这种方法是最佳做法吗?我的意思是,设置绝对位置,并手动配置顶部,左侧,右侧,底部位置,是否建议使用?

css

1
推荐指数
1
解决办法
2944
查看次数

在页面中心制作一个面板表格

所以我试图创建一个带有Twitter Bootstrap的表单面板到页面的中心,希望即使在浏览器调整大小时,它仍然处于中心位置, 是我在jsfiddle上尝试的,问题是我看起来似乎无法为了使它成为中心,任何人都有想法?完整的代码在下面

<div class="container">
        <div class="row">
            <div class="panel panel-default">
                <div class="panel-body">
                    <legend>User Login</legend>
                    <form role="form">
                        <div class="form-group">
                            <label for="inputEmail">
                                Username</label>
                            <input id="inputEmail" type="text" class="form-control" placeholder="ex: John.Doe"
                                required="" />
                        </div>
                        <div class="form-group">
                            <label for="inputPassword">
                                Password</label>
                            <input id="inputPassword" type="password" class="form-control" placeholder="*******"
                                required="" />
                        </div>
                        <div class="checkbox">
                            <label>
                                <input id="chkRememberMe" type="checkbox" />
                                Remember Me
                            </label>
                        </div>
                        <button id="btnSubmit" type="submit" class="btn navbar-custom">
                            Submit</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
Run Code Online (Sandbox Code Playgroud)

预览: 在此输入图像描述

css vb.net asp.net twitter-bootstrap-3

1
推荐指数
1
解决办法
6939
查看次数

使用JQuery在Textbox中使用Datepicker

在这里,我试图创建一个带有文本框的页面,我有一个想法来显示CalendarExtender(就像在AJAXToolkit中),但现在我想通过使用JQuery来获取它,问题是,我无法制作日历当我点击文本框时弹出UI,我的上部aspx页面看起来像这样:

<link href="../Support/StyleSheet/PageStyle.css" rel="stylesheet" type="text/css" />

<script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script>

<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js" type="text/javascript"></script>

<script type="text/javascript">
    $(function () {
        $("#TbOutboundOn").datepicker({
    });
</script>
Run Code Online (Sandbox Code Playgroud)

我正在尝试使用的文本框是:

  <tr>
                    <td align="left" width="120px" height="25px">
                        <asp:CheckBox ID="CbOutboundOn" Text=" Outbound On" runat="server" />
                    </td>
                    <td align="center" class="style1">
                        <asp:Label ID="Label1" runat="server" Text=":"></asp:Label>
                    </td>
                    <td align="left" width="200px">
                        <asp:TextBox ID="TbOutboundOn" runat="server" Width="194px" placeholder="dd/mm/yyyy"></asp:TextBox>
                    </td>
                    <td width="645px">
                    </td>
                </tr>
Run Code Online (Sandbox Code Playgroud)

我认为它已经足够了,但事实并非如此,当我点击"TbOutboundOn"中的文本框时,我无法显示日历,朋友建议样式表是问题,但我不太明白,任何人都可以帮我解决问题?顺便说一下,我用http://jqueryui.com/datepicker/#default作为参考.

我已经尝试复制jqueryui的datepicker网站引用的所有样式表,并将它与我自己的样式表结合起来,但它仍然无效.我尝试只使用jqueryui datepicker中提供的样式表,但仍然没有运气.

感谢您的帮助.

vb.net asp.net jquery jquery-ui visual-studio-2008

0
推荐指数
1
解决办法
2万
查看次数