0

我的标题有问题,总是缺少一块。

这就是问题:

http://imgur.com/DruqmsI

我的html:

<div id="wrapper">
        <div id="header">
            <div id="header-col-left">
                <p class="site-title">@Html.ActionLink("Immo QR", "Index", "Home")</p>          
            </div>
            <div id="header-col-right">
                <div id="login">
                    @Html.Partial("_LoginPartial")
                </div>
                <div id="main-menu">
                    <ul id="menu">
                        <li>@Html.ActionLink("Home", "Index", "Home")</li>
                        <li>@Html.ActionLink("Who are we", "WhoAreWe", "Home")</li>
                        <li>@Html.ActionLink("What do we do", "WhatDoWeDo", "Home")</li>
                        <li>@Html.ActionLink("Contact us", "ContactUs", "Home")</li>
                    </ul>
                </div>
            </div>
        </div>
        <div id="body">
            <div id="user-menu">
                @if (Request.IsAuthenticated)
                { 
                    <ul id="account-menu">
                        <li>@Html.ActionLink("My profile", "MyProfile", "Profile")</li>
                        <li>@Html.ActionLink("Links", "Links", "Profile")</li>
                        <li>@Html.ActionLink("History", "History", "Profile")</li>
                        <li>@Html.ActionLink("Credits", "Credits", "Profile")</li>
                        <li>@Html.ActionLink("Settings", "Manage", "Account")</li>
                    </ul>  
                }
            </div>
            <div id="content">
                @RenderBody()
            </div>
        </div>
        <div id="footer">
            <p>&copy; @DateTime.Now.Year</p>
        </div>
    </div>

CSS:

#body 
{

margin: 0 auto;
max-width: 960px;
padding-top: 5%;

}

#user-menu 
{
float: left;
width: 15%;


}
#content 
{
float: left;
width: 85%;
margin-top: 15px;

}
#header 
{

}

#header-col-left p
{
float: left;
display: block;
width: 50%;
background-color: orange;
text-align: center;
font-size: 30pt;

color: white;       
}

#header-col-left a
{
    color: lightgray;
}

#header-col-right 
{
float: left;
display: block;
width: 50%;
background-color: orange;
}

我认为问题出在身体上,但我尝试了一些方法,但没有成功。

问候

4

1 回答 1

0

将 设置background-color: orange#header#header-col-rightheader-col-left p

问题是标题的右侧部分的高度大于标题的左侧部分。因为里面有更多的信息。

于 2013-09-05T12:06:49.983 回答