Web表单和引导表单问题 [英] Web Forms and Bootstrap Form Issue

查看:165
本文介绍了Web表单和引导表单问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ASP.NET Web Forms项目中使用了一个精简版的Admin LTE Bootstrap Theme。在Web表单项目中,每个页面只能使用1个表单标记。

I am using a stripped down version of Admin LTE Bootstrap Theme on a ASP.NET Web Forms Project. In a web forms project you can only use 1 form tag per page.

表单标签需要遍历所有顶部(Nav)和底部(侧栏左& Main,主要内容)。两个节都有要求渲染形式的元素。这里是一个页面和div的基本布局(我命名其中一些,所以你可以看到与我写下面的标签的关系。

The form tag needs to go around all Top (Nav) and Bottom (Side Bar Left & Main, the Main Content). Both sections have elements that require the form for rendering. Here is a basic layout of the page and divs (I named some of them so you can see the relation to the tags I wrote out below.

<Body>
<Form>
<header>   
    <Nav Bar>   
        <Nav Bar -Right>
    </Nav Bar>
</header>
<Wrapper>
    <Side Bar -Left>
    <Main Content -Right>
</Wrapper>
</Form>
</Body>

img src =https://i.stack.imgur.com/kCtBY.jpgalt =enter image description here>

当我把表单标签围绕所有主要的div,我得到一个样式或推动从整个屏幕的边缘,它把我的标志(png或jpg)从导航下来。这是什么样子。

When I put the form tag around all major divs I get a style or push from around the edge of the entire screen and it pushes my logo (png or jpg) out of the nav down. Here is what that looks like.

>

所以它必须是当我把身体和标题之间的表单标签,我没有其他地方放置它。表单标记的结尾位于主体结束标记和封装结束标记之间。这是唯一可以去的地方。

So it must be when I place that form tag between the body and the header, I have no where else to place it. The end of the form tag is placed between the body end tag and the wrapper end tag. That is the only place it can go. The form when wrapped around bootstrap pushes everything down at the nav.

我使用的框架工作是开箱即用的,在这个链接:

The frame work I am using is right out of the box at this link:

在此输入链接描述

任何想法如何获得表单标记从我的标题标记内容,并推下他们。我已经尝试使用开发工具,但我有这么多的样式来排序。就像在css中删除表单标签上的格式一样简单。我试过,它dint的帮助。任何想法?

ANy idea of how to get the form tag from screwing up my header tag contents and pushing them down. I have tried using developer tools but I have so many styles to sort through. Is it as simple as killing the formatting on the form tag in css. I tried that and it dint help. Any ideas?

推荐答案

不知道这将工作,但你可以试试。在你的表单中添加一个名为test-form的类,然后将这个css添加到页面

Not sure if this would work but you can try it. Add a class to your form called test-form then add this css to the page

.test-form {
     position: fixed;
     margin: 0;
     padding: 0;
     z-index: 0;
     top: 0;
     left: 0;
     width: 0;
}

 

UPDATE :所以这里是解决方案

UPDATE: so here is the solution

我发现错误是由于主题使用以下css的标题和边bar:body> .header所以通过删除>从任何AdminLTE header.less文件应该工作

"I found that the error is caused because the theme uses the following css for the header and side bar: body > .header so by removing the > from any of the AdminLTE header.less file should work"

这篇关于Web表单和引导表单问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆