蓝图修复菜单高度

发布于 2024-10-04 14:59:53 字数 885 浏览 0 评论 0原文

当以下标记呈现时,菜单呈现为高度为 51 的表 topMainMenu。当我删除蓝图样式表时,topMainMenu 呈现高度为 20,即最小 I怙。

<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="Styles/Blueprint/screen.css" />
    <script src="<%# ResolveUrl("~/Scripts/jquery-1.4.4.js")%>" type="text/javascript"></script>
</head>
<body>
    <form id="form" runat="server">
    <div class="prepend-1 span-22 last">
        <asp:Menu ID="topMainMenu" runat="server" DataSourceID="mainMenuDataSource" Orientation="Horizontal" Width="100%" Height="16px">
            <StaticMenuStyle Height="10px" BackColor="Navy" />
        </asp:Menu>
    </div>
    </form>
</body>

我的印象是,在这种情况下,蓝图应该对任何高度都没有影响。 CSS 重置肯定不会这样做吗?我尝试过的任何样式都无法将菜单高度缩小到 51 以下。我能做什么?

When the following markup renders, the menu renders as table topMainMenu with a height of 51. When I remove the Blueprint stylesheet, topMainMenu renders with a height of 20, the minimum I presume.

<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="Styles/Blueprint/screen.css" />
    <script src="<%# ResolveUrl("~/Scripts/jquery-1.4.4.js")%>" type="text/javascript"></script>
</head>
<body>
    <form id="form" runat="server">
    <div class="prepend-1 span-22 last">
        <asp:Menu ID="topMainMenu" runat="server" DataSourceID="mainMenuDataSource" Orientation="Horizontal" Width="100%" Height="16px">
            <StaticMenuStyle Height="10px" BackColor="Navy" />
        </asp:Menu>
    </div>
    </form>
</body>

I was under the impression that Blueprint should have no effect on any height in this scenario. Surely a CSS reset wont be doing this? No styling I have tried can shrink the menu height below 51. What can I do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

太阳公公是暖光 2024-10-11 14:59:53

这应该覆盖你的蓝图 css

<div class="prepend-1 span-22 last" style="height:20px;line-height:20px;">

<style>
.adjustHeight {
    height:20px; line-height:20px; margin:0; padding:0;
}
</style>
<div class="prepend-1 span-22 last adjustHeight">

This should override your blueprint css

<div class="prepend-1 span-22 last" style="height:20px;line-height:20px;">

OR

<style>
.adjustHeight {
    height:20px; line-height:20px; margin:0; padding:0;
}
</style>
<div class="prepend-1 span-22 last adjustHeight">
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文