绝对定位浏览器调整单页面大小

时间:2015-08-21 11:22:57

标签: html css

我正在使用重力表单插件处理网页表单,但是希望以特定方式设置表单。我已经对表单的每个单独字段使用了绝对定位,但理想情况下,无论浏览器大小如何,都希望保持页面布局相同(如完整),并且仅对此页面发生这种情况。

问题在于,当我调整窗口大小时,页面的布局会变形,一切都会出现故障,我怎样才能阻止页面执行此操作?

    body .gform_wrapper .gform_body .gform_fields #field_42_1.gfield         .gfield_label 
    {
    position: absolute;
left: 80px;
top: 300px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_1.gfield         .ginput_container
    {
    width: 33%;
    position: absolute;
left: 79px;
top: 325px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_2.gfield         .gfield_label 
    {
    width: 45%;
    position: absolute;
left: 80px;
top: 355px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_2.gfield         .ginput_container 
    {
    width: 33%;
    position: absolute;
left: 79px;
top: 380px
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_10.gfield         .gfield_label 
    {
    width: 45%;
    position: absolute;
left: 740px;
top: 350px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_10.gfield         .ginput_container 
    {
    width: 40%;
    margin-top: 10px !important;
    line-height:2;
    clear: both;
    position: absolute;
        left: 558px;
        top: 350px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_4.gfield         .gfield_label 
    {
    width: 45%;
    position: absolute;
left: 80px;
top: 410px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_4.gfield         .ginput_container 
    {
    width: 33%;
    position: absolute;
left: 79px;
top: 435px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_5.gfield .gfield_label 
    {
    width: 45%;
    position: absolute;
left: 80px;
top: 465px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_5.gfield         .ginput_container 
    {
    width: 33%;
    position: absolute;
left: 79px;
top: 490px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_6.gfield         .gfield_label 
    {
    width: 45%;
    position: absolute;
left: 80px;
top: 520px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_6.gfield         .ginput_container 
    {
    width: 33%;
    position: absolute;
left: 79px;
top: 545px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_7.gfield .gfield_label 
    {
    width: 45%;
    position: absolute;
left: 80px;
top: 575px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_7.gfield         .ginput_container 
    {
    width: 33%;
    position: absolute;
left: 79px;
top: 600px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_8.gfield .gfield_label 
    {
    width: 45%;
    position: absolute;
left: 80px;
top: 630px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_8.gfield         .gfield_description
    {
    width: 33%;
    position: absolute;
left: 80px;
top: 655px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_8.gfield         .ginput_container 
    {
    width: 33%;
    position: absolute;
left: 79px;
top: 720px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_9.gfield .gfield_label 
    {
    color: #2565ae;
    font-size: 20px;
    width: 45%;
    position: absolute;
left: 558px;
top: 520px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_9.gfield         .gfield_description
    {
    width: 40%;
    float: right;
    position: absolute;
left: 558px;
top: 570px;
    }

    body .gform_wrapper .gform_body .gform_fields #field_42_9.gfield         .ginput_container
    {
    width: 23%;
    position: absolute;
left: 558px;
top: 720px;
    }

    body #gform_wrapper_42 .gform_footer input[type=submit] 
    {
    position: absolute;
left: 558px;
top: 760px;
    }

调整大小之前:http://i.stack.imgur.com/7hrD8.png 调整大小后:http://i.stack.imgur.com/ULNR4.png

0 个答案:

没有答案