html - 除了元素不显示

标签 html css

我正在试用来自 YouTube 的指南,但我无法在屏幕上显示 right_aside 和 left_aside 元素。我已经找了几个小时了,但找不到问题所在。我错过了什么?

这是我的 HTML:

<!DOCTYPE html>
<html lang="en">

    <head>
        <title>my websitebeta</title>
        <meta charset="utf-8">
        <meta name="keywords" content="">
        <meta name="description" content="">
        <link rel="stylesheet" type="text/css" href="indexStyle.css" />
    </head>

    <body>
        <header id="main_header">
            <div id="second_header"></div>
        </header>
        <menu id="main_menu"></menu>
        <div id="main_wrapper">
            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td valign="top" width="180">
                        <aside id="left_aside"></aside>
                    </td>
                    <td>
                        <section id="main_content"></section>
                    </td>
                    <td valign="top" width="180">
                        <aside id="right_aside"></aside>
                    </td>
                </tr>
            </table>
        </div>
        <footer id="main_footer"></footer>
    </body>

</html>

这是我的 CSS:

*{
    padding: 0px;
    margin: 0px;
}
body{
    color:#000;
    font-size: 15px;
    font-family: Arial, Helvetica, sans-serif;
    background: #FFF;

}
#main_header{
    width:100%;
    height:100px;
    background: #F90;

}
#second_header{
    min-width:960px;
    height:60px;
    padding:20px;
    margin:0px auto 0px;

}
#main_menu{
    width: 100%;
    height: 40px;
    background: #09F;

}

#main_wrapper{
    min-width:1000px;
    margin-top: 0px;
    margin-bottom: 0px;

}
#left_aside{
    width: 180px;
    min-height:700;
    background: #9f0;
}

#main_content{
    margin:0px 20px 0px;
    min-height:700;
}
#right_aside{
    width: 180px;
    min-height:700;
    background: #f00;
}
#main_footer{
    width: 100%;
    height: 50px;
    background: #09F;
    margin: 0px;
}

最佳答案

您似乎忘记了 min-height 左侧和右侧的 px

它应该看起来像:min-height:700px;

祝你好运!

关于html - 除了元素不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18155631/

相关文章:

html - CSS Auto Margin 下推其他元素

javascript - Jquery/Javascript 在 li 中隐藏/显示 div

jquery - 查找具有特定属性且名称以某个字符串开头的所有元素

css - 预定义样式不会改变

css - 格式化图像悬停文本

jquery - 无法使用 jquery 函数来绝对定位适用于 iphone 的 div

css - Textarea 溢出 div 即使 box-sizing :border-box

css - div 边框不尊重 float ,而 div 内容尊重 float

javascript - 我可以在 mat-expanded 行中显示另一个表格吗?

html - 在文本溢出到下一行后,防止文本包装器跨越其父级的整个宽度