Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html CSS定位根据大小而不同_Html_Css_Position - Fatal编程技术网

Html CSS定位根据大小而不同

Html CSS定位根据大小而不同,html,css,position,Html,Css,Position,我在相对和绝对定位中出错,但我不知道如何清除它,我尝试更改宽度:自动和100%,但没有任何效果。在%中给定宽度时,div在最小化时折叠 现在这个页面并没有放在笔记本电脑的中间(其他屏幕分辨率)。我的代码怎么了 html css 具有相对定位的页面元素 给你绝对位置的控制 它里面的儿童元素 具有相对定位的页面元素 给你绝对位置的控制 它里面的儿童元素 只需为代码创建一个提琴..只需为代码创建一个提琴。。 [complete source][1] http://jsfiddle.net/X5

我在<代码>相对<代码>和<代码>绝对<代码>定位中出错,但我不知道如何清除它,我尝试更改<代码>宽度:自动<代码>和<代码>100%<代码>,但没有任何效果。在
%
中给定宽度时,
div
在最小化时折叠

现在这个页面并没有放在笔记本电脑的中间(其他屏幕分辨率)。我的代码怎么了

html

css


具有相对定位的页面元素 给你绝对位置的控制 它里面的儿童元素


具有相对定位的页面元素 给你绝对位置的控制 它里面的儿童元素


只需为代码创建一个提琴..只需为代码创建一个提琴。。
[complete source][1] http://jsfiddle.net/X5RDL/
h1 {
    color: #fff;
        font-weight: normal;    
}
body {
    margin: 0px 10px 10px 10px;
    background: #C5DA99 url(images/img01.jpg) repeat;
    color: #787878;
        position:absolute;  
        font:15px Georgia, "Times New Roman", Times, serif; 
}
#header {
    width: auto;
    height: 100px;
        margin:15px 05px ;
    padding: 0px 50px;
    background: url(images/img02.jpg) repeat;
        position:relative;
}
#logo {
    float: right;
    width: 300px;
    margin: 0;
    padding: 13px;
    color: #FFFFFF;          
}
#menu {
    padding:30px 10px 0 30px;
         position:absolute;    
}
#menu li {
    display: inline;
      -moz-border-radius-topleft: 12px; 
      -webkit-border-top-left-radius:12px;

}
#menu li a {
    text-decoration: none;
        float:left;
        width:;
        height:20px;
    padding: 10px;
    color: black;
        font:14px Georgia, "Times New Roman", Times, serif;    
}


#menu li a:hover {
    margin-top:;
       color:#FFF;
    padding-bottom:12px; 
  text-shadow:5px 5px 5px white;
background:url(images/vline.jpg) no-repeat bottom
}

#contentbg
    {
        width:1004px;
        float:left;
            background: #FFFFFF;
    }   
#content 
      {
              padding:;
      }     
/*  contentleft  */
#contentleft
      {
        width:190px;
        float: left;
        margin:0px;
        padding:34px 0 33px 23px;
      }
/*   content middle */
#contentmid
    {
        width:500px;
        float:left;
        margin:0px;
        padding:34px 5px 33px 15px;
        background-image:url(images/vline.jpg);
        background-repeat:repeat-y; 
    }
/* content Right */
#contentright
    {
        width:240px;
        float: right;
        padding:34px 0 40px 12px;
        background-image:url(images/vline.jpg);
        background-repeat:repeat-y;
    }
/* login box */
#loginPan form
         {
               padding:5px;
               width:200px; 
               height:188px; 
              background:#FCF6E6; 
              color:#705D20; 
              position:relative; 
              border:1px dashed #BFB492; 
         }
#loginPan form label
         {
              width:91px; 
              height:22px; 
             display:block; 
             float:left;  
         }