是否有CSS使我的内容适合在台式机屏幕上显示?

时间:2019-02-16 19:59:26

标签: css

我的网站反应灵敏。当我更改窗口大小时,内容大小会缩放以适合窗口。在移动设备上可以,在桌面上也可以根据窗口大小进行缩放。

但是,我的内容不会覆盖台式机屏幕的整个宽度。高度不错,但宽度不会一直延伸。它位于菜单栏和徽标之间。

我尝试过

html, body{height: 100%; width: 100%;}
.container{
width:100%; height: 100%; max-width: 100%; max-height:
100%;position: relative;}
@media screen and (min-width: 48em) 
.blog:not(.has-sidebar) #primary article
{
width: 100%;
}
body:not(.has-sidebar):not(.page-one-column) .page- 
header
{
display: none;
}
.content {position: relative;}

#body {height: 100%; width: 100%;}

使用

.container

它确实移动了它,但是没有移动到整个宽度上,只是在左边,略高于徽标参数。

有什么想法吗?

2 个答案:

答案 0 :(得分:0)

.container {width:100%;高度:100%;最大宽度:100%;最大宽度:     100%; 位置:相对; }

职位:相对;把它拿出来:)希望行得通。 还有2个最大宽度,您也可以取出1个


您可以添加CSS

@media (min-width: 875px) { 
  div#primary {
   margin: 0 auto;
   float: unset;
  }
  #masthead .flex-row 
  { 
    max-width: 66%; 
    margin: 0 auto; 
  }
}

答案 1 :(得分:0)

div#primary {
margin: 0 auto;
float: unset; height: 100%; width: 100%;
}