我不能完全了解底部:似乎我的父div被浏览器忽略,当我想对齐它时。希望你们中的任何人都能得到它!谢谢!按钮忽略父div并不会对齐
这是我父母的div:
#button-subheading {
height: auto;
width: auto;
text-align: center;
margin-left: auto;
margin-right: auto;
}
,这是我的孩子:
.button, button {
color: #fff !important;
font-size: -63px;
font-family: "CentraleSans-Bold","Helvetica Neue",Helvetica,Arial;
line-height: 265%;
text-decoration: none;
background-color: #167de4;
padding: 0 20px;
position: absolute;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-background-clip: padding;
-moz-background-clip: padding;
border: 1px solid #1d4ea4;
-moz-box-shadow: 0 1px 1px rgba(0,0,0,0.23),inset 0 1px 0 rgba(255,255,255,0.19);
background-image: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #3669ef), color-stop(100%, #4f95f4));
background-image: -webkit-linear-gradient(bottom, #3669ef 0%,#4f95f4 100%);
background-image: -moz-linear-gradient(bottom, #3669ef 0%,#4f95f4 100%);
background-image: -o-linear-gradient(bottom, #3669ef 0%,#4f95f4 100%);
background-image: linear-gradient(bottom, #3669ef 0%,#4f95f4 100%);
text-shadow: 0 1px 2px rgba(0,0,0,0.75);
white-space: nowrap;
text-overflow: ellipsis;
}
当我试图实现它槽这个HTML它被粘贴在屏幕的左侧:
<div id="button-subheading">
<div class="button" href="#" style="opacity: 1;">Get started with a free 30-day trial</div>
</div>
卡在屏幕右侧?似乎并不像:http://jsfiddle.net/hppXY/。也许你可以告诉我们,你想要实现什么? – supersize
也适用于我..http://jsfiddle.net/DswL2/ – Ani
我认为我们需要更多关于你想要做什么和更多html的上下文。 – Alex