小编ツ.j*_*.jp的帖子

Firefox 100%宽度过度扩展父Div

我有两个文本框,一个div包含一个1 px div.父div具有自动高度,宽度为100%.

在这之后还有另一个100%宽度和高度的div,这个div在Webkit中正确显示,但它过度扩展了父div的边界大约2-3 px.

这里是所有相关的代码,我已经将它缩小到了这些,我在Firefox中通过将背景颜色着色来检查父div的宽度和高度,当我这样做时它不会扩展(红色).

我似乎记得读过一些关于必须告诉Firefox或Webkit等的东西...如何定义宽度,但我不记得那个CSS,我花了大约45分钟谷歌搜索我能尝试再找到它.

HTML

 <!-- CREDENTIALS -->
            <div class="centreLoginForm-Credentials">

                <div id="disabledDiv"></div>

                <input id="usernameCred" class="textInput top" type="text" placeholder="Username">
                <!--<div class="dividerDiv textBoxGrey"></div>-->
                <input id="passwordCred" class="textInput bottom" type="password" placeholder="Password">

            </div>
            <!-- CREDENTIALS END -->
Run Code Online (Sandbox Code Playgroud)

CSS

.centreLoginForm-Credentials
{
    width: 100%;
    height: auto;

    position: relative;

    margin-top: 10px;

    display: table;

    background-color: rgb(255, 255, 255);

    box-shadow: 0px 0px 3px rgba(200, 200, 200, 0.3);

    border-radius: 3px; 
    border: 1px solid rgba(230, 230, 230, 1);
}

#disabledDiv
{
    position: absolute;

    /*z-index: -10;*/

    width: 100%;
    height: 100%; …
Run Code Online (Sandbox Code Playgroud)

html css firefox width

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

Django {%url%} NoReverseMatch

我正在尝试在模板文件中创建当前Laps对象的链接ID,并且对于我的生活,我无法解决此错误.

这是我的:

错误

Request Method: GET
Request URL:    http://localhost:8000/laps/
Django Version: 1.5.2
Exception Type: NoReverseMatch
Exception Value:    
Reverse for 'views.LapView' with arguments '(181,)' and keyword arguments '{}' not found.
Run Code Online (Sandbox Code Playgroud)

urls.py

from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse_lazy
from django.views.generic import RedirectView
from laptimes import views

urlpatterns = patterns('',
    url(r'^$', RedirectView.as_view(url=reverse_lazy('laptimes:laps')), name='index'),
    url(r'^laps/$', views.LapsView.as_view(), name='laps'),
    url(r'^laps/powerlaps/$', views.PowerLapsView.as_view(), name='powerlaps'),
    url(r'^laps/starcar/$', views.StarCarView.as_view(), name='starcar'),
    url(r'^laps/formulaone/$', views.FormulaOneView.as_view(), name='formulaone'),
    # cars
    url(r'^$', RedirectView.as_view(url=reverse_lazy('laptimes:cars')), name='index'),
    url(r'^cars/$', views.CarsView.as_view(), name='cars'),
    url(r'^cars/manu/$', views.CarsManuView.as_view(), …
Run Code Online (Sandbox Code Playgroud)

python django url views

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

标签 统计

css ×1

django ×1

firefox ×1

html ×1

python ×1

url ×1

views ×1

width ×1