2014-05-06 20 views
0

我正在處理反彈着陸頁平臺。總的來說,它非常棒,使得A/B測試變得非常簡單。它或多或少只是拖放,但你可以添加CSS,html,javascript等。無法將固定表單置於反彈平臺上

無論如何,I'm working on creating a fixed signup area on the bottom of the screen(應該提高轉換率),但我有一些麻煩。註冊框是在wysiwyg儀表板中創建的,從我看到的它只是爲您生成CSS,當您移動滑塊,更改顏色等。

我可以使整個註冊區域浮動到底部,但我無法讓註冊框保持居中。我可以使用邊距和定位,但不能使用align:center函數。

我試過做margin-left: auto; margin-right: auto以及text-align: center;但它絕對沒有!

更改屏幕大小時,它不會保持居中。但這是踢球者;文本沒有問題,只集中width: 100% ..註冊框似乎不尊重任何包裝,我認爲這可能是問題。 這是我用來創建此固定部分的所有CSS:

#lp-pom-box-214 { 
    top: auto !important; 
    display:block; 
    position:fixed; 
    margin-left: auto; 
    margin-right: auto; 
    bottom:0px; 
    width: 100%; 
    align: center; 

    }  

#lp-pom-form-51 { 
    top: auto !important; 
    display:block; 
    width: 100%; 
    position:fixed; 
    bottom: 25px; 
    margin-left: 26%; 

    } 

    #lp-pom-text-211 { 
    top: auto !important; 
    display:block; 
    position:fixed; 
    bottom:75px; 
    width: 100%;   
    } 

由於一噸提前!這位客戶對我真的很好,所以我想爲他們做好工作。我不是一個優秀的編碼員,但是我非常擅長營銷,所以如果你需要這方面的幫助,請隨時給我留言:)這是我知道如何回饋給任何幫助我的人的最好方式(或爲此,社區中的任何其他人)。

再次感謝。

回答

0

您無法以這種方式調整固定定位元素的位置。

固定位置元素相對於視口或瀏覽器窗口定位。當窗口滾動時,視口不會改變,所以一個固定的定位元素將完全按照名稱所暗示的方式進行,並保持固定在其分配的位置。要定位固定元素,請使用頂部,右側,底部和左側的屬性

如果要將其保留爲固定定位元素,可以將頁面垂直和水平居中置於頁面上,方法是將頂部和左側設置爲50%因此,當容器的左上角位於頁面的中心時,可以使用帶有負值的margin-top和margin-left來補償元素的寬度和高度的一半,以便在中心內實現真正的中心。你的容器。

0

喜歡的東西this?

如果是檢查這個code

CSS

.fixed-bottom { 
    position:fixed; 
    left:0; 
    bottom:0; 
    padding:10px 0; 
    background:#CCC; 
    width:100%; 
} 
.fixed-bottom h1 { 
    text-align:center; 
} 

#lp-pom-button-52 { 
display: block; 
z-index: 61; 
width: 175px; 
height: 54px; 
line-height: 54px; 
behavior: url(/PIE.htc); 
border-radius: 8px; 
background-color: #ff0000; 
background: -webkit-linear-gradient(#ff0000,#e60000); 
background: -moz-linear-gradient(#ff0000,#e60000); 
background: -ms-linear-gradient(#ff0000,#e60000); 
background: -o-linear-gradient(#ff0000,#e60000); 
background: linear-gradient(#ff0000,#e60000); 
box-shadow: inset 0px 1px 0px #ff4c4c,inset 0 -1px 2px #b30000; 
text-shadow: 1px 1px #5c0000; 
-pie-background: linear-gradient(#ff0000,#e60000); 
color: #fff; 
border-style: solid; 
border-width: 3px; 
border-color: #333333; 
font-size: 24px; 
font-weight: bold; 
font-family: arial; 
text-align: center; 
background-repeat: no-repeat; 
    float:left; 
    margin:0 0 0 10px; 
} 

#lp-pom-form-51 .lp-pom-form-field input[type=text] { 
border-style: solid; 
border-width: 10px; 
border-color: #002c77; 
} 

a { 
color: #ff0000; 
text-decoration: none; 
}