我的register
和login
按钮无法与右侧对齐。你能帮帮我解决这个问题吗?我会提供所需的任何信息,只需要它。顺便说一下,这只是一个更大的菜单的一部分,因此它将在css中有额外的东西。
PHP / HTML:
<a href="<?php echo URL; ?>login">
<div class="button first">
<div class="b left"><!-- --></div>
<div class="b right"><!-- --></div>
<div class="b content">Login</div>
</div>
</a>
<a href="<?php echo URL; ?>register">
<div class="button first">
<div class="b left"><!-- --></div>
<div class="b right"><!-- --></div>
<div class="floatright">Register</div>
</div>
</a>
CSS:
#page {
min-height: 100%;
max-width: 1060px;
min-width: 954px;
position: relative;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
#page {
margin: 0 auto;
}
.m_hmenu {
position: relative;
overflow: hidden;
}
.m_hmenu .floatright {
float: right;
}
.m_hmenu .content {
position: relative;
}
.m_hmenu .content span {
font-size: 60%;
margin-left: 6px;
position: relative;
bottom: 1px;
}
.m_hmenu .left {
position: absolute;
top: 0;
left: 0;
width: 50.004%;
height: 100%;
background-position: left top;
}
.m_hmenu .right {
position: absolute;
top: 0;
right: 0;
width: 50.004%;
height: 100%;
background-position: right top;
}
.m_hmenu .button {
float: left;
position: relative;
cursor: pointer;
height: 100%;
margin-bottom: 100px;
}
.m_hmenu a:hover .button,
.m_hmenu a:focus .button {
text-decoration: none;
}
.m_hmenu .cap {
float: left;
height: 100%;
}
.m_hmenu .stretch .button {
width: 100%;
text-align: center;
padding-left: 0px !important;
padding-right: 0px !important;
}
body {
background-attachment:fixed;
background-color:#f0f0f0;
background-repeat:repeat;
background-position:center;
color:#4f4f4f;
background-image:url("Background.jpg");
}
#page-wrap {
background-color:transparent;
margin-right:-5px;
font-family:Arial;
color:#4f4f4f;
margin-left:-5px;
font-size:13px;
}
a {
color:#57c11a;text-decoration:none;
}
.m_header {
padding-bottom:3px;
border-color:transparent;
padding-right:4px;
background-color:transparent;
padding-left:3px;
border-width:1px;
padding-top:3px
}
.m_hmenu {
height:63px;
}
.m_hmenu .bg.left {
background-image:url("Menu.png");
}
.m_hmenu .bg.right {
background-image:url("Menu.png");
}
.m_hmenu .buttons {
padding-right:0px;padding-left:15px;top:2px;
}
.m_hmenu .button {
background-color:transparent;
line-height:58px;
padding-right:15px;
font-weight:normal;
height:40px;
padding-left:15px;
font-size:15px;
color:#89e350;
}
.m_hmenu a:hover .button {
color:#ffffff;
}
.m_hmenu a:focus .button {
color:#ffffff;
}
.m_hmenu .cap {
height:40px;
}
感谢约书亚
答案 0 :(得分:0)
<div id="login" class="button first">
<a>Login</a>
</div>
<div id="register" class="button first">
<a>Register</a>
</div>
在CSS中:)
#login, #register {position:fixed;top:50px}
#login {right:100px}
#register {right:10px}